[WK2] Tapping away to dismiss the selection does not update the selected DOM range using character granularity
https://bugs.webkit.org/show_bug.cgi?id=170328
<rdar://problem/30904558>
Reviewed by Tim Horton.
Source/WebKit2:
When UIKit clears the selection while in text interaction mode, it notifies its document view (i.e., the
WKContentView) by setting its selected text range to nil. When character granularity selection is enabled, use
this as a cue to notify the web process that the selection is being cleared out.
-setSelectedTextRange: is a noop in the general case because the web process acts as the source of truth for what
the selection currently consists of, and notifies the UI process and UIKit via WKTextPosition and WKTextRange.
However, in the case of character granularity selections, tapping away to clear the selection is handled by
UIKit's text gesture recognizer cluster, which then informs the document (via -setSelectedTextRange:) that the
selection should be cleared out.
Adds a new Layout test: editing/selection/character-granularity-selected-range-after-dismissing-selection.html.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setSelectedTextRange:]):
LayoutTests:
Adds a new layout test verifying that when a user taps away to clear the current selection in character
granularity selection mode, the selected DOM range in the web process does not fall out of sync with UIKit's
selection views, which are dismissed.
* editing/selection/character-granularity-selected-range-after-dismissing-selection-expected.txt: Added.
* editing/selection/character-granularity-selected-range-after-dismissing-selection.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@214692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3ac1fe9..9d5a6b3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2017-03-31 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ [WK2] Tapping away to dismiss the selection does not update the selected DOM range using character granularity
+ https://bugs.webkit.org/show_bug.cgi?id=170328
+ <rdar://problem/30904558>
+
+ Reviewed by Tim Horton.
+
+ Adds a new layout test verifying that when a user taps away to clear the current selection in character
+ granularity selection mode, the selected DOM range in the web process does not fall out of sync with UIKit's
+ selection views, which are dismissed.
+
+ * editing/selection/character-granularity-selected-range-after-dismissing-selection-expected.txt: Added.
+ * editing/selection/character-granularity-selected-range-after-dismissing-selection.html: Added.
+
2017-03-31 Youenn Fablet <youenn@apple.com>
Add a test to ensure webrtc generated certificates and names are ephemeral