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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1738503003: Fix overlay scroll bar color on elements with dark background (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with custom scroll bar style Created 4 years, 10 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/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 05c65b4af6f909da3e4182b525a67d124ed1a954..9bce6c9366ea35141621d66abfb939acf5ee148b 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -361,24 +361,6 @@ void FrameView::invalidateAllCustomScrollbarsOnActiveChanged()
recalculateCustomScrollbarStyle();
}
-void FrameView::recalculateScrollbarOverlayStyle()
-{
- ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle();
- ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault;
-
- Color backgroundColor = documentBackgroundColor();
- // Reduce the background color from RGB to a lightness value
- // and determine which scrollbar style to use based on a lightness
- // heuristic.
- double hue, saturation, lightness;
- backgroundColor.getHSL(hue, saturation, lightness);
- if (lightness <= .5)
- overlayStyle = ScrollbarOverlayStyleLight;
-
- if (oldOverlayStyle != overlayStyle)
- setScrollbarOverlayStyle(overlayStyle);
-}
-
void FrameView::clear()
{
reset();
@@ -1921,7 +1903,7 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor)
if (compositedLayerMapping->mainGraphicsLayer())
compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay();
}
- recalculateScrollbarOverlayStyle();
+ recalculateScrollbarOverlayStyle(documentBackgroundColor());
}
void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool transparent)

Powered by Google App Engine
This is Rietveld 408576698