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

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

Issue 512983005: Cleanup some touch adjustment FIXMEs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge with trunk Created 6 years, 3 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/rendering/HitTestResult.h ('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 9c4604f12e76c559f28e037a5d5a86293441e616..b7254e9552ff4068050132fa6afd5a28c3ef65d3 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -464,15 +464,19 @@ HitTestResult::NodeSet& HitTestResult::mutableRectBasedTestResult()
void HitTestResult::resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolvedPointInMainFrame)
{
- // FIXME: For maximum fidelity with point-based hit tests we should probably make use
- // of RenderObject::updateHitTestResult here. See http://crbug.com/398914.
ASSERT(isRectBasedTest());
ASSERT(m_hitTestLocation.containsPoint(resolvedPointInMainFrame));
- setInnerNode(resolvedInnerNode);
- setInnerNonSharedNode(resolvedInnerNode);
m_hitTestLocation = HitTestLocation(resolvedPointInMainFrame);
m_pointInInnerNodeFrame = resolvedPointInMainFrame;
+ m_innerNode = nullptr;
+ m_innerNonSharedNode = nullptr;
+ m_innerPossiblyPseudoNode = nullptr;
m_rectBasedTestResult = nullptr;
+
+ // Update the HitTestResult as if the supplied node had been hit in normal point-based hit-test.
+ // Note that we don't know the local point after a rect-based hit-test, but we never use
+ // it so shouldn't bother with the cost of computing it.
+ resolvedInnerNode->renderer()->updateHitTestResult(*this, LayoutPoint());
ASSERT(!isRectBasedTest());
}
« no previous file with comments | « Source/core/rendering/HitTestResult.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698