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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutScrollbar.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/LayoutScrollbar.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
index ec94233154d2528f740ea3e93e6c53e085d67b39..f3016e76d1c3dcd71d0d22c6a0b8194fa6b0f6e7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
@@ -201,7 +201,7 @@ void LayoutScrollbar::updateScrollbarParts(bool destroy)
toLayoutBlock(box)->notifyScrollbarThicknessChanged();
box->setChildNeedsLayout();
if (m_scrollableArea)
- m_scrollableArea->invalidateScrollCorner(m_scrollableArea->scrollCornerRect());
+ m_scrollableArea->setScrollCornerNeedsPaintInvalidation();
}
}
}
@@ -362,15 +362,10 @@ int LayoutScrollbar::minimumThumbLength() const
return orientation() == HorizontalScrollbar ? partLayoutObject->size().width() : partLayoutObject->size().height();
}
-void LayoutScrollbar::invalidateRect(const IntRect& rect)
+void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts(const LayoutBoxModelObject& paintInvalidationContainer, const LayoutRect& paintInvalidationRect)
{
- Scrollbar::invalidateRect(rect);
-
- // FIXME: invalidate only the changed part.
- if (LayoutBox* owningLayoutObject = this->owningLayoutObject()) {
- for (auto& part : m_parts)
- owningLayoutObject->invalidateDisplayItemClientForNonCompositingDescendantsOf(*part.value);
- }
+ for (auto& part : m_parts)
+ part.value->invalidateDisplayItemClientsIncludingNonCompositingDescendants(&paintInvalidationContainer, PaintInvalidationScroll, &paintInvalidationRect);
}
}
« 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