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

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

Issue 1406133005: Calculate paint invalidation rect for scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index 5313853971f78c318f8c62e23ac8dded92e9d190..18b2dbe696e4b951579933ee764331264a55a631 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -455,12 +455,14 @@ void LayoutView::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
return;
if (LayoutBox* obj = owner->layoutBox()) {
- // Intersect the viewport with the paint invalidation rect.
- LayoutRect viewRectangle = viewRect();
- rect.intersect(viewRectangle);
+ if (!state || !state->viewClippingAndScrollOffsetDisabled()) {
+ // Intersect the viewport with the paint invalidation rect.
+ LayoutRect viewRectangle = viewRect();
+ rect.intersect(viewRectangle);
- // Adjust for scroll offset of the view.
- rect.moveBy(-viewRectangle.location());
+ // Adjust for scroll offset of the view.
+ rect.moveBy(-viewRectangle.location());
+ }
// Adjust for frame border.
rect.move(obj->contentBoxOffset());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTheme.cpp ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698