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

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

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: update Created 4 years, 2 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 5cfb85f3f5f5fddc20055ed245de877eeb10987f..2eaf274ff1676034218b329dfa5548bd7d72697f 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2057,7 +2057,7 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor) {
if (compositedLayerMapping->mainGraphicsLayer())
compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay();
}
- recalculateScrollbarOverlayStyle(documentBackgroundColor());
+ recalculateScrollbarOverlayStyle(documentBackgroundColor(), isTransparent());
if (!shouldThrottleRendering())
page()->animator().scheduleVisualUpdate(m_frame.get());
@@ -2412,6 +2412,26 @@ void FrameView::scrollbarStyleChanged() {
positionScrollbarLayers();
}
+ScrollbarOverlayStyle FrameView::getScrollbarOverlayStyle() const {
+ ScrollbarOverlayStyle style = ScrollableArea::getScrollbarOverlayStyle();
+
+ if (style == ScrollbarOverlayStyleDefault) {
+ const FrameView* view = this;
+
+ while (view->isTransparent() && view->parentFrameView())
bokan 2016/10/18 19:55:25 I don't think this is doing what you want it to. F
+ view = view->parentFrameView();
+
+ if (view->viewportLayoutObject()) {
+ Color color =
+ view->viewportLayoutObject()->style()->visitedDependentColor(
+ CSSPropertyBackgroundColor);
+ style = calculateScrollbarOverlayStyle(color);
+ }
+ }
+
+ return style;
+}
+
void FrameView::notifyPageThatContentAreaWillPaint() const {
Page* page = m_frame->page();
if (!page)

Powered by Google App Engine
This is Rietveld 408576698