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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutScrollbar.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #ifndef LayoutScrollbar_h 26 #ifndef LayoutScrollbar_h
27 #define LayoutScrollbar_h 27 #define LayoutScrollbar_h
28 28
29 #include "core/style/ComputedStyleConstants.h" 29 #include "core/style/ComputedStyleConstants.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 #include "platform/scroll/Scrollbar.h" 31 #include "platform/scroll/Scrollbar.h"
32 #include "wtf/HashMap.h" 32 #include "wtf/HashMap.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class ComputedStyle;
37 class LayoutBox;
38 class LayoutBoxModelObject;
39 class LayoutScrollbarPart;
36 class LocalFrame; 40 class LocalFrame;
37 class Node; 41 class Node;
38 class LayoutBox; 42 class PaintInvalidationState;
39 class LayoutScrollbarPart;
40 class ComputedStyle;
41 43
42 class LayoutScrollbar final : public Scrollbar { 44 class LayoutScrollbar final : public Scrollbar {
43 public: 45 public:
44 static PassRefPtrWillBeRawPtr<Scrollbar> createCustomScrollbar(ScrollableAre a*, ScrollbarOrientation, Node*, LocalFrame* owningFrame = nullptr); 46 static PassRefPtrWillBeRawPtr<Scrollbar> createCustomScrollbar(ScrollableAre a*, ScrollbarOrientation, Node*, LocalFrame* owningFrame = nullptr);
45 ~LayoutScrollbar() override; 47 ~LayoutScrollbar() override;
46 48
47 LayoutBox* owningLayoutObject() const; 49 LayoutBox* owningLayoutObject() const;
48 LayoutBox* owningLayoutObjectWithinFrame() const; 50 LayoutBox* owningLayoutObjectWithinFrame() const;
49 51
50 IntRect buttonRect(ScrollbarPart) const; 52 IntRect buttonRect(ScrollbarPart) const;
51 IntRect trackRect(int startLength, int endLength) const; 53 IntRect trackRect(int startLength, int endLength) const;
52 IntRect trackPieceRectWithMargins(ScrollbarPart, const IntRect&) const; 54 IntRect trackPieceRectWithMargins(ScrollbarPart, const IntRect&) const;
53 55
54 int minimumThumbLength() const; 56 int minimumThumbLength() const;
55 57
56 bool isOverlayScrollbar() const override { return false; } 58 bool isOverlayScrollbar() const override { return false; }
57 59
58 LayoutScrollbarPart* getPart(ScrollbarPart partType) { return m_parts.get(pa rtType); } 60 LayoutScrollbarPart* getPart(ScrollbarPart partType) { return m_parts.get(pa rtType); }
59 const LayoutScrollbarPart* getPart(ScrollbarPart partType) const { return m_ parts.get(partType); } 61 const LayoutScrollbarPart* getPart(ScrollbarPart partType) const { return m_ parts.get(partType); }
60 62
61 void invalidateRect(const IntRect&) override; 63 void invalidateDisplayItemClientsOfScrollbarParts(const LayoutBoxModelObject & paintInvalidationContainer, const LayoutRect& paintInvalidationRect);
62 64
63 DECLARE_VIRTUAL_TRACE(); 65 DECLARE_VIRTUAL_TRACE();
64 66
65 protected: 67 protected:
66 LayoutScrollbar(ScrollableArea*, ScrollbarOrientation, Node*, LocalFrame*); 68 LayoutScrollbar(ScrollableArea*, ScrollbarOrientation, Node*, LocalFrame*);
67 69
68 private: 70 private:
69 friend class Scrollbar; 71 friend class Scrollbar;
70 72
71 void setParent(Widget*) override; 73 void setParent(Widget*) override;
(...skipping 20 matching lines...) Expand all
92 RawPtrWillBeMember<LocalFrame> m_owningFrame; 94 RawPtrWillBeMember<LocalFrame> m_owningFrame;
93 95
94 HashMap<unsigned, LayoutScrollbarPart*> m_parts; 96 HashMap<unsigned, LayoutScrollbarPart*> m_parts;
95 }; 97 };
96 98
97 DEFINE_TYPE_CASTS(LayoutScrollbar, ScrollbarThemeClient, scrollbar, scrollbar->i sCustomScrollbar(), scrollbar.isCustomScrollbar()); 99 DEFINE_TYPE_CASTS(LayoutScrollbar, ScrollbarThemeClient, scrollbar, scrollbar->i sCustomScrollbar(), scrollbar.isCustomScrollbar());
98 100
99 } // namespace blink 101 } // namespace blink
100 102
101 #endif // LayoutScrollbar_h 103 #endif // LayoutScrollbar_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698