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

Unified Diff: Source/core/layout/HitTestResult.cpp

Issue 859943002: Use the composed tree for the title attributes in Shadow DOM (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests Created 5 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
« no previous file with comments | « LayoutTests/fast/dom/shadow/attr-title-inherit.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/HitTestResult.cpp
diff --git a/Source/core/layout/HitTestResult.cpp b/Source/core/layout/HitTestResult.cpp
index 8129c2799a98a5728f7103db2df6cbfe20610d6f..d9a94662efc02de935561e709f571a132580e7b3 100644
--- a/Source/core/layout/HitTestResult.cpp
+++ b/Source/core/layout/HitTestResult.cpp
@@ -25,6 +25,7 @@
#include "core/HTMLNames.h"
#include "core/dom/DocumentMarkerController.h"
#include "core/dom/NodeRenderingTraversal.h"
+#include "core/dom/shadow/ComposedTreeTraversal.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/editing/FrameSelection.h"
#include "core/fetch/ImageResource.h"
@@ -220,7 +221,7 @@ String HitTestResult::title(TextDirection& dir) const
dir = LTR;
// Find the title in the nearest enclosing DOM node.
// For <area> tags in image maps, walk the tree for the <area>, not the <img> using it.
- for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = titleNode->parentNode()) {
+ for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = ComposedTreeTraversal::parent(*titleNode)) {
if (titleNode->isElementNode()) {
String title = toElement(titleNode)->title();
if (!title.isNull()) {
« no previous file with comments | « LayoutTests/fast/dom/shadow/attr-title-inherit.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698