Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| index 960e797a567a0e278c8e0bfb066efd0e17373b59..6426723396324ac22260716b896c3a59ba1c52d5 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| @@ -69,6 +69,7 @@ |
| #include "platform/graphics/paint/TransformDisplayItem.h" |
| #include "platform/instrumentation/tracing/TraceEvent.h" |
| #include "platform/json/JSONValues.h" |
| +#include "platform/scroll/ScrollbarTheme.h" |
| namespace blink { |
| @@ -935,8 +936,9 @@ void PaintLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, |
| if (scrollbar) { |
| paintScrollbar(graphicsLayer, scrollbar, builder.context(), interestRect); |
| } else { |
| + ScrollbarTheme& theme = scrollbarThemeOfScrollCorner(); |
| FramePainter(*m_layoutView.frameView()) |
| - .paintScrollCorner(builder.context(), interestRect); |
| + .paintScrollCorner(builder.context(), theme, interestRect); |
| } |
| // Replay the painted scrollbar content with the GraphicsLayer backing as the |
| @@ -959,6 +961,17 @@ Scrollbar* PaintLayerCompositor::graphicsLayerToScrollbar( |
| return nullptr; |
| } |
| +ScrollbarTheme& PaintLayerCompositor::scrollbarThemeOfScrollCorner() const { |
|
bokan
2017/03/13 13:52:09
FramePainter keeps a reference to frameView itself
|
| + if (m_layoutView.frameView()->horizontalScrollbar()) |
| + return m_layoutView.frameView()->horizontalScrollbar()->theme(); |
| + |
| + if (m_layoutView.frameView()->verticalScrollbar()) |
| + return m_layoutView.frameView()->verticalScrollbar()->theme(); |
| + |
| + NOTREACHED(); |
| + return ScrollbarTheme::theme(); |
| +} |
| + |
| bool PaintLayerCompositor::supportsFixedRootBackgroundCompositing() const { |
| if (Settings* settings = m_layoutView.document().settings()) |
| return settings->getPreferCompositingToLCDTextEnabled(); |