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

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, 7 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
« Source/core/dom/Document.cpp ('K') | « 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 384e6ddb4c82bec90a37491eea82a6b5e0cb85e8..753971246a87ef5d3e6b7ad90cec7f70a989d59a 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))
hayato 2013/06/05 01:47:43 Looks like we don't use details here, right? If w
tasak 2013/06/07 09:55:36 Yeah. I agree. I will do in another patch.
if (node->isElementNode())
return toElement(node);
- }
return 0;
}
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698