Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/FramePainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/FramePainter.cpp b/third_party/WebKit/Source/core/paint/FramePainter.cpp |
| index 447f20c8db45d7eb37087094a254490b83302eac..7e5fce775a81d4372cd38cd30e16f128ccc9882e 100644 |
| --- a/third_party/WebKit/Source/core/paint/FramePainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/FramePainter.cpp |
| @@ -228,8 +228,18 @@ void FramePainter::paintScrollCorner(GraphicsContext& context, |
| return; |
| } |
| - ScrollbarTheme::theme().paintScrollCorner(context, *frameView().layoutView(), |
| - cornerRect); |
| + ScrollbarTheme* theme = nullptr; |
| + |
| + if (frameView().horizontalScrollbar()) { |
| + theme = &frameView().horizontalScrollbar()->theme(); |
| + } else if (frameView().verticalScrollbar()) { |
| + theme = &frameView().verticalScrollbar()->theme(); |
| + } else { |
| + NOTREACHED(); |
| + theme = &ScrollbarTheme::theme(); |
|
bokan
2017/03/13 21:33:52
style guide says don't handle failing DCHECKs: htt
|
| + } |
| + |
| + theme->paintScrollCorner(context, *frameView().layoutView(), cornerRect); |
| } |
| void FramePainter::paintScrollbar(GraphicsContext& context, |