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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2203123004: Don't adjust for scrolling of the ancestor, rather than un-adjusting for it later. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 15ae442e9a9fb3ac1d7ab4b34e0fade56b777386..82b731257e74ac6a36394dd5e1f1f6ab1b78c99c 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2186,7 +2186,13 @@ IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co
ASSERT(m_frame->view() == this);
LayoutRect clipRect(LayoutPoint(), LayoutSize(visibleContentSize(scrollbarInclusion)));
- layoutViewItem().mapToVisualRectInAncestorSpace(&layoutView()->containerForPaintInvalidation(), clipRect);
+ const LayoutBoxModelObject* paintInvalidationContainer = &layoutView()->containerForPaintInvalidation();
+ layoutViewItem().mapToVisualRectInAncestorSpace(paintInvalidationContainer, clipRect);
+ if (paintInvalidationContainer->isBox()) {
+ const LayoutBox* box = toLayoutBox(paintInvalidationContainer);
+ if (box->hasOverflowClip())
+ clipRect.move(-box->scrolledContentOffset());
+ }
return enclosingIntRect(clipRect);
}

Powered by Google App Engine
This is Rietveld 408576698