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

Unified Diff: Source/core/paint/DeprecatedPaintLayerStackingNode.cpp

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove stray file Created 5 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
Index: Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp b/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
index 25b2fbac73fb1aaaeabe3d35e7233def7d6abb35..8557a3ef347e2a44f2e4d7fc7de20c0b19fc5447 100644
--- a/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
+++ b/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
@@ -340,21 +340,20 @@ LayoutBoxModelObject* DeprecatedPaintLayerStackingNode::layoutObject() const
bool DeprecatedPaintLayerStackingNode::hitTest(HitTestResult& result)
{
- return hitTest(result.hitTestRequest(), result.hitTestLocation(), result);
-}
-
-bool DeprecatedPaintLayerStackingNode::hitTest(const HitTestRequest& request, const HitTestLocation& hitTestLocation, HitTestResult& result)
-{
ASSERT(layer()->isSelfPaintingLayer() || layer()->hasSelfPaintingLayerDescendant());
// LayoutView should make sure to update layout before entering hit testing
ASSERT(!layoutObject()->frame()->view()->layoutPending());
ASSERT(!layoutObject()->document().layoutView()->needsLayout());
+ const HitTestRequest& request = result.hitTestRequest();
+ const HitTestLocation& hitTestLocation = result.hitTestLocation();
+
// Start with frameVisibleRect to ensure we include the scrollbars.
LayoutRect hitTestArea = frameVisibleRect(layoutObject());
if (request.ignoreClipping())
hitTestArea.unite(LayoutRect(layoutObject()->view()->documentRect()));
+ result.setValidityRect(boundingRect(hitTestLocation.point()));
DeprecatedPaintLayer* insideLayer = layer()->hitTestLayer(layer(), 0, result, hitTestArea, hitTestLocation, false);
if (!insideLayer) {

Powered by Google App Engine
This is Rietveld 408576698