Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
index 9767274a2a6a1a2784f48e208702e6774aae7ad4..f5c9506e7b1f4fd7c1df4e0136dfd35e5504aa5e 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
@@ -969,7 +969,7 @@ void PaintLayerScrollableArea::updateAfterStyleChange( |
box().style()->visitedDependentColor(CSSPropertyBackgroundColor); |
if (newBackground != oldBackground) { |
- recalculateScrollbarOverlayStyle(newBackground); |
+ recalculateScrollbarOverlayStyle(newBackground, m_layer.isTransparent()); |
} |
} |
@@ -1273,6 +1273,25 @@ void PaintLayerScrollableArea::updateScrollCornerStyle() { |
} |
} |
+ScrollbarOverlayStyle PaintLayerScrollableArea::getScrollbarOverlayStyle() |
+ const { |
+ ScrollbarOverlayStyle style = ScrollableArea::getScrollbarOverlayStyle(); |
+ |
+ if (style == ScrollbarOverlayStyleDefault) { |
bokan
2016/10/18 19:55:25
ScrollableArea has a layoutBox() method that retur
|
+ PaintLayer* layer = &this->m_layer; |
+ while (layer->isTransparent() && layer->parent()) |
+ layer = layer->parent(); |
+ |
+ if (layer->layoutBox() && layer->layoutBox()->style()) { |
+ Color color = layer->layoutBox()->style()->visitedDependentColor( |
+ CSSPropertyBackgroundColor); |
+ style = calculateScrollbarOverlayStyle(color); |
+ } |
+ } |
+ |
+ return style; |
+} |
+ |
bool PaintLayerScrollableArea::hitTestOverflowControls( |
HitTestResult& result, |
const IntPoint& localPoint) { |