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

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

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
Index: Source/core/layout/LayoutInline.cpp
diff --git a/Source/core/layout/LayoutInline.cpp b/Source/core/layout/LayoutInline.cpp
index 1d3343a002aad3c72ff27c2e18e582c5749e980d..3c8b0a963f9584f262803fde0fa76773e76eb5c9 100644
--- a/Source/core/layout/LayoutInline.cpp
+++ b/Source/core/layout/LayoutInline.cpp
@@ -814,7 +814,8 @@ bool LayoutInline::hitTestCulledInline(HitTestResult& result, const HitTestLocat
generateCulledLineBoxRects(context, this);
if (context.intersected()) {
- updateHitTestResult(result, tmpLocation.point());
+ // TODO(dtapuska): Move the regionResult by accumulatedOffset
+ updateHitTestResult(result, tmpLocation.point(), result.validityRect());
// We can not use addNodeToListBasedTestResult to determine if we fully enclose the hit-test area
// because it can only handle rectangular targets.
result.addNodeToListBasedTestResult(node(), locationInContainer);
@@ -1232,11 +1233,12 @@ void LayoutInline::childBecameNonInline(LayoutObject* child)
splitFlow(beforeChild, newBox, child, oldContinuation);
}
-void LayoutInline::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
+void LayoutInline::updateHitTestResult(HitTestResult& result, const LayoutPoint& point, const LayoutRect& rect)
{
if (result.innerNode())
return;
+ result.intersectValidityRect(rect);
Node* n = node();
LayoutPoint localPoint(point);
if (n) {

Powered by Google App Engine
This is Rietveld 408576698