Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / scroll / ScrollbarTheme.cpp
index f0e3515..6858d15 100644 (file)
 #include "platform/scroll/ScrollbarThemeMock.h"
 #include "platform/scroll/ScrollbarThemeOverlayMock.h"
 
+#if !OS(MACOSX)
+#include "public/platform/Platform.h"
+#include "public/platform/WebRect.h"
+#include "public/platform/default/WebThemeEngine.h"
+#endif
+
 namespace WebCore {
 
 ScrollbarTheme* ScrollbarTheme::theme()
@@ -292,7 +298,14 @@ int ScrollbarTheme::trackLength(ScrollbarThemeClient* scrollbar)
 
 void ScrollbarTheme::paintScrollCorner(GraphicsContext* context, const IntRect& cornerRect)
 {
+    if (cornerRect.isEmpty())
+        return;
+
+#if OS(MACOSX)
     context->fillRect(cornerRect, Color::white);
+#else
+    blink::Platform::current()->themeEngine()->paint(context->canvas(), blink::WebThemeEngine::PartScrollbarCorner, blink::WebThemeEngine::StateNormal, blink::WebRect(cornerRect), 0);
+#endif
 }
 
 IntRect ScrollbarTheme::thumbRect(ScrollbarThemeClient* scrollbar)