Title: [230745] trunk/Source/WebKit
- Revision
- 230745
- Author
- [email protected]
- Date
- 2018-04-17 18:03:22 -0700 (Tue, 17 Apr 2018)
Log Message
Don't activate selection on become first responder
https://bugs.webkit.org/show_bug.cgi?id=184719
Reviewed by Tim Horton.
If we activate the selection immediately on becoming first responder, we cause the selection view to delete itself
since it is not guaranteed to have selection rects immediately due to async/two process architecture. The selection
is activated already when the selection rects change, so there is no reason to activate it now. This has likely worked
in the past because this selection assistant was only for editable text, which would immediately set a caret, which
is a selection. Now that this is for non-editable text as well, activating the selection is problematic.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView becomeFirstResponderForWebView]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (230744 => 230745)
--- trunk/Source/WebKit/ChangeLog 2018-04-18 01:01:09 UTC (rev 230744)
+++ trunk/Source/WebKit/ChangeLog 2018-04-18 01:03:22 UTC (rev 230745)
@@ -1,3 +1,19 @@
+2018-04-17 Megan Gardner <[email protected]>
+
+ Don't activate selection on become first responder
+ https://bugs.webkit.org/show_bug.cgi?id=184719
+
+ Reviewed by Tim Horton.
+
+ If we activate the selection immediately on becoming first responder, we cause the selection view to delete itself
+ since it is not guaranteed to have selection rects immediately due to async/two process architecture. The selection
+ is activated already when the selection rects change, so there is no reason to activate it now. This has likely worked
+ in the past because this selection assistant was only for editable text, which would immediately set a caret, which
+ is a selection. Now that this is for non-editable text as well, activating the selection is problematic.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView becomeFirstResponderForWebView]):
+
2018-04-11 Brian Burg <[email protected]>
Web Automation: simulated mouse interactions should not be done until associated DOM events have been dispatched
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (230744 => 230745)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2018-04-18 01:01:09 UTC (rev 230744)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2018-04-18 01:03:22 UTC (rev 230745)
@@ -937,8 +937,6 @@
SetForScope<BOOL> becomingFirstResponder { _becomingFirstResponder, YES };
didBecomeFirstResponder = [super becomeFirstResponder];
}
- if (didBecomeFirstResponder && !self.suppressAssistantSelectionView)
- [_textSelectionAssistant activateSelection];
return didBecomeFirstResponder;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes