Title: [266766] trunk/Source/WebKit
- Revision
- 266766
- Author
- [email protected]
- Date
- 2020-09-08 18:00:00 -0700 (Tue, 08 Sep 2020)
Log Message
Removed unneeded respondsToSelector checks on UIWKTextInteractionAssistant in WKContentViewInteraction.
https://bugs.webkit.org/show_bug.cgi?id=216204
Reviewed by Wenson Hsieh.
Over the years, we have had many selection and text interaction assistants, that may not have all
responded to the selectors we expect them to. This has left many respondsToSelector checks around that
should be removed, as they are unnecessary and an unneeded performance hit.
No behavior change, covered by existing tests.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _willStartScrollingOrZooming]):
(-[WKContentView _didEndScrollingOrZooming]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (266765 => 266766)
--- trunk/Source/WebKit/ChangeLog 2020-09-09 00:52:53 UTC (rev 266765)
+++ trunk/Source/WebKit/ChangeLog 2020-09-09 01:00:00 UTC (rev 266766)
@@ -1,3 +1,20 @@
+2020-09-08 Megan Gardner <[email protected]>
+
+ Removed unneeded respondsToSelector checks on UIWKTextInteractionAssistant in WKContentViewInteraction.
+ https://bugs.webkit.org/show_bug.cgi?id=216204
+
+ Reviewed by Wenson Hsieh.
+
+ Over the years, we have had many selection and text interaction assistants, that may not have all
+ responded to the selectors we expect them to. This has left many respondsToSelector checks around that
+ should be removed, as they are unnecessary and an unneeded performance hit.
+
+ No behavior change, covered by existing tests.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _willStartScrollingOrZooming]):
+ (-[WKContentView _didEndScrollingOrZooming]):
+
2020-09-08 Lauro Moura <[email protected]>
NetworkProcess: Check for invalid handle before writing salt file
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (266765 => 266766)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-09-09 00:52:53 UTC (rev 266765)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-09-09 01:00:00 UTC (rev 266766)
@@ -2904,10 +2904,7 @@
- (void)_willStartScrollingOrZooming
{
- if ([_textInteractionAssistant respondsToSelector:@selector(willStartScrollingOrZooming)])
- [_textInteractionAssistant willStartScrollingOrZooming];
- else
- [_textInteractionAssistant willStartScrollingOverflow];
+ [_textInteractionAssistant willStartScrollingOrZooming];
_page->setIsScrollingOrZooming(true);
#if PLATFORM(WATCHOS)
@@ -2926,12 +2923,8 @@
- (void)_didEndScrollingOrZooming
{
- if (!_needsDeferredEndScrollingSelectionUpdate) {
- if ([_textInteractionAssistant respondsToSelector:@selector(didEndScrollingOrZooming)])
- [_textInteractionAssistant didEndScrollingOrZooming];
- else
- [_textInteractionAssistant didEndScrollingOverflow];
- }
+ if (!_needsDeferredEndScrollingSelectionUpdate)
+ [_textInteractionAssistant didEndScrollingOrZooming];
_page->setIsScrollingOrZooming(false);
[self _resetPanningPreventionFlags];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes