WebKit Bugzilla
Attachment 360197 Details for
Bug 193786
: Turn on Smart Paste
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
With Mac rebaselines
layout-test-changes-with-mac-rebaselines.patch (text/plain), 32.58 KB, created by
Ryosuke Niwa
on 2019-01-25 17:10:53 PST
(
hide
)
Description:
With Mac rebaselines
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2019-01-25 17:10:53 PST
Size:
32.58 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 240529) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,33 @@ >+2019-01-25 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Turn on Smart Paste >+ https://bugs.webkit.org/show_bug.cgi?id=193786 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * editing/editing.js: >+ (runEditingTestWithCallbackLogging): Added the support for editingTest to return a promise. >+ Make DRT/WTR automatically wait for the promise and notify done. >+ (runDumpAsTextEditingTest): Ditto. >+ * editing/pasteboard/smart-paste-001.html: >+ * editing/pasteboard/smart-paste-002.html: >+ * editing/pasteboard/smart-paste-003.html: >+ * editing/pasteboard/smart-paste-004.html: >+ * editing/pasteboard/smart-paste-005.html: >+ * editing/pasteboard/smart-paste-006.html: >+ * editing/pasteboard/smart-paste-007.html: >+ * editing/pasteboard/smart-paste-008.html: >+ * platform/ios/TestExpectations: >+ * platform/ios/editing/pasteboard/smart-paste-001-expected.txt: Added. >+ * platform/ios/editing/pasteboard/smart-paste-002-expected.txt: Added. >+ * platform/ios/editing/pasteboard/smart-paste-003-expected.txt: Added. >+ * platform/ios/editing/pasteboard/smart-paste-004-expected.txt: Added. >+ * platform/ios/editing/pasteboard/smart-paste-005-expected.txt: Added. >+ * platform/ios/editing/pasteboard/smart-paste-006-expected.txt: Added. >+ * platform/ios/editing/pasteboard/smart-paste-007-expected.txt: Added. >+ * resources/ui-helper.js: >+ (UIHelper.doubleClickAt): Added. >+ (UIHelper.async.selectWordByDoubleTapOrClick): Added. > 2019-01-25 Shawn Roberts <sroberts@apple.com> > > [ iOS Simulator Release ] Layout Test fast/animation/request-animation-frame.html is a flaky failure. >Index: LayoutTests/editing/editing.js >=================================================================== >--- LayoutTests/editing/editing.js (revision 240529) >+++ LayoutTests/editing/editing.js (working copy) >@@ -924,7 +924,17 @@ > var elem = document.getElementById("test"); > var selection = window.getSelection(); > selection.setPosition(elem, 0); >- editingTest(); >+ >+ const result = editingTest(); >+ >+ if (result instanceof Promise) { >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ result.then(() => { >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }); >+ } > } > > var dumpAsText = false; >@@ -942,10 +952,23 @@ > var elem = document.getElementById("test"); > var selection = window.getSelection(); > selection.setPosition(elem, 0); >- editingTest(); >+ const result = editingTest(); > >- for (var i = 0; i < elementsForDumpingMarkupList.length; i++) >- document.body.appendChild(elementsForDumpingMarkupList[i]); >+ const postTask = () => { >+ for (var i = 0; i < elementsForDumpingMarkupList.length; i++) >+ document.body.appendChild(elementsForDumpingMarkupList[i]); >+ } >+ >+ if (result instanceof Promise) { >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ result.then(() => { >+ postTask(); >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }); >+ } else >+ postTask(); > } > > function debugForDumpAsText(name) { >Index: LayoutTests/editing/pasteboard/smart-paste-001.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-001.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-001.html (working copy) >@@ -39,10 +39,11 @@ > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- doubleClickAtSelectionStart(); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > copyCommand(); > moveSelectionForwardByCharacterCommand(); > pasteCommand(); >Index: LayoutTests/editing/pasteboard/smart-paste-002-expected.txt >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-002-expected.txt (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-002-expected.txt (working copy) >@@ -1,11 +1,9 @@ > EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document > EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >Index: LayoutTests/editing/pasteboard/smart-paste-002.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-002.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-002.html (working copy) >@@ -39,13 +39,11 @@ > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- var target = document.getElementById('test'); >- var x = target.offsetLeft + target.offsetWidth / 2; >- var y = target.offsetTop + target.offsetHeight / 2; >- doubleClick(x, y); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > copyCommand(); > moveSelectionBackwardByWordCommand(); > pasteCommand(); >Index: LayoutTests/editing/pasteboard/smart-paste-003.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-003.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-003.html (working copy) >@@ -40,10 +40,11 @@ > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- doubleClickAtSelectionStart(); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > copyCommand(); > moveSelectionForwardByCharacterCommand(); > pasteCommand(); >Index: LayoutTests/editing/pasteboard/smart-paste-004.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-004.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-004.html (working copy) >@@ -39,10 +39,11 @@ > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- doubleClickAtSelectionStart(); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > copyCommand(); > moveSelectionForwardByCharacterCommand(); > moveSelectionForwardByCharacterCommand(); >Index: LayoutTests/editing/pasteboard/smart-paste-005-expected.txt >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-005-expected.txt (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-005-expected.txt (working copy) >@@ -1,13 +1,11 @@ > EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document > EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >Index: LayoutTests/editing/pasteboard/smart-paste-005.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-005.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-005.html (working copy) >@@ -40,13 +40,11 @@ > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- var target = document.getElementById('test'); >- var x = target.offsetLeft + target.offsetWidth / 2; >- var y = target.offsetTop + target.offsetHeight / 2; >- doubleClick(x, y); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > copyCommand(); > moveSelectionBackwardByWordCommand(); > moveSelectionForwardByCharacterCommand(); >Index: LayoutTests/editing/pasteboard/smart-paste-006-expected.txt >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-006-expected.txt (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-006-expected.txt (working copy) >@@ -1,6 +1,7 @@ > EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document > EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >Index: LayoutTests/editing/pasteboard/smart-paste-006.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-006.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-006.html (working copy) >@@ -40,10 +40,11 @@ > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- extendSelectionForwardByWordCommand(); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > cutCommand(); > typeCharacterCommand('-'); > typeCharacterCommand('-'); >Index: LayoutTests/editing/pasteboard/smart-paste-007.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-007.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-007.html (working copy) >@@ -16,15 +16,12 @@ > .scenario:first-line { font-weight: bold; margin-bottom: 16px;} > .expected-results:first-line { font-weight: bold } > </style> >-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script> >- >+<script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > >-function editingTest() { >- var target = document.getElementById('test'); >- var x = target.offsetLeft; >- var y = target.offsetTop + target.offsetHeight / 2; >- doubleClick(x, y); >+async function editingTest() { >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); > cutCommand(); > typeCharacterCommand('.'); > typeCharacterCommand('.'); >Index: LayoutTests/editing/pasteboard/smart-paste-008.html >=================================================================== >--- LayoutTests/editing/pasteboard/smart-paste-008.html (revision 240529) >+++ LayoutTests/editing/pasteboard/smart-paste-008.html (working copy) >@@ -6,16 +6,20 @@ > <p>A smart paste is performed into a selection starting in one block and ending in another. Spaces should surround the pasted word.</p> > <div id="test" contenteditable="true"><div>foo</div><div>x bar</div></div> > >-<script type="text/javascript" src="../editing.js"></script> >+<script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> >-var s = window.getSelection(); > var e = document.getElementById("test"); > >-setSelectionCommand(e, 0, e, 0); >-doubleClickAtSelectionStart(); >-copyCommand(); >-moveSelectionBackwardByCharacterCommand(); >-moveSelectionForwardByCharacterCommand(); >-extendSelectionForwardByLineCommand(); >-pasteCommand(); >+async function runTest() { >+ getSelection().setBaseAndExtent(e, 0, e, 0); >+ await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); >+ copyCommand(); >+ moveSelectionBackwardByCharacterCommand(); >+ moveSelectionForwardByCharacterCommand(); >+ extendSelectionForwardByLineCommand(); >+ pasteCommand(); >+} >+ >+UIHelper.wait(runTest()); > </script> >Index: LayoutTests/platform/ios/TestExpectations >=================================================================== >--- LayoutTests/platform/ios/TestExpectations (revision 240529) >+++ LayoutTests/platform/ios/TestExpectations (working copy) >@@ -2136,14 +2136,8 @@ > editing/pasteboard/paste-sanitize-crash-1.html [ Failure ] > editing/pasteboard/paste-sanitize-crash-2.html [ Failure ] > editing/pasteboard/paste-text-events.html [ Failure ] >-editing/pasteboard/smart-paste-001.html [ Failure ] >-editing/pasteboard/smart-paste-002.html [ Failure ] >-editing/pasteboard/smart-paste-003.html [ Failure ] >-editing/pasteboard/smart-paste-004.html [ Failure ] >-editing/pasteboard/smart-paste-005.html [ Failure ] >-editing/pasteboard/smart-paste-007.html [ Failure ] >-editing/pasteboard/smart-paste-008.html [ Failure ] > >+ > # Local pasteboard is not implemented on iOS, so pasteboard tests used to be all disabled. > > editing/execCommand/find-after-replace.html [ Skip ] >Index: LayoutTests/platform/ios/editing/pasteboard/smart-paste-007-expected.txt >=================================================================== >--- LayoutTests/platform/ios/editing/pasteboard/smart-paste-007-expected.txt (revision 240529) >+++ LayoutTests/platform/ios/editing/pasteboard/smart-paste-007-expected.txt (working copy) >@@ -1,8 +1,17 @@ >+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document >+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification > EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >@@ -9,7 +18,7 @@ > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification > layer at (0,0) size 800x600 >@@ -36,7 +45,7 @@ > text run at (0,91) width 52: ". test." > RenderBlock {DIV} at (0,248) size 784x34 > RenderBlock {DIV} at (0,0) size 784x34 [border: (2px solid #FF0000)] >- RenderText {#text} at (2,3) size 79x28 >- text run at (2,3) width 79: ".test.test" >- RenderBlock (anonymous) at (0,34) size 784x0 >-caret: position 5 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body >+ RenderText {#text} at (2,3) size 52x28 >+ text run at (2,3) width 52: ". test." >+caret: position 6 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body >+scrolled to 0,21 >Index: LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt >=================================================================== >--- LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt (revision 240529) >+++ LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt (nonexistent) >@@ -1,42 +0,0 @@ >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >-layer at (0,0) size 800x600 >- RenderView at (0,0) size 800x600 >-layer at (0,0) size 800x600 >- RenderBlock {HTML} at (0,0) size 800x600 >- RenderBody {BODY} at (8,8) size 784x584 >- RenderBlock {DIV} at (0,0) size 784x224 [border: (2px solid #0000FF)] >- RenderBlock {DIV} at (14,14) size 756x60 >- RenderText {#text} at (0,1) size 66x28 >- text run at (0,1) width 66: "Tests: " >- RenderBR {BR} at (0,0) size 0x0 >- RenderText {#text} at (0,31) size 457x28 >- text run at (0,31) width 457: "Smart paste when pasting between two periods." >- RenderBlock {DIV} at (14,90) size 756x120 >- RenderText {#text} at (0,1) size 190x28 >- text run at (0,1) width 190: "Expected Results: " >- RenderBR {BR} at (189,23) size 1x0 >- RenderText {#text} at (0,31) size 738x58 >- text run at (0,31) width 738: "A space should be added before, but not after the pasted word. It should look" >- text run at (0,61) width 90: "like this: " >- RenderBR {BR} at (89,83) size 1x0 >- RenderText {#text} at (0,91) size 52x28 >- text run at (0,91) width 52: ". test." >- RenderBlock {DIV} at (0,248) size 784x34 >- RenderBlock {DIV} at (0,0) size 784x34 [border: (2px solid #FF0000)] >- RenderText {#text} at (2,3) size 79x28 >- text run at (2,3) width 79: ".test.test" >- RenderBlock (anonymous) at (0,34) size 784x0 >-caret: position 5 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body >Index: LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt >=================================================================== >--- LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt (revision 240529) >+++ LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt (nonexistent) >@@ -1,34 +0,0 @@ >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >-layer at (0,0) size 800x600 >- RenderView at (0,0) size 800x600 >-layer at (0,0) size 800x600 >- RenderBlock {HTML} at (0,0) size 800x600 >- RenderBody {BODY} at (8,8) size 784x584 >- RenderBlock {P} at (0,0) size 784x40 >- RenderText {#text} at (0,0) size 767x39 >- text run at (0,0) width 401: "There was a bug in paste's smart replace whitespace handling. " >- text run at (400,0) width 367: "In some cases, it used information gathered at the start of" >- text run at (0,20) width 759: "the selection being pasted into to decide whether or not a space needed to be added to the end of the incoming content." >- RenderBlock {P} at (0,56) size 784x40 >- RenderText {#text} at (0,0) size 779x39 >- text run at (0,0) width 559: "A smart paste is performed into a selection starting in one block and ending in another. " >- text run at (558,0) width 221: "Spaces should surround the pasted" >- text run at (0,20) width 37: "word." >- RenderBlock {DIV} at (0,112) size 784x30 >- RenderBlock {DIV} at (0,0) size 784x30 >- RenderText {#text} at (0,8) size 6x19 >- text run at (0,8) width 6: "f" >- RenderInline {SPAN} at (0,0) size 34x28 >- RenderText {#text} at (5,1) size 34x28 >- text run at (5,1) width 34: "test" >- RenderText {#text} at (38,8) size 26x19 >- text run at (38,8) width 26: " bar" >- RenderBlock (anonymous) at (0,30) size 784x0 >-caret: position 4 of child 0 {#text} of child 1 {SPAN} of child 0 {DIV} of child 4 {DIV} of body >Index: LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt >=================================================================== >--- LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt (revision 240529) >+++ LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt (working copy) >@@ -1,9 +1,9 @@ > EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document > EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >Index: LayoutTests/resources/ui-helper.js >=================================================================== >--- LayoutTests/resources/ui-helper.js (revision 240529) >+++ LayoutTests/resources/ui-helper.js (working copy) >@@ -30,6 +30,15 @@ > }); > } > >+ static doubleClickAt(x, y) >+ { >+ eventSender.mouseMoveTo(x, y); >+ eventSender.mouseDown(); >+ eventSender.mouseUp(); >+ eventSender.mouseDown(); >+ eventSender.mouseUp(); >+ } >+ > static doubleTapAt(x, y) > { > console.assert(this.isIOS()); >@@ -104,6 +113,20 @@ > return UIHelper.activateAt(x, y); > } > >+ static async selectWordByDoubleTapOrClick(element, relativeX = 5, relativeY = 5) >+ { >+ const boundingRect = element.getBoundingClientRect(); >+ const x = boundingRect.x + relativeX; >+ const y = boundingRect.y + relativeY; >+ if (this.isIOS()) { >+ await UIHelper.tapAt(x, y); >+ await UIHelper.doubleTapAt(x, y); >+ await UIHelper.ensurePresentationUpdate(); >+ } else { >+ await UIHelper.doubleClickAt(x, y); >+ } >+ } >+ > static keyDown(key, modifiers=[]) > { > if (!this.isWebKit2() || !this.isIOS()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193786
:
360133
|
360143
|
360145
|
360187
|
360197
|
360201
|
360211
|
360214
|
360215
|
360218
|
360369
|
360371
|
360377
|
360379
|
360453
|
360817
|
360822
|
360916
|
360937
|
360943
|
360958
|
360999
|
361000