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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1208423015: Make sendPings accommodate any context node. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | public/web/WebLocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index f2f27e96a06ecc697ab89372ba735b4cae9248d3..a6834e15275cfe97d04dd2a0564acbbc1cd7d68c 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -2042,12 +2042,12 @@ WebDevToolsAgent* WebLocalFrameImpl::devToolsAgent()
return m_devToolsAgent.get();
}
-void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destinationURL)
+void WebLocalFrameImpl::sendPings(const WebNode& contextNode, const WebURL& destinationURL)
{
ASSERT(frame());
- const Node* node = linkNode.constUnwrap<Node>();
- if (isHTMLAnchorElement(node))
- toHTMLAnchorElement(node)->sendPings(destinationURL);
+ Element* anchor = contextNode.constUnwrap<Node>()->enclosingLinkEventParentOrSelf();
+ if (isHTMLAnchorElement(anchor))
+ toHTMLAnchorElement(anchor)->sendPings(destinationURL);
}
WebURLRequest WebLocalFrameImpl::requestFromHistoryItem(const WebHistoryItem& item,
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698