WebKit Bugzilla
Attachment 360133 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-20190125112630.patch (text/plain), 35.20 KB, created by
Megan Gardner
on 2019-01-25 11:26:31 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2019-01-25 11:26:31 PST
Size:
35.20 KB
patch
obsolete
>Subversion Revision: 240449 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index bf22699d5bbe80430e55b680fae13a368dbf7b98..12934d7479113fade158b6f6c229c32821b0d5e7 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-24 Brent Fulgham <bfulgham@apple.com> > > Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 04c5c0497750fe84b67bef504bb5c0de3e23e12e..3ea722c3f51d01c8f2013db70ff133605dcf0a0c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+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: >+ Add additional property that we now need to check. >+ >+ * UIProcess/ios/TextCheckerIOS.mm: >+ (WebKit::TextChecker::isSmartInsertDeleteEnabled): >+ Use the flag from UIKit to determine if smart copy paste should be >+ turned on. >+ > 2019-01-24 Brent Fulgham <bfulgham@apple.com> > > Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess. >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 b5c3e34c21cc09dc0cd3ea8c4d7aff2e58fb45db..48a62827e604c333cff6d28a4b757ee837ad62e4 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 c2abd7d67973662c17462d6053ea5cc87eca5d9a..5e7eaa3294932ba3d34a986f8dfb1c0dd10b7d4f 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,28 @@ >+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/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. >+ > 2019-01-24 John Wilander <wilander@apple.com> > > Add Ad Click Attribution as an internal/experimental feature >diff --git a/LayoutTests/editing/pasteboard/smart-paste-001.html b/LayoutTests/editing/pasteboard/smart-paste-001.html >index 461b86940b6b4c999fc65400c4043c6460d0bcb6..9ce8fdb51ec7bbe211b63387bc211286427d8548 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-001.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-001.html >@@ -39,10 +39,14 @@ test > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > > function editingTest() { >- doubleClickAtSelectionStart(); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else >+ doubleClickAtSelectionStart(); > copyCommand(); > moveSelectionForwardByCharacterCommand(); > pasteCommand(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-002.html b/LayoutTests/editing/pasteboard/smart-paste-002.html >index bc3cd7b71e68b2b1de15d1f474518c26c3c2fac4..677b67250773d22b19fe07da407c310272e1ad12 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-002.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-002.html >@@ -39,13 +39,18 @@ 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); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else { >+ var target = document.getElementById('test'); >+ var x = target.offsetLeft + target.offsetWidth / 2; >+ var y = target.offsetTop + target.offsetHeight / 2; >+ doubleClick(x, y); >+ } > copyCommand(); > moveSelectionBackwardByWordCommand(); > pasteCommand(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-003.html b/LayoutTests/editing/pasteboard/smart-paste-003.html >index 6e5a609e322bcbf7cd1cc3c497655d31f14b2909..a64e89b88841ce1bf2cfccabc19de42e0247bb05 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-003.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-003.html >@@ -40,10 +40,14 @@ test test > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > > function editingTest() { >- doubleClickAtSelectionStart(); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else >+ doubleClickAtSelectionStart(); > copyCommand(); > moveSelectionForwardByCharacterCommand(); > pasteCommand(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-004.html b/LayoutTests/editing/pasteboard/smart-paste-004.html >index f6515156ab9e1ffc19bc3df95cee298533cc3c70..c165d20aef66e4e62d75edcd5ff17cf54f87c257 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-004.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-004.html >@@ -39,10 +39,14 @@ test test > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > > function editingTest() { >- doubleClickAtSelectionStart(); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else >+ doubleClickAtSelectionStart(); > copyCommand(); > moveSelectionForwardByCharacterCommand(); > moveSelectionForwardByCharacterCommand(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-005.html b/LayoutTests/editing/pasteboard/smart-paste-005.html >index 799047b450c15261fd9ea126112a843373c2b0d7..ff50abd977714574444e79b7741be491eeb4301f 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-005.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-005.html >@@ -40,13 +40,18 @@ 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); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else { >+ var target = document.getElementById('test'); >+ var x = target.offsetLeft + target.offsetWidth / 2; >+ var y = target.offsetTop + target.offsetHeight / 2; >+ doubleClick(x, y); >+ } > copyCommand(); > moveSelectionBackwardByWordCommand(); > moveSelectionForwardByCharacterCommand(); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-006.html b/LayoutTests/editing/pasteboard/smart-paste-006.html >index d2efa017f3ef4171c475f3c93666a8d95a07602b..2d5a9ec97150e7fd1ba26b852df25ecc65a983f7 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-006.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-006.html >@@ -40,10 +40,14 @@ test > </div> > </div> > <script src="../editing.js"></script> >+<script src="../../resources/ui-helper.js"></script> > <script> > > function editingTest() { >- extendSelectionForwardByWordCommand(); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else >+ extendSelectionForwardByWordCommand(); > cutCommand(); > typeCharacterCommand('-'); > typeCharacterCommand('-'); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-007.html b/LayoutTests/editing/pasteboard/smart-paste-007.html >index 8b7de9d52a901e67ab4e4979dcf889d067843aab..5631c98d99822927a53b1fb891eec33423162b8e 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-007.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-007.html >@@ -17,14 +17,18 @@ > .expected-results:first-line { font-weight: bold } > </style> > <script src=../editing.js language="JavaScript" type="text/JavaScript" ></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); >+ if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 5); >+ else { >+ var target = document.getElementById('test'); >+ var x = target.offsetLeft; >+ var y = target.offsetTop + target.offsetHeight / 2; >+ doubleActivateAt(x, y); >+ } > cutCommand(); > typeCharacterCommand('.'); > typeCharacterCommand('.'); >diff --git a/LayoutTests/editing/pasteboard/smart-paste-008.html b/LayoutTests/editing/pasteboard/smart-paste-008.html >index 37e10482fc55a98b5b5ba508809b4c4c39fb4adb..34168a2642a45c5acd9250c079f6085805f2e737 100644 >--- a/LayoutTests/editing/pasteboard/smart-paste-008.html >+++ b/LayoutTests/editing/pasteboard/smart-paste-008.html >@@ -7,12 +7,15 @@ if (window.testRunner) > <div id="test" contenteditable="true"><div>foo</div><div>x bar</div></div> > > <script type="text/javascript" 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(); >+getSelection().setBaseAndExtent(e, 0, e, 0); >+if (UIHelper.isIOS()) >+ getSelection().setBaseAndExtent(test.firstChild.firstChild, 0, test.firstChild.firstChild, 3); >+else >+ doubleClickAtSelectionStart(); > copyCommand(); > moveSelectionBackwardByCharacterCommand(); > moveSelectionForwardByCharacterCommand(); >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..dd1d642770f87231a5208aea93e1c52b9890f7bf 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,13 @@ >+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: 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 +16,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 +43,6 @@ 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 >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..cb48178d0ca60baadfaec381cff5520cbcd937d6 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,9 +1,13 @@ >+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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification > 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: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of 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 >@@ -21,14 +25,8 @@ layer at (0,0) size 800x600 > 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 >+ RenderBlock {DIV} at (0,112) size 784x20 >+ RenderBlock {DIV} at (0,0) size 784x20 >+ RenderText {#text} at (0,0) size 56x19 >+ text run at (0,0) width 56: "f foo bar" >+caret: position 5 of child 0 {#text} of child 0 {DIV} of child 4 {DIV} of body >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index 2b3325b9a27ec5da26f0d071c48b5b48c17b1aff..3f5115843216c541529d4c9d11280bfd9a7ebc85 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -2142,13 +2142,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..8f111d64a9beb8a1ae680c882be3d83cd9fadf67 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-001-expected.txt >@@ -0,0 +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: 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..71928203d011e9e0b02d57bbcd575f6d7e20ca3e >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-002-expected.txt >@@ -0,0 +1,18 @@ >+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: 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..7192654a8fdb027e2ab179671d7c83f90bfb570a >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-003-expected.txt >@@ -0,0 +1,18 @@ >+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: 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..545c6723eb051c77aedb1bf51991eefc3a66208e >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-004-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: 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..27ea034c06aa66372818d4f725a208e120493591 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-005-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: 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..6d192832ae4d08f36977ede5b6f5cbd53323c962 >--- /dev/null >+++ b/LayoutTests/platform/ios/editing/pasteboard/smart-paste-006-expected.txt >@@ -0,0 +1,31 @@ >+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: 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>
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