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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h

Issue 1406133005: Calculate paint invalidation rect for scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsRebaselines for mac and windows etc 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/paint/PaintInvalidationCapableScrollableArea.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
new file mode 100644
index 0000000000000000000000000000000000000000..4fbe1ab14a50aeca0991678d70f35dbb41ab03e4
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PaintInvalidationCapableScrollableArea_h
+#define PaintInvalidationCapableScrollableArea_h
+
+#include "core/CoreExport.h"
+#include "platform/geometry/LayoutRect.h"
+#include "platform/scroll/ScrollableArea.h"
+
+namespace blink {
+
+class LayoutBox;
+class LayoutBoxModelObject;
+class LayoutScrollbarPart;
+class PaintInvalidationContainer;
+class PaintInvalidationState;
+
+// Base class of FrameView and PaintLayerScrollableArea to share paint invalidation code.
+// TODO(wangxianzhu): Combine this into PaintLayerScrollableArea when FrameView no longer scrolls.
+class CORE_EXPORT PaintInvalidationCapableScrollableArea : public ScrollableArea {
+public:
+ // The LayoutBox parameter is the LayoutView of a FrameView if the scrollbars belong to the FrameView,
+ // or the box() of a PaintLayerScrollbarArea if the scrollbars belong to the PaintLayerScrollableArea.
+ void willRemoveScrollbar(LayoutBox&, Scrollbar*, ScrollbarOrientation);
chrishtr 2015/11/17 00:44:32 I don't think the first argument is necessary. Bot
Xianzhu 2015/11/17 00:56:05 The two cases share common code in this class whic
Xianzhu 2015/11/17 18:31:36 'box()' done.
+
+ void invalidatePaintOfScrollControlsIfNeeded(LayoutBox& ownerBox, const PaintInvalidationState&, const LayoutBoxModelObject& paintInvalidationContainer, LayoutScrollbarPart* scrollCorner, LayoutScrollbarPart* resizer);
chrishtr 2015/11/17 00:44:32 Ditto.
+
+private:
+ void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) override { ASSERT_NOT_REACHED(); }
+
+ LayoutRect m_horizontalScrollbarPreviousPaintInvalidationRect;
+ LayoutRect m_verticalScrollbarPreviousPaintInvalidationRect;
+ LayoutRect m_scrollCornerPreviousPaintInvalidationRect;
+};
+
+} // namespace blink
+
+#endif // PaintInvalidationCapableScrollableArea_h

Powered by Google App Engine
This is Rietveld 408576698