Title: [230686] trunk
Revision
230686
Author
megan_gard...@apple.com
Date
2018-04-16 15:46:47 -0700 (Mon, 16 Apr 2018)

Log Message

Switch to UIWKTextInteractionAssistant for non-editable text
https://bugs.webkit.org/show_bug.cgi?id=182834

Reviewed by Beth Dakin.
        
Source/WebKit:

Switch to only using one assistant for text selection.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView useSelectionAssistantWithGranularity:]):

LayoutTests:

Marking tests as flaky and to be fixed later.

* platform/ios-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (230685 => 230686)


--- trunk/LayoutTests/ChangeLog	2018-04-16 22:29:59 UTC (rev 230685)
+++ trunk/LayoutTests/ChangeLog	2018-04-16 22:46:47 UTC (rev 230686)
@@ -1,3 +1,14 @@
+2018-04-16  Megan Gardner  <megan_gard...@apple.com>
+
+        Switch to UIWKTextInteractionAssistant for non-editable text
+        https://bugs.webkit.org/show_bug.cgi?id=182834
+
+        Reviewed by Beth Dakin.
+        
+        Marking tests as flaky and to be fixed later.
+
+        * platform/ios-wk2/TestExpectations:
+
 2018-04-16  Youenn Fablet  <you...@apple.com>
 
         Use NetworkLoadChecker to handle synchronous HTTP loads

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (230685 => 230686)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-04-16 22:29:59 UTC (rev 230685)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-04-16 22:46:47 UTC (rev 230686)
@@ -1347,3 +1347,9 @@
 webkit.org/b/183860 [ Release ] http/wpt/service-workers/third-party-registration.html [ Skip ]
 
 webkit.org/b/184245 http/tests/workers/service/service-worker-cache-api.https.html [ Pass Failure ]
+
+#FIXME: Tests that fail when run after fast/events/ios/double-tap-zoom.html with UIWKTextInteractionAssistant turned on
+fast/flexbox/flexbox-fail-to-select-same-line.html [ ImageOnlyFailure Pass ]
+fast/text/international/hebrew-selection.html [ ImageOnlyFailure Pass ]
+imported/blink/editing/style/justify-left-crash.html [ ImageOnlyFailure Pass ]
+imported/blink/fast/css/user-select-none.html [ ImageOnlyFailure Pass ]

Modified: trunk/Source/WebKit/ChangeLog (230685 => 230686)


--- trunk/Source/WebKit/ChangeLog	2018-04-16 22:29:59 UTC (rev 230685)
+++ trunk/Source/WebKit/ChangeLog	2018-04-16 22:46:47 UTC (rev 230686)
@@ -1,3 +1,15 @@
+2018-04-16  Megan Gardner  <megan_gard...@apple.com>
+
+        Switch to UIWKTextInteractionAssistant for non-editable text
+        https://bugs.webkit.org/show_bug.cgi?id=182834
+
+        Reviewed by Beth Dakin.
+        
+        Switch to only using one assistant for text selection.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView useSelectionAssistantWithGranularity:]):
+
 2018-04-16  Youenn Fablet  <you...@apple.com>
 
         Use NetworkLoadChecker to handle synchronous HTTP loads

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (230685 => 230686)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-04-16 22:29:59 UTC (rev 230685)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-04-16 22:46:47 UTC (rev 230686)
@@ -1902,30 +1902,17 @@
 
 - (void)useSelectionAssistantWithGranularity:(WKSelectionGranularity)selectionGranularity
 {
-#if ENABLE(UNIFIED_TEXT_SELECTION)
-    selectionGranularity = WKSelectionGranularityCharacter;
-#endif
-    if (selectionGranularity == WKSelectionGranularityDynamic) {
-        if (_textSelectionAssistant) {
-            [_textSelectionAssistant deactivateSelection];
-            _textSelectionAssistant = nil;
-        }
-        if (!_webSelectionAssistant)
-            _webSelectionAssistant = adoptNS([[UIWKSelectionAssistant alloc] initWithView:self]);
-    } else if (selectionGranularity == WKSelectionGranularityCharacter) {
-        if (_webSelectionAssistant)
-            _webSelectionAssistant = nil;
+    _webSelectionAssistant = nil;
 
-        if (!_textSelectionAssistant)
-            _textSelectionAssistant = adoptNS([[UIWKTextInteractionAssistant alloc] initWithView:self]);
-        else {
-            // Reset the gesture recognizers in case editibility has changed.
-            [_textSelectionAssistant setGestureRecognizers];
-        }
+    if (!_textSelectionAssistant)
+        _textSelectionAssistant = adoptNS([[UIWKTextInteractionAssistant alloc] initWithView:self]);
+    else {
+        // Reset the gesture recognizers in case editibility has changed.
+        [_textSelectionAssistant setGestureRecognizers];
+    }
 
-        if (self.isFirstResponder && !self.suppressAssistantSelectionView)
-            [_textSelectionAssistant activateSelection];
-    }
+    if (self.isFirstResponder && !self.suppressAssistantSelectionView)
+        [_textSelectionAssistant activateSelection];
 }
 
 - (void)clearSelection
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to