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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h

Issue 2590163004: Aura overlay scrollbars shouldn't invalidate thumb on scroll or enabled state. (Closed)
Patch Set: Fix BUILD.gn, make MockScrollableArea constructor protected Created 3 years, 12 months 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 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Returns parts of the scrollbar which must be repainted following a change 86 // Returns parts of the scrollbar which must be repainted following a change
87 // in the thumb position, given scroll positions before and after. 87 // in the thumb position, given scroll positions before and after.
88 virtual ScrollbarPart invalidateOnThumbPositionChange( 88 virtual ScrollbarPart invalidateOnThumbPositionChange(
89 const ScrollbarThemeClient&, 89 const ScrollbarThemeClient&,
90 float oldPosition, 90 float oldPosition,
91 float newPosition) const { 91 float newPosition) const {
92 return AllParts; 92 return AllParts;
93 } 93 }
94 94
95 // Returns parts of the scrollbar which must be repainted following a change
96 // in enabled state.
97 virtual ScrollbarPart invalidateOnEnabledChange() const { return AllParts; }
98
95 virtual void paintScrollCorner(GraphicsContext&, 99 virtual void paintScrollCorner(GraphicsContext&,
96 const DisplayItemClient&, 100 const DisplayItemClient&,
97 const IntRect& cornerRect); 101 const IntRect& cornerRect);
98 virtual void paintTickmarks(GraphicsContext&, 102 virtual void paintTickmarks(GraphicsContext&,
99 const Scrollbar&, 103 const Scrollbar&,
100 const IntRect&); 104 const IntRect&);
101 105
102 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&, 106 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&,
103 const PlatformMouseEvent&); 107 const PlatformMouseEvent&);
104 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&, 108 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); 194 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart);
191 195
192 private: 196 private:
193 static ScrollbarTheme& 197 static ScrollbarTheme&
194 nativeTheme(); // Must be implemented to return the correct theme subclass. 198 nativeTheme(); // Must be implemented to return the correct theme subclass.
195 static bool gMockScrollbarsEnabled; 199 static bool gMockScrollbarsEnabled;
196 }; 200 };
197 201
198 } // namespace blink 202 } // namespace blink
199 #endif 203 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698