Changeset 85259 in webkit
- Timestamp:
- Apr 28, 2011 4:44:26 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85256 r85259 1 2011-04-28 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Right-clicking on a Flash movie in an iframe shows the browser context menu 6 https://bugs.webkit.org/show_bug.cgi?id=59760 7 <rdar://problem/9340541> 8 9 Move context menu event handling out into a separate function. Make sure to call 10 EventHandler::sendContextMenuEvent on the event handler belonging to the frame of the 11 node that was clicked, and not the main frame. 12 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::handleContextMenuEvent): 15 (WebKit::handleMouseEvent): 16 1 17 2011-04-28 Adam Barth <abarth@webkit.org> 2 18 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r84648 r85259 922 922 } 923 923 924 static bool handleContextMenuEvent(const PlatformMouseEvent& platformMouseEvent, Page* page) 925 { 926 IntPoint point = page->mainFrame()->view()->windowToContents(platformMouseEvent.pos()); 927 HitTestResult result = page->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false); 928 929 Frame* frame = page->mainFrame(); 930 if (result.innerNonSharedNode()) 931 frame = result.innerNonSharedNode()->document()->frame(); 932 933 bool handled = frame->eventHandler()->sendContextMenuEvent(platformMouseEvent); 934 if (handled) 935 page->chrome()->showContextMenu(); 936 937 return handled; 938 } 939 924 940 static bool handleMouseEvent(const WebMouseEvent& mouseEvent, Page* page) 925 941 { … … 937 953 938 954 bool handled = frame->eventHandler()->handleMousePressEvent(platformMouseEvent); 939 940 if (isContextClick(platformMouseEvent)) { 941 handled = frame->eventHandler()->sendContextMenuEvent(platformMouseEvent); 942 if (handled) 943 page->chrome()->showContextMenu(); 944 } 955 if (isContextClick(platformMouseEvent)) 956 handled = handleContextMenuEvent(platformMouseEvent, page); 945 957 946 958 return handled;
Note: See TracChangeset
for help on using the changeset viewer.