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

Unified Diff: Source/core/layout/LayoutTable.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/LayoutTable.cpp
diff --git a/Source/core/layout/LayoutTable.cpp b/Source/core/layout/LayoutTable.cpp
index 4e65058dfcedb3385814390ee097275077377c49..8b5207b7a788039bca43e5fa2d2080e3fcc828ea 100644
--- a/Source/core/layout/LayoutTable.cpp
+++ b/Source/core/layout/LayoutTable.cpp
@@ -1340,7 +1340,8 @@ bool LayoutTable::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca
if (child->isBox() && !toLayoutBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child->isTableCaption())) {
LayoutPoint childPoint = flipForWritingModeForChild(toLayoutBox(child), adjustedLocation);
if (child->nodeAtPoint(result, locationInContainer, childPoint, action)) {
- updateHitTestResult(result, toLayoutPoint(locationInContainer.point() - childPoint));
+ // TODO(dtapuska): Calculate child's rect
+ updateHitTestResult(result, toLayoutPoint(locationInContainer.point() - childPoint), result.validityRect());
return true;
}
}
@@ -1350,11 +1351,11 @@ bool LayoutTable::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca
// Check our bounds next.
LayoutRect boundsRect(adjustedLocation, size());
if (visibleToHitTestRequest(result.hitTestRequest()) && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && locationInContainer.intersects(boundsRect)) {
- updateHitTestResult(result, flipForWritingMode(locationInContainer.point() - toLayoutSize(adjustedLocation)));
+ updateHitTestResult(result, flipForWritingMode(locationInContainer.point() - toLayoutSize(adjustedLocation)), boundsRect);
if (!result.addNodeToListBasedTestResult(node(), locationInContainer, boundsRect))
return true;
}
-
+ result.shrinkValidityRect(boundsRect);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698