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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp

Issue 2006643004: Fix scrollbar buttons on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove function in themeEngine Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
index b88ec7fdcd07ca9af7ea02d6f244b0144e643356..4391acde0c8626c53125fa6cfd9ce904625ba7d4 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
@@ -323,8 +323,20 @@ ScrollbarPart ScrollbarThemeAura::invalidateOnThumbPositionChange(const Scrollba
return invalidParts;
}
+bool ScrollbarThemeAura::hasScrollbarButtons(ScrollbarOrientation orientation) const
+{
+ WebThemeEngine* themeEngine = Platform::current()->themeEngine();
+ if (orientation == VerticalScrollbar) {
+ return !themeEngine->getSize(WebThemeEngine::PartScrollbarDownArrow).isEmpty();
+ }
+ return !themeEngine->getSize(WebThemeEngine::PartScrollbarLeftArrow).isEmpty();
+};
+
IntSize ScrollbarThemeAura::buttonSize(const ScrollbarThemeClient& scrollbar)
{
+ if (!hasScrollbarButtons(scrollbar.orientation()))
+ return IntSize(0, 0);
+
if (scrollbar.orientation() == VerticalScrollbar) {
int squareSize = scrollbar.width();
return IntSize(squareSize, scrollbar.height() < 2 * squareSize ? scrollbar.height() / 2 : squareSize);

Powered by Google App Engine
This is Rietveld 408576698