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

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

Issue 1456953003: Revert of 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/LayoutScrollbar.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
index f3016e76d1c3dcd71d0d22c6a0b8194fa6b0f6e7..ec94233154d2528f740ea3e93e6c53e085d67b39 100644
--- a/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
@@ -201,7 +201,7 @@
toLayoutBlock(box)->notifyScrollbarThicknessChanged();
box->setChildNeedsLayout();
if (m_scrollableArea)
- m_scrollableArea->setScrollCornerNeedsPaintInvalidation();
+ m_scrollableArea->invalidateScrollCorner(m_scrollableArea->scrollCornerRect());
}
}
}
@@ -362,10 +362,15 @@
return orientation() == HorizontalScrollbar ? partLayoutObject->size().width() : partLayoutObject->size().height();
}
-void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts(const LayoutBoxModelObject& paintInvalidationContainer, const LayoutRect& paintInvalidationRect)
-{
- for (auto& part : m_parts)
- part.value->invalidateDisplayItemClientsIncludingNonCompositingDescendants(&paintInvalidationContainer, PaintInvalidationScroll, &paintInvalidationRect);
-}
-
-}
+void LayoutScrollbar::invalidateRect(const IntRect& rect)
+{
+ Scrollbar::invalidateRect(rect);
+
+ // FIXME: invalidate only the changed part.
+ if (LayoutBox* owningLayoutObject = this->owningLayoutObject()) {
+ for (auto& part : m_parts)
+ owningLayoutObject->invalidateDisplayItemClientForNonCompositingDescendantsOf(*part.value);
+ }
+}
+
+}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutScrollbar.h ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbarPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698