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

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

Issue 1846953008: Clip visual rect with real overflow clip rect (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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 95d95708beb1699297998eb54c4eb55b97dd2459..b842d72539a3c8527614a8afaef4dd0f922a4d19 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -976,10 +976,8 @@ bool LayoutBox::applyOverflowClip(LayoutRect& rect, VisualRectFlags visualRectFl
flipForWritingMode(rect);
- // size() is inaccurate if we're in the middle of a layout of this LayoutBox, so use the
- // layer's size instead. Even if the layer's size is wrong, the layer itself will issue paint invalidations
- // anyway if its size does change.
- LayoutRect clipRect(LayoutPoint(), LayoutSize(layer()->size()));
+ LayoutRect clipRect = overflowClipRect(LayoutPoint());
+
bool doesIntersect;
if (visualRectFlags & EdgeInclusive) {
doesIntersect = rect.inclusiveIntersect(clipRect);

Powered by Google App Engine
This is Rietveld 408576698