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

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

Issue 15932012: HitTestResult::innerElement should check its parent node for rendering and styling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/HitTestResult.cpp
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp
index af9c7c551c5a183e199db49bc4f559836dd3bd71..1d66c66cf864c9433ff30409496a7df894bc5864 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -26,6 +26,7 @@
#include "SVGNames.h"
#include "XLinkNames.h"
#include "core/dom/DocumentMarkerController.h"
+#include "core/dom/NodeRenderingTraversal.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/editing/FrameSelection.h"
#include "core/html/HTMLAnchorElement.h"
@@ -472,10 +473,10 @@ Node* HitTestResult::targetNode() const
Element* HitTestResult::innerElement() const
{
- for (Node* node = m_innerNode.get(); node; node = node->parentNode()) {
+ NodeRenderingTraversal::ParentDetails details;
+ for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::parent(node, &details))
if (node->isElementNode())
return toElement(node);
- }
return 0;
}
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698