WebKit Bugzilla
Attachment 360201 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]
Patch
bug-193786-20190125180809.patch (text/plain), 42.20 KB, created by
Megan Gardner
on 2019-01-25 18:08:10 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2019-01-25 18:08:10 PST
Size:
42.20 KB
patch
obsolete
>Subversion Revision: 240537 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index eb4273a6f968cd354ed9b5ce81e6171de0d6420e..bdd634d1e5b07acf6e2fbb60b7e51b1e811afa5b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2019-01-25 Megan Gardner <megan_gardner@apple.com> >+ >+ Turn on Smart Paste >+ https://bugs.webkit.org/show_bug.cgi?id=193786 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Turned on a modified tests: >+ LayoutTests/editing/pasteboard/smart-paste-001.html >+ LayoutTests/editing/pasteboard/smart-paste-002.html >+ LayoutTests/editing/pasteboard/smart-paste-003.html >+ LayoutTests/editing/pasteboard/smart-paste-004.html >+ LayoutTests/editing/pasteboard/smart-paste-005.html >+ LayoutTests/editing/pasteboard/smart-paste-006.html >+ LayoutTests/editing/pasteboard/smart-paste-007.html >+ LayoutTests/editing/pasteboard/smart-paste-008.html >+ >+ * platform/ios/PasteboardIOS.mm: >+ (WebCore::Pasteboard::canSmartReplace): >+ Turn on smart replace. >+ > 2019-01-25 Jer Noble <jer.noble@apple.com> > > <video> elements not in the DOM should be allowed to AirPlay >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6e98674cd9c572db1c7edd0b4b402133207a1550..027a37652b08b1af80516ab2a1c1bf8b40de69ec 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-25 Megan Gardner <megan_gardner@apple.com> >+ >+ Turn on Smart Paste >+ https://bugs.webkit.org/show_bug.cgi?id=193786 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Platform/spi/ios/UIKitSPI.h: >+ * UIProcess/ios/TextCheckerIOS.mm: >+ (WebKit::TextChecker::isSmartInsertDeleteEnabled): >+ Use the flag from UIKit to determine if smart copy paste should be >+ turned on. >+ > 2019-01-25 Dean Jackson <dino@apple.com> > > REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL >diff --git a/Source/WebCore/platform/ios/PasteboardIOS.mm b/Source/WebCore/platform/ios/PasteboardIOS.mm >index 8f52793d350fa6767d70d44cbef4f9774e0440f1..2071531cdc77ab4f00d1768e5e6d50d91bc65cc8 100644 >--- a/Source/WebCore/platform/ios/PasteboardIOS.mm >+++ b/Source/WebCore/platform/ios/PasteboardIOS.mm >@@ -147,7 +147,7 @@ void Pasteboard::write(const Color& color) > > bool Pasteboard::canSmartReplace() > { >- return false; >+ return true; > } > > void Pasteboard::read(PasteboardPlainText& text) >diff --git a/Source/WebKit/Platform/spi/ios/UIKitSPI.h b/Source/WebKit/Platform/spi/ios/UIKitSPI.h >index d4479068b853b938ebbd300ccb223b0bea36e9fc..94f0c4bf5f9721375f3c441c052fdf3d4bd86c15 100644 >--- a/Source/WebKit/Platform/spi/ios/UIKitSPI.h >+++ b/Source/WebKit/Platform/spi/ios/UIKitSPI.h >@@ -259,6 +259,7 @@ typedef enum { > @end > > @interface UIKeyboardImpl : UIView <UIKeyboardCandidateListDelegate> >+- (BOOL)smartInsertDeleteIsEnabled; > @end > > @interface UIKeyboardImpl () >diff --git a/Source/WebKit/UIProcess/ios/TextCheckerIOS.mm b/Source/WebKit/UIProcess/ios/TextCheckerIOS.mm >index 42078b636511548159df07114c58cc60cd2b52a9..d310232057a0098049f95105b88ee910eabae122 100644 >--- a/Source/WebKit/UIProcess/ios/TextCheckerIOS.mm >+++ b/Source/WebKit/UIProcess/ios/TextCheckerIOS.mm >@@ -113,8 +113,7 @@ bool TextChecker::isTestingMode() > > bool TextChecker::isSmartInsertDeleteEnabled() > { >- notImplemented(); >- return false; >+ return [[UIKeyboardImpl sharedInstance] smartInsertDeleteIsEnabled]; > } > > void TextChecker::setSmartInsertDeleteEnabled(bool) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b722695a5f2c69f721e75ed9efb359aa8e73f98b..526e1e116539b5f53546b0cda09fef441c081aa5 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,36 @@ >+2019-01-25 Megan Gardner <megan_gardner@apple.com> >+ >+ Turn on Smart Paste >+ https://bugs.webkit.org/show_bug.cgi?id=193786 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * editing/editing.js: >+ (runEditingTestWithCallbackLogging): >+ (runDumpAsTextEditingTest): >+ Added ability to handle async functions. >+ * 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-wk2/editing/pasteboard/smart-paste-007-expected.txt: >+ * platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt: >+ * 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. >+ * resources/ui-helper.js: >+ (window.UIHelper.doubleClickAt): >+ (window.UIHelper.async.selectWordByDoubleTapOrClick): >+ Added helper functions to allow for selecting a word by double tap or click. >+ > 2019-01-25 Jer Noble <jer.noble@apple.com> > > <video> elements not in the DOM should be allowed to AirPlay >diff --git a/LayoutTests/editing/editing.js b/LayoutTests/editing/editing.js >index 26d56a9c7c4251742bf9b89bf0161bcef9aba987..0e6788f9ef764e4d22c138fc9843277612d926a8 100644 >--- a/LayoutTests/editing/editing.js >+++ b/LayoutTests/editing/editing.js >@@ -924,7 +924,17 @@ function runEditingTestWithCallbackLogging(enableCallbackLogging) { > 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 @@ function runDumpAsTextEditingTest(enableCallbacks) { > 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) { >diff --git a/LayoutTests/editing/pasteboard/smart-paste-001.html b/LayoutTests/editing/pasteboard/smart-paste-001.html >index 461b86940b6b4c999fc65400c4043c6460d0bcb6..cffd89c6cbee2a3b0e3746f0d20e645f3e04fd17 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-001.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-001.html >@@ -39,10 +39,11 @@ test > </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(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-002.html b/LayoutTests/editing/pasteboard/smart-paste-002.html >index bc3cd7b71e68b2b1de15d1f474518c26c3c2fac4..89283b09abc8f66cf34f5a5e0c3b0b18ca7b18b8 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-002.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-002.html >@@ -39,13 +39,11 @@ test > </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(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-003.html b/LayoutTests/editing/pasteboard/smart-paste-003.html >index 6e5a609e322bcbf7cd1cc3c497655d31f14b2909..5a0769548815bd8b640cc974e89fac5147304d19 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-003.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-003.html >@@ -40,10 +40,11 @@ test test > </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(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-004.html b/LayoutTests/editing/pasteboard/smart-paste-004.html >index f6515156ab9e1ffc19bc3df95cee298533cc3c70..0a914c5524d58ffc0bf7641b0dc81c4cb67e34a4 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-004.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-004.html >@@ -39,10 +39,11 @@ test test > </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(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-005.html b/LayoutTests/editing/pasteboard/smart-paste-005.html >index 799047b450c15261fd9ea126112a843373c2b0d7..f12f5e5fd83b46ca6e1915c367c5cf9b4fc61632 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-005.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-005.html >@@ -40,13 +40,11 @@ test > </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(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-006.html b/LayoutTests/editing/pasteboard/smart-paste-006.html >index d2efa017f3ef4171c475f3c93666a8d95a07602b..f1ad76485b6727d70f79d1e09eb4a2f64187d6a4 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-006.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-006.html >@@ -40,10 +40,11 @@ test > </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('-'); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-007.html b/LayoutTests/editing/pasteboard/smart-paste-007.html >index 8b7de9d52a901e67ab4e4979dcf889d067843aab..ab8837dc33e59f3df23fd5a26abca745a9339fa6 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-007.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-007.html >@@ -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('.'); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-008.html b/LayoutTests/editing/pasteboard/smart-paste-008.html >index 37e10482fc55a98b5b5ba508809b4c4c39fb4adb..312902e628303df6dca780f7fb674c63a0875b2f 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-008.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-008.html >@@ -6,16 +6,20 @@ if (window.testRunner) > <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> >diff --git a/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt b/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt >index 6684c5cce04cf92f4cded4f63b6ffddb7a9e70db..d88a593802d77e8d4209bc6f98ed227fa6bd9f02 100644 >--- a/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt >+++ b/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt >@@ -1,6 +1,15 @@ >+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 >@@ -9,7 +18,7 @@ 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: 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 @@ layer at (0,0) size 800x600 > 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 >diff --git a/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt b/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt >index 0beecb8ff1771e07c6d8da840cca17b78bc1c9e8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 >--- a/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt >+++ b/LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt >@@ -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 >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index f03eb979540ea7a024a4e688481608e96bfa3d70..cba4075607b50ecd6c230fa2b0401075168f09f4 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -2137,13 +2137,7 @@ editing/pasteboard/paste-plaintext-user-select-none.html [ Failure ] > 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. > >diff --git a/LayoutTests/platform/ios/editing/pasteboard/smart-paste-001-expected.txt b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-001-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..4355430d21eb42ef1c3a2f9f7c34c8ddd6e1bfb7 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-001-expected.txt >@@ -0,0 +1,19 @@ >+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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted >+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 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >+Tests: >+Smart paste when pasting after a word at the end of a line. >+Expected Results: >+A space should be added between the preexisting word and the word that's pasted. It should like this: >+test test >+test test >+execCopyCommand: <div id="test" class="editing"> test </div> >+execPasteCommand: <div id="test" class="editing"> test test</div> >diff --git a/LayoutTests/platform/ios/editing/pasteboard/smart-paste-002-expected.txt b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-002-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..5fecd89ddf54dd7cb6489e219c1d68036eadb13c >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-002-expected.txt >@@ -0,0 +1,20 @@ >+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: 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 >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >+Tests: >+Smart paste when pasting at the beginning of a line before a word. >+Expected Results: >+A space should be added after the pasted word before the preexising word. It should like this: >+test test >+test test >+execCopyCommand: <div id="test" class="editing"> test </div> >+execPasteCommand: <div id="test" class="editing">test test </div> >diff --git a/LayoutTests/platform/ios/editing/pasteboard/smart-paste-003-expected.txt b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-003-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b137fddf50d266e25a62a834c0a762cc5530fbe2 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-003-expected.txt >@@ -0,0 +1,20 @@ >+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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >+Tests: >+Smart paste when pasting after a word and before a space and another word. >+Expected Results: >+A space should be added between the preexisting word and the word that's pasted. No space should be added after the pasted word. It should like this: >+test test test >+test test test >+execCopyCommand: <div id="test" class="editing"> test test </div> >+execPasteCommand: <div id="test" class="editing"> test test test</div> >diff --git a/LayoutTests/platform/ios/editing/pasteboard/smart-paste-004-expected.txt b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-004-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..282c3625315c972c106b7c5b1b6b0704bdaaa01e >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-004-expected.txt >@@ -0,0 +1,22 @@ >+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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >+Tests: >+Smart paste when pasting after word and a space before another word. >+Expected Results: >+A space should be added after the pasted word before the other preexisting word. It should like this: >+test test test >+test test test >+execCopyCommand: <div id="test" class="editing"> test test </div> >+execPasteCommand: <div id="test" class="editing"> test test test</div> >diff --git a/LayoutTests/platform/ios/editing/pasteboard/smart-paste-005-expected.txt b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-005-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e4f6f583be9290a6a36c536cd7c5eeae1ea7e192 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-005-expected.txt >@@ -0,0 +1,22 @@ >+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: 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 >+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification >+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification >+Tests: >+Smart paste when pasting in the middle of a word. >+Expected Results: >+Spaces should be added before and after the pasted word. It should look like this: >+te test st >+te test st >+execCopyCommand: <div id="test" class="editing"> test </div> >+execPasteCommand: <div id="test" class="editing"> te test st</div> >diff --git a/LayoutTests/platform/ios/editing/pasteboard/smart-paste-006-expected.txt b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-006-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e05ea3792d24aca77fd336310e50172665b33574 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-006-expected.txt >@@ -0,0 +1,33 @@ >+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: 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 >+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 6 of #text > DIV > DIV > BODY > HTML > #document to 6 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 >+Tests: >+Smart paste when pasting between smart paste exempt characters. >+Expected Results: >+No spaces should be added before or after the pasted word. It should look like this: >+-test- >+-test- >+execCutCommand: <div id="test" class="editing"><br></div> >+execTypeCharacterCommand: <div id="test" class="editing">-</div> >+execTypeCharacterCommand: <div id="test" class="editing">--</div> >+execPasteCommand: <div id="test" class="editing">-test-</div> >diff --git a/LayoutTests/resources/ui-helper.js b/LayoutTests/resources/ui-helper.js >index 5b320bc4d4541d781eacca63bc8fe409def6078a..31c64a8b637e3066a99d16870c4299d9d6c2bfeb 100644 >--- a/LayoutTests/resources/ui-helper.js >+++ b/LayoutTests/resources/ui-helper.js >@@ -30,6 +30,15 @@ window.UIHelper = class UIHelper { > }); > } > >+ 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 @@ window.UIHelper = class UIHelper { > 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