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

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

Issue 1856993004: Let mapToVisualRectInAncestorSpace apply ancestor clip if not scrollsOverflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Saturated
Patch Set: Use the same clip policy for slow path and fast path 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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 8a378d6480d9d4b66ca7bb03b504928f45dff90a..3933915728b822c0423cb2319c81f8c28f2793f6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1643,8 +1643,10 @@ bool LayoutObject::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an
if (parent->hasOverflowClip()) {
LayoutBox* parentBox = toLayoutBox(parent);
parentBox->mapScrollingContentsRectToBoxSpace(rect);
- if (parent != ancestor && !parentBox->applyOverflowClip(rect, visualRectFlags))
- return false;
+ if (parent != ancestor || !parentBox->scrollsOverflow()) {
+ if (!parentBox->applyOverflowClip(rect, visualRectFlags))
+ return false;
+ }
}
return parent->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFlags);

Powered by Google App Engine
This is Rietveld 408576698