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

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

Issue 1558493002: Reland: Make ScrollbarThemeAura selectively invalidate scrollbar parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ScrollableAreaTest.InvalidatesCompositedScrollbarsIfPartsNeedRepaint for Oilpan Created 4 years, 11 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual int scrollbarMargin() const { return 0; } 63 virtual int scrollbarMargin() const { return 0; }
64 64
65 virtual WebScrollbarButtonsPlacement buttonsPlacement() const { return WebSc rollbarButtonsPlacementSingle; } 65 virtual WebScrollbarButtonsPlacement buttonsPlacement() const { return WebSc rollbarButtonsPlacementSingle; }
66 66
67 virtual bool supportsControlTints() const { return false; } 67 virtual bool supportsControlTints() const { return false; }
68 virtual bool usesOverlayScrollbars() const { return false; } 68 virtual bool usesOverlayScrollbars() const { return false; }
69 virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient&) { } 69 virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient&) { }
70 70
71 virtual bool invalidateOnMouseEnterExit() { return false; } 71 virtual bool invalidateOnMouseEnterExit() { return false; }
72 virtual bool invalidateOnWindowActiveChange() const { return false; } 72 virtual bool invalidateOnWindowActiveChange() const { return false; }
73 virtual ScrollbarPart invalidateOnThumbPositionChange(const ScrollbarThemeCl ient&, float oldPosition, float newPosition) const { return AllParts; }
73 74
74 virtual void paintScrollCorner(GraphicsContext&, const DisplayItemClient&, c onst IntRect& cornerRect); 75 virtual void paintScrollCorner(GraphicsContext&, const DisplayItemClient&, c onst IntRect& cornerRect);
75 virtual void paintTickmarks(GraphicsContext&, const ScrollbarThemeClient&, c onst IntRect&) { } 76 virtual void paintTickmarks(GraphicsContext&, const ScrollbarThemeClient&, c onst IntRect&) { }
76 77
77 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&, const Platform MouseEvent&); 78 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&, const Platform MouseEvent&);
78 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&, const P latformMouseEvent&); 79 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&, const P latformMouseEvent&);
79 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, c onst PlatformMouseEvent&) { return false; } 80 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, c onst PlatformMouseEvent&) { return false; }
80 81
81 // The position of the thumb relative to the track. 82 // The position of the thumb relative to the track.
82 virtual int thumbPosition(const ScrollbarThemeClient&); 83 virtual int thumbPosition(const ScrollbarThemeClient&);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); 130 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart);
130 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); 131 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart);
131 132
132 private: 133 private:
133 static ScrollbarTheme& nativeTheme(); // Must be implemented to return the c orrect theme subclass. 134 static ScrollbarTheme& nativeTheme(); // Must be implemented to return the c orrect theme subclass.
134 static bool gMockScrollbarsEnabled; 135 static bool gMockScrollbarsEnabled;
135 }; 136 };
136 137
137 } 138 }
138 #endif 139 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698