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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 1960373002: nodeAtPoint(): Perform the early-check EARLY. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 679e609fa7128b6df209dd295f46c1fa210cfa6e..9e576ef54cdb414a4cfb7b58ffc28eb177e2d9ea 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1501,20 +1501,16 @@ Node* LayoutBlock::nodeForHitTest() const
return isAnonymousBlockContinuation() ? continuation()->node() : node();
}
-bool LayoutBlock::nodeAtPoint(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
+bool LayoutBlock::hitTestOverflowControl(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& adjustedLocation)
{
- LayoutPoint adjustedLocation(accumulatedOffset + location());
- LayoutSize localOffset = toLayoutSize(adjustedLocation);
-
- if (isInSelfHitTestingPhase(hitTestAction)
- && visibleToHitTestRequest(result.hitTestRequest())
+ if (visibleToHitTestRequest(result.hitTestRequest())
&& isPointInOverflowControl(result, locationInContainer.point(), adjustedLocation)) {
- updateHitTestResult(result, locationInContainer.point() - localOffset);
+ updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
// FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet.
if (result.addNodeToListBasedTestResult(nodeForHitTest(), locationInContainer) == StopHitTesting)
return true;
}
- return LayoutBox::nodeAtPoint(result, locationInContainer, accumulatedOffset, hitTestAction);
+ return false;
}
bool LayoutBlock::hitTestChildren(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698