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

Unified Diff: third_party/WebKit/Source/core/paint/FramePainter.cpp

Issue 2741223002: Use correct ScrollbarTheme to paintScrollCorner (Closed)
Patch Set: remove NOTREACHED handler Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2ba8f3fd04a949705356eb42848a92f1662d5d0f 100644
--- a/third_party/WebKit/Source/core/paint/FramePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/FramePainter.cpp
@@ -228,8 +228,17 @@ 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->paintScrollCorner(context, *frameView().layoutView(), cornerRect);
}
void FramePainter::paintScrollbar(GraphicsContext& context,
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698