Changeset 271445 in webkit
- Timestamp:
- Jan 13, 2021, 11:05:44 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.h (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r271440 r271445 1 2021-01-13 Megan Gardner <megan_gardner@apple.com> 2 3 Defer setting up app highlight menus until needed to not delay launch time. 4 https://bugs.webkit.org/show_bug.cgi?id=220577 5 rdar://72940219 6 7 Delay adding the app highlight menus to the callout bar until a selection happens, 8 as the creation of these menus is expensive, and they are only needed if a selection is 9 made on the page, which is not guaranteed to happen. 10 11 Reviewed by Tim Horton. 12 13 * UIProcess/ios/WKContentView.mm: 14 (-[WKContentView _processDidExit]): 15 * UIProcess/ios/WKContentViewInteraction.h: 16 * UIProcess/ios/WKContentViewInteraction.mm: 17 (-[WKContentView setUpInteraction]): 18 (-[WKContentView _selectionChanged]): 19 (-[WKContentView setupAppHighlightMenus]): 20 1 21 2021-01-13 Commit Queue <commit-queue@webkit.org> 2 22 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r271193 r271445 441 441 #endif 442 442 443 #if ENABLE(APP_HIGHLIGHTS) 444 BOOL _hasSetUpAppHighlightMenus; 445 #endif 446 443 447 #if PLATFORM(WATCHOS) 444 448 RetainPtr<WKFocusedFormControlView> _focusedFormControlView; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r271201 r271445 843 843 #endif 844 844 845 #if ENABLE(APP_HIGHLIGHTS)846 [self setupAppHighlightMenus];847 #endif848 849 845 _twoFingerSingleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_twoFingerSingleTapGestureRecognized:)]); 850 846 [_twoFingerSingleTapGestureRecognizer setAllowableMovement:60]; … … 6659 6655 - (void)_selectionChanged 6660 6656 { 6657 #if ENABLE(APP_HIGHLIGHTS) 6658 [self setUpAppHighlightMenus]; 6659 #endif 6660 6661 6661 [self _updateSelectionAssistantSuppressionState]; 6662 6662 … … 8685 8685 8686 8686 #if ENABLE(APP_HIGHLIGHTS) 8687 - (void)setupAppHighlightMenus 8688 { 8687 - (void)setUpAppHighlightMenus 8688 { 8689 if (_hasSetUpAppHighlightMenus) 8690 return; 8691 8689 8692 if (_page->preferences().appHighlightsEnabled()) { 8690 8693 auto addHighlightCurrentGroupItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToCurrentGroup() action:@selector(createHighlightInCurrentGroupWithRange:)]); 8691 8694 auto addHighlightNewGroupItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToNewGroup() action:@selector(createHighlightInNewGroupWithRange:)]); 8692 8695 [[UIMenuController sharedMenuController] setMenuItems:@[ addHighlightCurrentGroupItem.get(), addHighlightNewGroupItem.get() ]]; 8696 _hasSetUpAppHighlightMenus = YES; 8693 8697 } 8694 8698 }
Note:
See TracChangeset
for help on using the changeset viewer.