Changeset 176415 in webkit
- Timestamp:
- Nov 20, 2014, 2:16:55 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
-
WebKit/mac/ChangeLog (modified) (1 diff)
-
WebKit/mac/WebView/WebActionMenuController.mm (modified) (2 diffs)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/mac/WKActionMenuController.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r176412 r176415 1 2014-11-20 Tim Horton <timothy_horton@apple.com> 2 3 Cancel DataDetectors menu earlier if we know it can't be presented 4 https://bugs.webkit.org/show_bug.cgi?id=138922 5 <rdar://problem/18950441> 6 7 Reviewed by Beth Dakin. 8 9 * WebView/WebActionMenuController.mm: 10 (-[WebActionMenuController prepareForMenu:withEvent:]): 11 Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate, 12 and use a bigger hammer (removeAllItems). 13 14 (-[WebActionMenuController willOpenMenu:withEvent:]): 15 If we end up with a menu with no items, don't change selection or anything. 16 1 17 2014-11-20 Beth Dakin <bdakin@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm
r176412 r176415 151 151 for (NSMenuItem *item in menuItems) 152 152 [actionMenu addItem:item]; 153 154 if (_type == WebActionMenuDataDetectedItem && _currentActionContext && ![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) { 155 [menu cancelTracking]; 156 [menu removeAllItems]; 157 } 153 158 } 154 159 … … 183 188 return; 184 189 190 if (!menu.numberOfItems) 191 return; 192 185 193 if (_type == WebActionMenuDataDetectedItem) { 186 if (![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) {187 [menu cancelTracking];188 return;189 }190 191 194 if (menu.numberOfItems == 1) 192 195 [[_webView _selectedOrMainFrame] _clearSelection]; -
trunk/Source/WebKit2/ChangeLog
r176414 r176415 1 2014-11-20 Tim Horton <timothy_horton@apple.com> 2 3 Cancel DataDetectors menu earlier if we know it can't be presented 4 https://bugs.webkit.org/show_bug.cgi?id=138922 5 <rdar://problem/18950441> 6 7 Reviewed by Beth Dakin. 8 9 * UIProcess/mac/WKActionMenuController.mm: 10 (-[WKActionMenuController willOpenMenu:withEvent:]): 11 If we end up with a menu with no items, don't change selection or anything. 12 13 (-[WKActionMenuController menuNeedsUpdate:]): 14 Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate, 15 and use a bigger hammer (removeAllItems). 16 1 17 2014-11-20 Tim Horton <timothy_horton@apple.com> 2 18 -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
r176414 r176415 193 193 return; 194 194 195 if (!menu.numberOfItems) 196 return; 197 195 198 if (_type == kWKActionMenuDataDetectedItem) { 196 if (_currentActionContext && ![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) {197 [menu cancelTracking];198 return;199 }200 199 if (menu.numberOfItems == 1) 201 200 _page->clearSelection(); … … 727 726 if (_state != ActionMenuState::Ready) 728 727 [self _updateActionMenuItems]; 728 729 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext && ![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) { 730 [menu cancelTracking]; 731 [menu removeAllItems]; 732 } 729 733 } 730 734
Note:
See TracChangeset
for help on using the changeset viewer.