Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp

Issue 1668553003: Fix server-side image map click location with "Open link in new tab" Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appendServerMapMousePosition function made static Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
index cdd9c6fbb6f6d1ea873a1687edf2075da08398c2..5d3a719d5a2c0111fd320ec97eca4d149fd3bbff 100644
--- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
@@ -131,7 +131,7 @@ static String selectMisspellingAsync(LocalFrame* selectedFrame, String& descript
return markerRange->text();
}
-void ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu)
+void ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu, Event* event)
{
// Displaying the context menu in this function is a big hack as we don't
// have context, i.e. whether this is being invoked via a script or in
@@ -170,7 +170,9 @@ void ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu)
// Links, Images, Media tags, and Image/Media-Links take preference over
// all else.
- data.linkURL = r.absoluteLinkURL();
+ StringBuilder url;
zino 2016/02/05 05:47:34 Even if the target node is not image map link, Thi
+ HTMLAnchorElement::appendServerMapMousePosition(url, event);
+ data.linkURL = KURL(r.absoluteLinkURL(), url.toString());
if (r.innerNode()->isHTMLElement()) {
HTMLElement* htmlElement = toHTMLElement(r.innerNode());

Powered by Google App Engine
This is Rietveld 408576698