summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 18:52:09 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 18:52:09 +0000
commita3d79ab709a169177f8f82852e6bfe4ab81bc1a1 (patch)
treedc3aae86477e201324bb463285b612c40892df16
parentb4fc9c198c85039e15907ccbf99f4d7259d2f085 (diff)
downloadchromium_src-a3d79ab709a169177f8f82852e6bfe4ab81bc1a1.zip
chromium_src-a3d79ab709a169177f8f82852e6bfe4ab81bc1a1.tar.gz
chromium_src-a3d79ab709a169177f8f82852e6bfe4ab81bc1a1.tar.bz2
Adds WebThemeEngine, WebColor, and WebCanvas to the WebKit API (chrome-side).
R=dglazkov Review URL: http://codereview.chromium.org/40330 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11351 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS2
-rw-r--r--webkit/build/WebKit/WebKit.vcproj16
-rw-r--r--webkit/build/WebKit/using_WebKit.vsprops3
-rw-r--r--webkit/build/webkit_common_includes.vsprops2
-rw-r--r--webkit/glue/chromium_bridge_impl.cc100
-rw-r--r--webkit/glue/webkitclient_impl.cc18
-rw-r--r--webkit/glue/webkitclient_impl.h9
-rw-r--r--webkit/glue/webthemeengine_impl_win.cc103
-rw-r--r--webkit/glue/webthemeengine_impl_win.h38
-rw-r--r--webkit/webkit.gyp7
10 files changed, 192 insertions, 106 deletions
diff --git a/DEPS b/DEPS
index d6894cd..3b2d552 100644
--- a/DEPS
+++ b/DEPS
@@ -19,7 +19,7 @@ deps = {
"http://googletest.googlecode.com/svn/trunk@167",
"src/third_party/WebKit":
- "/trunk/deps/third_party/WebKit@11310",
+ "/trunk/deps/third_party/WebKit@11347",
"src/third_party/icu38":
"/trunk/deps/third_party/icu38@10692",
diff --git a/webkit/build/WebKit/WebKit.vcproj b/webkit/build/WebKit/WebKit.vcproj
index 6b798b7..14fe0c7 100644
--- a/webkit/build/WebKit/WebKit.vcproj
+++ b/webkit/build/WebKit/WebKit.vcproj
@@ -128,10 +128,18 @@
Name="public"
>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebCanvas.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebClipboard.h"
>
</File>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebColor.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebCommon.h"
>
</File>
@@ -171,6 +179,14 @@
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebURL.h"
>
</File>
+ <Filter
+ Name="win"
+ >
+ <File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\win\WebThemeEngine.h"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="src"
diff --git a/webkit/build/WebKit/using_WebKit.vsprops b/webkit/build/WebKit/using_WebKit.vsprops
index ef0ae20..fe1effd 100644
--- a/webkit/build/WebKit/using_WebKit.vsprops
+++ b/webkit/build/WebKit/using_WebKit.vsprops
@@ -3,10 +3,11 @@
ProjectType="Visual C++"
Version="8.00"
Name="using_WebKit"
+ InheritedPropertySheets="$(SolutionDir)..\skia\using_skia.vsprops"
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public"
+ AdditionalIncludeDirectories="$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public\win"
PreprocessorDefinitions="WEBKIT_USING_SKIA=1"
WarnAsError="true"
/>
diff --git a/webkit/build/webkit_common_includes.vsprops b/webkit/build/webkit_common_includes.vsprops
index 79f3457..446060f 100644
--- a/webkit/build/webkit_common_includes.vsprops
+++ b/webkit/build/webkit_common_includes.vsprops
@@ -6,6 +6,6 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(OutDir)\obj\WebCore&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders\JavaScriptCore&quot;;$(SolutionDir)..\webkit\pending;$(SolutionDir)..\webkit\port\bridge;&quot;$(ProjectDir)&quot;;$(SolutionDir)..\third_party\WebKit\WebCore;$(SolutionDir)..\third_party\WebKit\WebCore\bindings\v8;$(SolutionDir)..\third_party\WebKit\WebCore\bridge;$(SolutionDir)..\third_party\WebKit\WebCore\bridge\c;$(SolutionDir)..\third_party\WebKit\WebCore\css;$(SolutionDir)..\third_party\WebKit\WebCore\dom;$(SolutionDir)..\third_party\WebKit\WebCore\editing;$(SolutionDir)..\third_party\WebKit\WebCore\history;$(SolutionDir)..\third_party\WebKit\WebCore\html;$(SolutionDir)..\third_party\WebKit\WebCore\loader;$(SolutionDir)..\third_party\WebKit\WebCore\loader\appcache;$(SolutionDir)..\third_party\WebKit\WebCore\loader\archive;$(SolutionDir)..\third_party\WebKit\WebCore\loader\icon;$(SolutionDir)..\third_party\WebKit\WebCore\page;$(SolutionDir)..\third_party\WebKit\WebCore\page\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform;$(SolutionDir)..\third_party\WebKit\WebCore\platform\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-decoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-encoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\page\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\text;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\opentype;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\transforms;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\skia;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\sql;$(SolutionDir)..\third_party\WebKit\WebCore\rendering;$(SolutionDir)..\third_party\WebKit\WebCore\rendering\style;$(SolutionDir)..\third_party\WebKit\WebCore\storage;$(SolutionDir)..\third_party\WebKit\WebCore\xml;&quot;$(SolutionDir)..\third_party\WebKit\WebCore\os-win32&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\wtf;$(SolutionDir)..\third_party\WebKit\JavaScriptCore;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\wtf;&quot;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\os-win32&quot;;..\..\build;&quot;$(SDKIncludes)&quot;;&quot;$(IntDir)\..\WebCore\DerivedSources&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\svg;$(SolutionDir)..\third_party\WebKit\WebCore\svg\animation;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics\filters;$(SolutionDir)..\third_party\WebKit\WebCore\plugins;$(SolutionDir)..\third_party\WebKit\WebCore\inspector;$(SolutionDir)..\third_party\WebKit\WebCore\workers;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public;$(SolutionDir)..\third_party\sqlite\preprocessed"
+ AdditionalIncludeDirectories="&quot;$(OutDir)\obj\WebCore&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders\JavaScriptCore&quot;;$(SolutionDir)..\webkit\pending;$(SolutionDir)..\webkit\port\bridge;&quot;$(ProjectDir)&quot;;$(SolutionDir)..\third_party\WebKit\WebCore;$(SolutionDir)..\third_party\WebKit\WebCore\bindings\v8;$(SolutionDir)..\third_party\WebKit\WebCore\bridge;$(SolutionDir)..\third_party\WebKit\WebCore\bridge\c;$(SolutionDir)..\third_party\WebKit\WebCore\css;$(SolutionDir)..\third_party\WebKit\WebCore\dom;$(SolutionDir)..\third_party\WebKit\WebCore\editing;$(SolutionDir)..\third_party\WebKit\WebCore\history;$(SolutionDir)..\third_party\WebKit\WebCore\html;$(SolutionDir)..\third_party\WebKit\WebCore\loader;$(SolutionDir)..\third_party\WebKit\WebCore\loader\appcache;$(SolutionDir)..\third_party\WebKit\WebCore\loader\archive;$(SolutionDir)..\third_party\WebKit\WebCore\loader\icon;$(SolutionDir)..\third_party\WebKit\WebCore\page;$(SolutionDir)..\third_party\WebKit\WebCore\page\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform;$(SolutionDir)..\third_party\WebKit\WebCore\platform\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-decoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-encoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\page\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\text;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\opentype;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\transforms;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\skia;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\sql;$(SolutionDir)..\third_party\WebKit\WebCore\rendering;$(SolutionDir)..\third_party\WebKit\WebCore\rendering\style;$(SolutionDir)..\third_party\WebKit\WebCore\storage;$(SolutionDir)..\third_party\WebKit\WebCore\xml;&quot;$(SolutionDir)..\third_party\WebKit\WebCore\os-win32&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\wtf;$(SolutionDir)..\third_party\WebKit\JavaScriptCore;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\wtf;&quot;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\os-win32&quot;;..\..\build;&quot;$(SDKIncludes)&quot;;&quot;$(IntDir)\..\WebCore\DerivedSources&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\svg;$(SolutionDir)..\third_party\WebKit\WebCore\svg\animation;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics\filters;$(SolutionDir)..\third_party\WebKit\WebCore\plugins;$(SolutionDir)..\third_party\WebKit\WebCore\inspector;$(SolutionDir)..\third_party\WebKit\WebCore\workers;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public\win;$(SolutionDir)..\third_party\sqlite\preprocessed"
/>
</VisualStudioPropertySheet>
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index e603d96..05d7472 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -57,17 +57,6 @@ gfx::NativeViewId ToNativeId(WebCore::Widget* widget) {
return widget->root()->hostWindow()->platformWindow();
}
-#if PLATFORM(WIN_OS)
-static RECT IntRectToRECT(const WebCore::IntRect& r) {
- RECT result;
- result.left = r.x();
- result.top = r.y();
- result.right = r.right();
- result.bottom = r.bottom();
- return result;
-}
-#endif
-
ChromeClientImpl* ToChromeClient(WebCore::Widget* widget) {
WebCore::FrameView* view;
if (widget->isFrameView()) {
@@ -205,95 +194,6 @@ IntRect ChromiumBridge::screenAvailableRect(Widget* widget) {
webkit_glue::GetScreenInfo(ToNativeId(widget)).available_rect);
}
-// Theming --------------------------------------------------------------------
-
-#if PLATFORM(WIN_OS)
-
-void ChromiumBridge::paintButton(
- GraphicsContext* gc, int part, int state, int classic_state,
- const IntRect& rect) {
- skia::PlatformCanvas* canvas = gc->platformContext()->canvas();
- HDC hdc = canvas->beginPlatformPaint();
-
- RECT native_rect = IntRectToRECT(rect);
- gfx::NativeTheme::instance()->PaintButton(
- hdc, part, state, classic_state, &native_rect);
-
- canvas->endPlatformPaint();
-}
-
-void ChromiumBridge::paintMenuList(
- GraphicsContext* gc, int part, int state, int classic_state,
- const IntRect& rect) {
- skia::PlatformCanvas* canvas = gc->platformContext()->canvas();
- HDC hdc = canvas->beginPlatformPaint();
-
- RECT native_rect = IntRectToRECT(rect);
- gfx::NativeTheme::instance()->PaintMenuList(
- hdc, part, state, classic_state, &native_rect);
-
- canvas->endPlatformPaint();
-}
-
-void ChromiumBridge::paintScrollbarArrow(
- GraphicsContext* gc, int state, int classic_state, const IntRect& rect) {
- skia::PlatformCanvas* canvas = gc->platformContext()->canvas();
- HDC hdc = canvas->beginPlatformPaint();
-
- RECT native_rect = IntRectToRECT(rect);
- gfx::NativeTheme::instance()->PaintScrollbarArrow(
- hdc, state, classic_state, &native_rect);
-
- canvas->endPlatformPaint();
-}
-
-void ChromiumBridge::paintScrollbarThumb(
- GraphicsContext* gc, int part, int state, int classic_state,
- const IntRect& rect) {
- skia::PlatformCanvas* canvas = gc->platformContext()->canvas();
- HDC hdc = canvas->beginPlatformPaint();
-
- RECT native_rect = IntRectToRECT(rect);
- gfx::NativeTheme::instance()->PaintScrollbarThumb(
- hdc, part, state, classic_state, &native_rect);
-
- canvas->endPlatformPaint();
-}
-
-void ChromiumBridge::paintScrollbarTrack(
- GraphicsContext* gc, int part, int state, int classic_state,
- const IntRect& rect, const IntRect& align_rect) {
- skia::PlatformCanvas* canvas = gc->platformContext()->canvas();
- HDC hdc = canvas->beginPlatformPaint();
-
- RECT native_rect = IntRectToRECT(rect);
- RECT native_align_rect = IntRectToRECT(align_rect);
- gfx::NativeTheme::instance()->PaintScrollbarTrack(
- hdc, part, state, classic_state, &native_rect, &native_align_rect,
- canvas);
-
- canvas->endPlatformPaint();
-}
-
-void ChromiumBridge::paintTextField(
- GraphicsContext* gc, int part, int state, int classic_state,
- const IntRect& rect, const Color& color, bool fill_content_area,
- bool draw_edges) {
- skia::PlatformCanvas* canvas = gc->platformContext()->canvas();
- HDC hdc = canvas->beginPlatformPaint();
-
- RECT native_rect = IntRectToRECT(rect);
- COLORREF clr = skia::SkColorToCOLORREF(color.rgb());
-
- gfx::NativeTheme::instance()->PaintTextField(
- hdc, part, state, classic_state, &native_rect, clr, fill_content_area,
- draw_edges);
-
- canvas->endPlatformPaint();
-}
-
-#endif
-
// URL ------------------------------------------------------------------------
KURL ChromiumBridge::inspectorURL() {
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 8966381..3eaa180 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -12,6 +12,10 @@
#include "grit/webkit_resources.h"
#include "webkit/glue/webkit_glue.h"
+using WebKit::WebClipboard;
+using WebKit::WebCString;
+using WebKit::WebThemeEngine;
+
namespace webkit_glue {
WebKitClientImpl::WebKitClientImpl()
@@ -19,10 +23,18 @@ WebKitClientImpl::WebKitClientImpl()
shared_timer_func_(NULL) {
}
-WebKit::WebClipboard* WebKitClientImpl::clipboard() {
+WebClipboard* WebKitClientImpl::clipboard() {
return &clipboard_;
}
+WebThemeEngine* WebKitClientImpl::themeEngine() {
+#if defined(OS_WIN)
+ return &theme_engine_;
+#else
+ return NULL;
+#endif
+}
+
void WebKitClientImpl::decrementStatsCounter(const char* name) {
StatsCounter(name).Decrement();
}
@@ -41,7 +53,7 @@ void WebKitClientImpl::traceEventEnd(const char* name, void* id,
TRACE_EVENT_END(name, id, extra);
}
-WebKit::WebCString WebKitClientImpl::loadResource(const char* name) {
+WebCString WebKitClientImpl::loadResource(const char* name) {
struct {
const char* name;
int id;
@@ -62,7 +74,7 @@ WebKit::WebCString WebKitClientImpl::loadResource(const char* name) {
return webkit_glue::GetDataResource(resources[i].id);
}
NOTREACHED() << "Unknown image resource " << name;
- return WebKit::WebCString();
+ return WebCString();
}
double WebKitClientImpl::currentTime() {
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index 1b8ae85..ab6926b 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -11,6 +11,10 @@
#include "base/timer.h"
#include "webkit/glue/webclipboard_impl.h"
+#if defined(OS_WIN)
+#include "webkit/glue/webthemeengine_impl_win.h"
+#endif
+
class MessageLoop;
namespace webkit_glue {
@@ -21,6 +25,7 @@ class WebKitClientImpl : public WebKit::WebKitClient {
// WebKitClient methods (partial implementation):
virtual WebKit::WebClipboard* clipboard();
+ virtual WebKit::WebThemeEngine* themeEngine();
virtual void decrementStatsCounter(const char* name);
virtual void incrementStatsCounter(const char* name);
virtual void traceEventBegin(const char* name, void* id, const char* extra);
@@ -42,6 +47,10 @@ class WebKitClientImpl : public WebKit::WebKitClient {
MessageLoop* main_loop_;
base::OneShotTimer<WebKitClientImpl> shared_timer_;
void (*shared_timer_func_)();
+
+#if defined(OS_WIN)
+ WebThemeEngineImpl theme_engine_;
+#endif
};
} // namespace webkit_glue
diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/glue/webthemeengine_impl_win.cc
new file mode 100644
index 0000000..f06921c
--- /dev/null
+++ b/webkit/glue/webthemeengine_impl_win.cc
@@ -0,0 +1,103 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#include "webkit/glue/webthemeengine_impl_win.h"
+
+#include "WebRect.h"
+
+#include "base/gfx/native_theme.h"
+
+using WebKit::WebCanvas;
+using WebKit::WebColor;
+using WebKit::WebRect;
+
+namespace webkit_glue {
+
+static RECT WebRectToRECT(const WebRect& rect) {
+ RECT result;
+ result.left = rect.x;
+ result.top = rect.y;
+ result.right = rect.x + rect.width;
+ result.bottom = rect.y + rect.height;
+ return result;
+}
+
+void WebThemeEngineImpl::paintButton(
+ WebCanvas* canvas, int part, int state, int classic_state,
+ const WebRect& rect) {
+ HDC hdc = canvas->beginPlatformPaint();
+
+ RECT native_rect = WebRectToRECT(rect);
+ gfx::NativeTheme::instance()->PaintButton(
+ hdc, part, state, classic_state, &native_rect);
+
+ canvas->endPlatformPaint();
+}
+
+void WebThemeEngineImpl::paintMenuList(
+ WebCanvas* canvas, int part, int state, int classic_state,
+ const WebRect& rect) {
+ HDC hdc = canvas->beginPlatformPaint();
+
+ RECT native_rect = WebRectToRECT(rect);
+ gfx::NativeTheme::instance()->PaintMenuList(
+ hdc, part, state, classic_state, &native_rect);
+
+ canvas->endPlatformPaint();
+}
+
+void WebThemeEngineImpl::paintScrollbarArrow(
+ WebCanvas* canvas, int state, int classic_state,
+ const WebRect& rect) {
+ HDC hdc = canvas->beginPlatformPaint();
+
+ RECT native_rect = WebRectToRECT(rect);
+ gfx::NativeTheme::instance()->PaintScrollbarArrow(
+ hdc, state, classic_state, &native_rect);
+
+ canvas->endPlatformPaint();
+}
+
+void WebThemeEngineImpl::paintScrollbarThumb(
+ WebCanvas* canvas, int part, int state, int classic_state,
+ const WebRect& rect) {
+ HDC hdc = canvas->beginPlatformPaint();
+
+ RECT native_rect = WebRectToRECT(rect);
+ gfx::NativeTheme::instance()->PaintScrollbarThumb(
+ hdc, part, state, classic_state, &native_rect);
+
+ canvas->endPlatformPaint();
+}
+
+void WebThemeEngineImpl::paintScrollbarTrack(
+ WebCanvas* canvas, int part, int state, int classic_state,
+ const WebRect& rect, const WebRect& align_rect) {
+ HDC hdc = canvas->beginPlatformPaint();
+
+ RECT native_rect = WebRectToRECT(rect);
+ RECT native_align_rect = WebRectToRECT(align_rect);
+ gfx::NativeTheme::instance()->PaintScrollbarTrack(
+ hdc, part, state, classic_state, &native_rect, &native_align_rect,
+ canvas);
+
+ canvas->endPlatformPaint();
+}
+
+void WebThemeEngineImpl::paintTextField(
+ WebCanvas* canvas, int part, int state, int classic_state,
+ const WebRect& rect, WebColor color, bool fill_content_area,
+ bool draw_edges) {
+ HDC hdc = canvas->beginPlatformPaint();
+
+ RECT native_rect = WebRectToRECT(rect);
+
+ gfx::NativeTheme::instance()->PaintTextField(
+ hdc, part, state, classic_state, &native_rect, color, fill_content_area,
+ draw_edges);
+
+ canvas->endPlatformPaint();
+}
+
+} // namespace webkit_glue
diff --git a/webkit/glue/webthemeengine_impl_win.h b/webkit/glue/webthemeengine_impl_win.h
new file mode 100644
index 0000000..d95d041
--- /dev/null
+++ b/webkit/glue/webthemeengine_impl_win.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#ifndef WEBTHEMEENGINE_IMPL_WIN_H_
+#define WEBTHEMEENGINE_IMPL_WIN_H_
+
+#include "WebThemeEngine.h"
+
+namespace webkit_glue {
+
+class WebThemeEngineImpl : public WebKit::WebThemeEngine {
+ public:
+ // WebThemeEngine methods:
+ virtual void paintButton(
+ WebKit::WebCanvas*, int part, int state, int classic_state,
+ const WebKit::WebRect&);
+ virtual void paintMenuList(
+ WebKit::WebCanvas*, int part, int state, int classic_state,
+ const WebKit::WebRect&);
+ virtual void paintScrollbarArrow(
+ WebKit::WebCanvas*, int state, int classic_state,
+ const WebKit::WebRect&);
+ virtual void paintScrollbarThumb(
+ WebKit::WebCanvas*, int part, int state, int classic_state,
+ const WebKit::WebRect&);
+ virtual void paintScrollbarTrack(
+ WebKit::WebCanvas*, int part, int state, int classic_state,
+ const WebKit::WebRect&, const WebKit::WebRect& align_rect);
+ virtual void paintTextField(
+ WebKit::WebCanvas*, int part, int state, int classic_state,
+ const WebKit::WebRect&, WebKit::WebColor, bool fill_content_area,
+ bool draw_edges);
+};
+
+} // namespace webkit_glue
+
+#endif // WEBTHEMEENGINE_IMPL_WIN_H_
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 7f215d0..1d57683 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -4071,6 +4071,8 @@
'WEBKIT_IMPLEMENTATION',
],
'sources': [
+ '../third_party/WebKit/WebKit/chromium/public/WebCanvas.h',
+ '../third_party/WebKit/WebKit/chromium/public/WebColor.h',
'../third_party/WebKit/WebKit/chromium/public/WebCString.h',
'../third_party/WebKit/WebKit/chromium/public/WebClipboard.h',
'../third_party/WebKit/WebKit/chromium/public/WebCommon.h',
@@ -4112,6 +4114,11 @@
],
},
}],
+ ['OS=="win"', {
+ 'sources': [
+ '../third_party/WebKit/WebKit/chromium/public/win/WebThemeEngine.h',
+ ],
+ }],
],
},
{