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

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: 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..1120378da9abda5c09dbe7df6eea57d0749e2609
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
@@ -0,0 +1,39 @@
+// 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 root-layer-scrolls launches.
+class CORE_EXPORT PaintInvalidationCapableScrollableArea : public ScrollableArea {
+public:
+ void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) override;
+ void invalidatePaintOfScrollControlsIfNeeded(const PaintInvalidationState&, const LayoutBoxModelObject& paintInvalidationContainer);
+
+private:
+ virtual LayoutBox& boxForScrollControlPaintInvalidation() const = 0;
+ virtual LayoutScrollbarPart* scrollCorner() const = 0;
+ virtual LayoutScrollbarPart* resizer() const = 0;
+
+ LayoutRect m_horizontalScrollbarPreviousPaintInvalidationRect;
+ LayoutRect m_verticalScrollbarPreviousPaintInvalidationRect;
+ LayoutRect m_scrollCornerPreviousPaintInvalidationRect;
+};
+
+} // namespace blink
+
+#endif // PaintInvalidationCapableScrollableArea_h

Powered by Google App Engine
This is Rietveld 408576698