Changeset 176480 in webkit
- Timestamp:
- Nov 21, 2014, 3:53:13 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/mac/WKView.mm (modified) (1 diff)
-
UIProcess/mac/WKActionMenuController.h (modified) (2 diffs)
-
UIProcess/mac/WKActionMenuController.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r176477 r176480 1 2014-11-21 Tim Horton <timothy_horton@apple.com> 2 3 REGRESSION (r176415): Can get stuck, unable to invoke any DataDetectors popovers 4 https://bugs.webkit.org/show_bug.cgi?id=138955 5 <rdar://problem/19056442> 6 7 Reviewed by Anders Carlsson. 8 9 * UIProcess/API/mac/WKView.mm: 10 (-[WKView mouseDown:]): 11 * UIProcess/mac/WKActionMenuController.h: 12 * UIProcess/mac/WKActionMenuController.mm: 13 (-[WKActionMenuController wkView:willHandleMouseDown:]): 14 (-[WKActionMenuController didCloseMenu:withEvent:]): 15 (-[WKActionMenuController menuNeedsUpdate:]): 16 Keep track of whether we have called shouldUseActionsWithContext: on a 17 DDActionContext; if we get a mouseDown without having seen didCloseMenu: 18 (and thus don't properly pair the shouldUseActionsWithContext: with a didUseActions), 19 tear down the old DDActionContext before proceeding. 20 1 21 2014-11-21 Tim Horton <timothy_horton@apple.com> 2 22 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r176462 r176480 1257 1257 [self _setMouseDownEvent:event]; 1258 1258 _data->_ignoringMouseDraggedEvents = NO; 1259 [_data->_actionMenuController wkView:self willHandleMouseDown:event]; 1259 1260 [self mouseDownInternal:event]; 1260 1261 } -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h
r176429 r176480 69 69 BOOL _isShowingTextIndicator; 70 70 BOOL _shouldKeepPreviewPopoverOpen; 71 BOOL _hasActivatedActionContext; 71 72 72 73 #if WK_API_ENABLED … … 83 84 - (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event; 84 85 - (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event; 86 - (void)wkView:(WKView *)wkView willHandleMouseDown:(NSEvent *)event; 85 87 86 88 - (void)didPerformActionMenuHitTest:(const WebKit::ActionMenuHitTestResult&)hitTestResult userData:(API::Object*)userData; -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
r176477 r176480 164 164 } 165 165 166 - (void)wkView:(WKView *)wkView willHandleMouseDown:(NSEvent *)event 167 { 168 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext && _hasActivatedActionContext) { 169 [getDDActionsManagerClass() didUseActions]; 170 _hasActivatedActionContext = NO; 171 } 172 } 173 166 174 - (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event 167 175 { … … 233 241 return; 234 242 235 if (_type == kWKActionMenuDataDetectedItem ) {236 if (_currentActionContext)237 [getDDActionsManagerClass() didUseActions];243 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext && _hasActivatedActionContext) { 244 [getDDActionsManagerClass() didUseActions]; 245 _hasActivatedActionContext = NO; 238 246 } 239 247 … … 780 788 [self _updateActionMenuItems]; 781 789 782 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext && ![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) { 783 [menu cancelTracking]; 784 [menu removeAllItems]; 790 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext) { 791 _hasActivatedActionContext = YES; 792 if (![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) { 793 [menu cancelTracking]; 794 [menu removeAllItems]; 795 } 785 796 } 786 797 }
Note:
See TracChangeset
for help on using the changeset viewer.