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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutScrollbarTheme.cpp

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 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
Index: third_party/WebKit/Source/core/layout/LayoutScrollbarTheme.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbarTheme.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbarTheme.cpp
index 7a945b5a61e7bd480e5d6602bdf0775c153dd4df..05844149c1f93723ae155cdd51c660ce5a1793fc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutScrollbarTheme.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutScrollbarTheme.cpp
@@ -25,9 +25,12 @@
#include "core/layout/LayoutScrollbarTheme.h"
+#include "core/layout/LayoutBox.h"
#include "core/layout/LayoutScrollbar.h"
+#include "core/page/Page.h"
#include "core/paint/ScrollbarPainter.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/GraphicsScreen.h"
#include "platform/graphics/paint/DrawingRecorder.h"
#include "platform/scroll/ScrollbarThemeClient.h"
#include "wtf/StdLibExtras.h"
@@ -145,8 +148,15 @@ void LayoutScrollbarTheme::paintThumb(GraphicsContext& context, const ScrollbarT
ScrollbarPainter(toLayoutScrollbar(scrollbar)).paintPart(context, ThumbPart, rect);
}
+Page* LayoutScrollbarTheme::page(const ScrollbarThemeClient& scrollbar)
+{
+ return toLayoutScrollbar(scrollbar).owningLayoutObject()->frame()->page();
+}
+
void LayoutScrollbarTheme::paintTickmarks(GraphicsContext& context, const ScrollbarThemeClient& scrollbar, const IntRect& rect)
{
+ WillPaintForDevice device(Page::screenId(page(scrollbar)));
+
ScrollbarTheme::theme().paintTickmarks(context, scrollbar, rect);
}

Powered by Google App Engine
This is Rietveld 408576698