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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index f9a33b271d147aa8670f16dfd4a5476719afa41e..92024711febbbe68c7d2ee83d9b10855be6adf22 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1201,6 +1201,12 @@ bool LayoutBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
return false;
}
+ bool shouldHitTestSelf = isInSelfHitTestingPhase(action);
+
+ if (shouldHitTestSelf && hasOverflowClip()
+ && hitTestOverflowControl(result, locationInContainer, adjustedLocation))
+ return true;
+
// TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer
// case, similar to overflow clip below.
bool skipChildren = false;
@@ -1227,7 +1233,7 @@ bool LayoutBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
return false;
// Now hit test ourselves.
- if (isInSelfHitTestingPhase(action) && visibleToHitTestRequest(result.hitTestRequest())) {
+ if (shouldHitTestSelf && visibleToHitTestRequest(result.hitTestRequest())) {
LayoutRect boundsRect(adjustedLocation, size());
if (locationInContainer.intersects(boundsRect)) {
updateHitTestResult(result, flipForWritingMode(locationInContainer.point() - toLayoutSize(adjustedLocation)));
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698