Changeset 176570 in webkit
- Timestamp:
- Nov 28, 2014, 2:10:24 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/mac/WKActionMenuController.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r176569 r176570 1 2014-11-28 Tim Horton <timothy_horton@apple.com> 2 3 Stale userData is handed to WKView _actionMenuItemsForHitTestResult under prepareForMenu 4 https://bugs.webkit.org/show_bug.cgi?id=139069 5 <rdar://problem/19075587> 6 7 Reviewed by Sam Weinig. 8 9 * UIProcess/mac/WKActionMenuController.mm: 10 (-[WKActionMenuController wkView:willHandleMouseDown:]): 11 (-[WKActionMenuController didCloseMenu:withEvent:]): 12 (-[WKActionMenuController _clearActionMenuState]): 13 Previously, _userData was not being cleared in didCloseMenu, so a subsequent 14 action menu invocation would end up sending stale userData to _actionMenuItemsForHitTestResult. 15 16 Additionally, factor all of the cleanup code out into _clearActionMenuState, 17 and call it from both wkView:willHandleMouseDown: and didCloseMenu:withEvent:. 18 1 19 2014-11-26 Timothy Horton <timothy_horton@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
r176511 r176570 64 64 - (void)_showTextIndicator; 65 65 - (void)_hideTextIndicator; 66 - (void)_clearActionMenuState; 66 67 @end 67 68 … … 219 220 - (void)wkView:(WKView *)wkView willHandleMouseDown:(NSEvent *)event 220 221 { 221 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext && _hasActivatedActionContext) { 222 [getDDActionsManagerClass() didUseActions]; 223 _hasActivatedActionContext = NO; 224 } 222 [self _clearActionMenuState]; 225 223 } 226 224 … … 294 292 return; 295 293 294 [_previewPopover setBehavior:NSPopoverBehaviorTransient]; 295 if (!_shouldKeepPreviewPopoverOpen) 296 [self _clearPreviewPopover]; 297 298 [self _clearActionMenuState]; 299 } 300 301 - (void)_clearActionMenuState 302 { 296 303 if (_type == kWKActionMenuDataDetectedItem && _currentActionContext && _hasActivatedActionContext) { 297 304 [getDDActionsManagerClass() didUseActions]; 298 305 _hasActivatedActionContext = NO; 299 306 } 300 301 [_previewPopover setBehavior:NSPopoverBehaviorTransient];302 if (!_shouldKeepPreviewPopoverOpen)303 [self _clearPreviewPopover];304 307 305 308 _state = ActionMenuState::None; … … 308 311 _sharingServicePicker = nil; 309 312 _currentActionContext = nil; 313 _userData = nil; 310 314 } 311 315
Note:
See TracChangeset
for help on using the changeset viewer.