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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutScrollbar.h

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 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;
40 class LocalFrame; 36 class LocalFrame;
41 class Node; 37 class Node;
42 class PaintInvalidationState; 38 class LayoutBox;
39 class LayoutScrollbarPart;
40 class ComputedStyle;
43 41
44 class LayoutScrollbar final : public Scrollbar { 42 class LayoutScrollbar final : public Scrollbar {
45 public: 43 public:
46 static PassRefPtrWillBeRawPtr<Scrollbar> createCustomScrollbar(ScrollableAre a*, ScrollbarOrientation, Node*, LocalFrame* owningFrame = nullptr); 44 static PassRefPtrWillBeRawPtr<Scrollbar> createCustomScrollbar(ScrollableAre a*, ScrollbarOrientation, Node*, LocalFrame* owningFrame = nullptr);
47 ~LayoutScrollbar() override; 45 ~LayoutScrollbar() override;
48 46
49 LayoutBox* owningLayoutObject() const; 47 LayoutBox* owningLayoutObject() const;
50 LayoutBox* owningLayoutObjectWithinFrame() const; 48 LayoutBox* owningLayoutObjectWithinFrame() const;
51 49
52 IntRect buttonRect(ScrollbarPart) const; 50 IntRect buttonRect(ScrollbarPart) const;
53 IntRect trackRect(int startLength, int endLength) const; 51 IntRect trackRect(int startLength, int endLength) const;
54 IntRect trackPieceRectWithMargins(ScrollbarPart, const IntRect&) const; 52 IntRect trackPieceRectWithMargins(ScrollbarPart, const IntRect&) const;
55 53
56 int minimumThumbLength() const; 54 int minimumThumbLength() const;
57 55
58 bool isOverlayScrollbar() const override { return false; } 56 bool isOverlayScrollbar() const override { return false; }
59 57
60 LayoutScrollbarPart* getPart(ScrollbarPart partType) { return m_parts.get(pa rtType); } 58 LayoutScrollbarPart* getPart(ScrollbarPart partType) { return m_parts.get(pa rtType); }
61 const LayoutScrollbarPart* getPart(ScrollbarPart partType) const { return m_ parts.get(partType); } 59 const LayoutScrollbarPart* getPart(ScrollbarPart partType) const { return m_ parts.get(partType); }
62 60
63 void invalidateDisplayItemClientsOfScrollbarParts(const LayoutBoxModelObject & paintInvalidationContainer, const LayoutRect& paintInvalidationRect); 61 void invalidateRect(const IntRect&) override;
64 62
65 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
66 64
67 protected: 65 protected:
68 LayoutScrollbar(ScrollableArea*, ScrollbarOrientation, Node*, LocalFrame*); 66 LayoutScrollbar(ScrollableArea*, ScrollbarOrientation, Node*, LocalFrame*);
69 67
70 private: 68 private:
71 friend class Scrollbar; 69 friend class Scrollbar;
72 70
73 void setParent(Widget*) override; 71 void setParent(Widget*) override;
(...skipping 20 matching lines...) Expand all
94 RawPtrWillBeMember<LocalFrame> m_owningFrame; 92 RawPtrWillBeMember<LocalFrame> m_owningFrame;
95 93
96 HashMap<unsigned, LayoutScrollbarPart*> m_parts; 94 HashMap<unsigned, LayoutScrollbarPart*> m_parts;
97 }; 95 };
98 96
99 DEFINE_TYPE_CASTS(LayoutScrollbar, ScrollbarThemeClient, scrollbar, scrollbar->i sCustomScrollbar(), scrollbar.isCustomScrollbar()); 97 DEFINE_TYPE_CASTS(LayoutScrollbar, ScrollbarThemeClient, scrollbar, scrollbar->i sCustomScrollbar(), scrollbar.isCustomScrollbar());
100 98
101 } // namespace blink 99 } // namespace blink
102 100
103 #endif // LayoutScrollbar_h 101 #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