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

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

Issue 2509843004: Disable overlay scrollbars to hide them on non-Mac. (Closed)
Patch Set: Addressed feedback Created 4 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 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 virtual int scrollbarMargin() const { return 0; } 64 virtual int scrollbarMargin() const { return 0; }
65 65
66 virtual WebScrollbarButtonsPlacement buttonsPlacement() const { 66 virtual WebScrollbarButtonsPlacement buttonsPlacement() const {
67 return WebScrollbarButtonsPlacementSingle; 67 return WebScrollbarButtonsPlacementSingle;
68 } 68 }
69 69
70 virtual bool supportsControlTints() const { return false; } 70 virtual bool supportsControlTints() const { return false; }
71 virtual bool usesOverlayScrollbars() const { return false; } 71 virtual bool usesOverlayScrollbars() const { return false; }
72 virtual void updateScrollbarOverlayColorTheme(const ScrollbarThemeClient&) {} 72 virtual void updateScrollbarOverlayColorTheme(const ScrollbarThemeClient&) {}
73 73
74 // If true, scrollbars that become invisible (i.e. overlay scrollbars that
75 // fade out) should be marked as disabled. This option exists since Mac and
76 // Aura overlays implement the fade out differently, with Mac painting code
77 // fading out the scrollbars. Aura scrollbars require disabling the scrollbar
78 // to prevent painting it.
79 virtual bool disableInvisibleScrollbars() const { return true; }
jbroman 2016/11/18 19:00:27 nit: this name suggests that calling it disables t
bokan 2016/11/18 19:09:00 Good point, done.
80
74 virtual bool invalidateOnMouseEnterExit() { return false; } 81 virtual bool invalidateOnMouseEnterExit() { return false; }
75 virtual bool invalidateOnWindowActiveChange() const { return false; } 82 virtual bool invalidateOnWindowActiveChange() const { return false; }
76 83
77 // Returns parts of the scrollbar which must be repainted following a change 84 // Returns parts of the scrollbar which must be repainted following a change
78 // in the thumb position, given scroll positions before and after. 85 // in the thumb position, given scroll positions before and after.
79 virtual ScrollbarPart invalidateOnThumbPositionChange( 86 virtual ScrollbarPart invalidateOnThumbPositionChange(
80 const ScrollbarThemeClient&, 87 const ScrollbarThemeClient&,
81 float oldPosition, 88 float oldPosition,
82 float newPosition) const { 89 float newPosition) const {
83 return AllParts; 90 return AllParts;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); 188 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart);
182 189
183 private: 190 private:
184 static ScrollbarTheme& 191 static ScrollbarTheme&
185 nativeTheme(); // Must be implemented to return the correct theme subclass. 192 nativeTheme(); // Must be implemented to return the correct theme subclass.
186 static bool gMockScrollbarsEnabled; 193 static bool gMockScrollbarsEnabled;
187 }; 194 };
188 195
189 } // namespace blink 196 } // namespace blink
190 #endif 197 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698