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

Side by Side Diff: content/renderer/dom_utils.cc

Issue 384243004: Make <a ping> work for context menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address darin's comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/dom_utils.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/dom_utils.h"
6
7 #include "third_party/WebKit/public/web/WebNode.h"
8
9 namespace content {
10
11 blink::WebNode DomUtils::ExtractParentAnchorNode(
12 const blink::WebNode& node) {
13 blink::WebNode selected_node = node;
14
15 // If there are other embedded tags (like <a ..>Some <b>text</b></a>)
16 // we need to extract the parent <a/> node.
17 while (!selected_node.isLink() && !selected_node.parentNode().isNull())
18 selected_node = selected_node.parentNode();
19 return selected_node.isLink() ? selected_node : blink::WebNode();
20 }
21
22 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_utils.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698