Changeset 19810 in webkit
- Timestamp:
- Feb 22, 2007 3:49:13 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19809 r19810 1 2007-02-22 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Adam. Manual test added. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=12399 REGRESSION: 6 Unable to prevent default context menu from appearing. <rdar:// 7 problem/5017416> 8 9 This problem appeared because of two facets of the current context 10 menu design. First, all context menu events are now considered to 11 be "swallowed" since we take care of building up the regular 12 context menu through the defaultEventHandler(). Second, the context 13 menu controller holds onto it's context menu until a new one is 14 created. There would be logistical problems changing this since 15 AppKit relies on the menu being around for as long as it is 16 visible on the screen and we don't get any notification once the 17 menu is popped-down. 18 19 This patch fixes the problem by giving WebKit a way to clear the 20 controller's context menu. WebKit now clears the menu before it 21 propagates a new context menu event through the DOM. 22 23 * WebCore.exp: 24 * manual-tests/DOMContextMenuEvent.html: Added. 25 * page/ContextMenuController.cpp: 26 (WebCore::ContextMenuController::clearContextMenu): 27 * page/ContextMenuController.h: 28 1 29 2007-02-22 John Sullivan <sullivan@apple.com> 2 30 -
trunk/WebCore/WebCore.exp
r19764 r19810 306 306 __ZN7WebCore19TextResourceDecoderC1ERKNS_6StringERKNS_12TextEncodingE 307 307 __ZN7WebCore19TextResourceDecoderD1Ev 308 __ZN7WebCore21ContextMenuController16clearContextMenuEv 308 309 __ZN7WebCore21PlatformKeyboardEventC1EP7NSEventb 309 310 __ZN7WebCore21findEventWithKeyStateEPNS_5EventE -
trunk/WebCore/page/ContextMenuController.cpp
r19764 r19810 70 70 } 71 71 72 void ContextMenuController::clearContextMenu() 73 { 74 m_contextMenu.set(0); 75 } 76 72 77 void ContextMenuController::handleContextMenuEvent(Event* event) 73 78 { -
trunk/WebCore/page/ContextMenuController.h
r17910 r19810 49 49 50 50 ContextMenu* contextMenu() const { return m_contextMenu.get(); } 51 void clearContextMenu(); 51 52 52 53 void handleContextMenuEvent(Event*); -
trunk/WebKit/ChangeLog
r19794 r19810 1 2007-02-22 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Adam. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=12399 REGRESSION: 6 Unable to prevent default context menu from appearing. <rdar:// 7 problem/5017416> 8 9 * WebView/WebHTMLView.mm: 10 (-[WebHTMLView menuForEvent:]): Clear the controller's context menu 11 before propagating a new context menu event through the DOM. 12 1 13 2007-02-22 John Sullivan <sullivan@apple.com> 2 14 -
trunk/WebKit/WebView/WebHTMLView.mm
r19790 r19810 2628 2628 } 2629 2629 2630 Page* page = coreFrame->page(); 2631 if (!page) 2632 return nil; 2633 2634 page->contextMenuController()->clearContextMenu(); 2630 2635 handledEvent = coreFrame->eventHandler()->sendContextMenuEvent(PlatformMouseEvent(event)); 2631 2636 _private->handlingMouseDownEvent = NO; 2632 2637 2633 2638 if (!handledEvent) 2634 return nil;2635 2636 Page* page = coreFrame->page();2637 if (!page)2638 2639 return nil; 2639 2640
Note: See TracChangeset
for help on using the changeset viewer.