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) |