Turn on Smart Paste
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Feb 2019 09:05:21 +0000 (09:05 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Feb 2019 09:05:21 +0000 (09:05 +0000)
commit7cd2bd001124fc1e930f7dbea459df48f34e55d6
tree344d18a5d2b2e7d8d002d197c1b34ef7fe4a031a
parent838edefe9ca8de5f41f41062acec60502558b9de
Turn on Smart Paste
https://bugs.webkit.org/show_bug.cgi?id=193786

Reviewed by Ryosuke Niwa.

Source/WebCore:

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.

Source/WebKit:

* 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.

LayoutTests:

Rebaselined many tests and/or added iOS specific expectations to
correctly reflect smart copy paste behavior.

* 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/editing.js
LayoutTests/editing/pasteboard/smart-paste-006.html
LayoutTests/editing/pasteboard/smart-paste-007.html
LayoutTests/platform/ios-wk2/editing/pasteboard/4076267-2-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/input-field-1-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-line-endings-006-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-line-endings-007-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-line-endings-008-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-line-endings-009-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-line-endings-010-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-match-style-001-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-text-008-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-text-009-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-text-019-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-text-at-tabspan-003-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/paste-xml-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt
LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/ios/editing/pasteboard/4989774-expected.txt
LayoutTests/platform/ios/editing/pasteboard/onpaste-text-html-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/paste-text-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/paste-text-002-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/paste-text-003-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/paste-text-010-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/paste-text-at-tabspan-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-002-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-003-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-003-trailing-whitespace-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-004-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-005-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/smart-paste-006-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/TextCheckerIOS.mm