Changeset 237331 in webkit
- Timestamp:
- Oct 22, 2018 2:22:36 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r237329 r237331 1 2018-10-22 Tim Horton <timothy_horton@apple.com> 2 3 Don't waste time under -setupInteraction under -initWithFrame for unparented WKWebViews 4 https://bugs.webkit.org/show_bug.cgi?id=190801 5 <rdar://problem/43674361> 6 7 Reviewed by Megan Gardner. 8 9 * UIProcess/ios/WKContentView.mm: 10 (-[WKContentView _commonInitializationWithProcessPool:configuration:]): 11 (-[WKContentView didMoveToWindow]): 12 Defer the first call to WKContentViewInteraction's -setupInteraction 13 until the view is parented. This avoids a few milliseconds of unnecessary 14 work for views that are never parented. 15 16 * UIProcess/ios/WKContentViewInteraction.h: 17 * UIProcess/ios/WKContentViewInteraction.mm: 18 (-[WKContentView setupInteraction]): 19 (-[WKContentView cleanupInteraction]): 20 Keep track of the current state of WKContentViewInteraction's gestures. 21 Use this to make it OK to call -setupInteraction multiple times. 22 1 23 2018-10-22 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebKit/UIProcess/ios/WKContentView.mm
r237266 r237331 219 219 [_fixedClippingView addSubview:_rootContentView.get()]; 220 220 221 [self setupInteraction];222 221 [self setUserInteractionEnabled:YES]; 223 222 … … 276 275 [self _updateForScreen:newWindow.screen]; 277 276 } 277 } 278 279 - (void)didMoveToWindow 280 { 281 [super didMoveToWindow]; 282 283 if (self.window) 284 [self setupInteraction]; 278 285 } 279 286 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r237305 r237331 278 278 BOOL _focusRequiresStrongPasswordAssistance; 279 279 280 BOOL _hasSetUpInteractions; 281 280 282 #if ENABLE(DATA_INTERACTION) 281 283 WebKit::DragDropInteractionState _dragDropInteractionState; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r237305 r237331 626 626 - (void)setupInteraction 627 627 { 628 if (_hasSetUpInteractions) 629 return; 630 628 631 if (!_interactionViewsContainerView) { 629 632 _interactionViewsContainerView = adoptNS([[UIView alloc] init]); … … 714 717 _dataListTextSuggestions = nil; 715 718 #endif 719 720 _hasSetUpInteractions = YES; 716 721 } 717 722 718 723 - (void)cleanupInteraction 719 724 { 725 if (!_hasSetUpInteractions) 726 return; 727 720 728 _webSelectionAssistant = nil; 721 729 _textSelectionAssistant = nil; … … 814 822 _dataListTextSuggestions = nil; 815 823 #endif 824 825 _hasSetUpInteractions = NO; 816 826 } 817 827
Note: See TracChangeset
for help on using the changeset viewer.