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

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

Issue 1897753002: Check scrollbars before hit testing border radius (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 5b1bf91dd065a1c214c59c753fc35394dc74636c..b1cd8da5da5b21d53557647fc35637b50762869f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1629,14 +1629,13 @@ bool LayoutBlock::hitTestChildren(HitTestResult& result, const HitTestLocation&
// TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer
// case, similar to overflow clip below.
if (hasOverflowClip() && !hasSelfPaintingLayer()) {
+ if (!locationInContainer.intersects(overflowClipRect(accumulatedOffset, IncludeOverlayScrollbarSize)))
chrishtr 2016/04/18 16:17:38 When would overflowClipRect(...) be smaller than s
+ return false;
if (style()->hasBorderRadius()) {
LayoutRect borderRect = borderBoxRect();
borderRect.moveBy(accumulatedOffset);
if (!locationInContainer.intersects(style()->getRoundedInnerBorderFor(borderRect)))
return false;
- } else {
- if (!locationInContainer.intersects(overflowClipRect(accumulatedOffset, IncludeOverlayScrollbarSize)))
- return false;
}
}

Powered by Google App Engine
This is Rietveld 408576698