summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 22:51:45 +0000
committerlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 22:51:45 +0000
commitd641311d35f918ef6a41892a6b9322dde71d261b (patch)
tree70515a1c3786100b15815ca2a9fdf91ecf77eab4 /webkit
parenteccdfd4cdaf9fad5119e4f09fb3c83ea8223c2e9 (diff)
downloadchromium_src-d641311d35f918ef6a41892a6b9322dde71d261b.zip
chromium_src-d641311d35f918ef6a41892a6b9322dde71d261b.tar.gz
chromium_src-d641311d35f918ef6a41892a6b9322dde71d261b.tar.bz2
WebKit merge 44757:44773.
The code change here is to compensate for http://trac.webkit.org/changeset/44758 which changed how to get to theme(). BUG=None TEST=Possible (but unlikely) whitespace changes in the autocomplete popup menu. Review URL: http://codereview.chromium.org/128003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webview_impl.cc10
-rw-r--r--webkit/glue/webview_impl.h4
2 files changed, 11 insertions, 3 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 57d594a..11f064a 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -156,7 +156,7 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient {
SetSuggestions(suggestions);
FontDescription font_description;
- theme()->systemFont(CSSValueWebkitControl, font_description);
+ webview_->theme()->systemFont(CSSValueWebkitControl, font_description);
// Use a smaller font size to match IE/Firefox.
// TODO(jcampan): http://crbug.com/7376 use the system size instead of a
// fixed font size value.
@@ -200,12 +200,12 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient {
virtual int clientPaddingLeft() const {
// Bug http://crbug.com/7708 seems to indicate the style can be NULL.
WebCore::RenderStyle* style = GetTextFieldStyle();
- return style ? theme()->popupInternalPaddingLeft(style) : 0;
+ return style ? webview_->theme()->popupInternalPaddingLeft(style) : 0;
}
virtual int clientPaddingRight() const {
// Bug http://crbug.com/7708 seems to indicate the style can be NULL.
WebCore::RenderStyle* style = GetTextFieldStyle();
- return style ? theme()->popupInternalPaddingRight(style) : 0;
+ return style ? webview_->theme()->popupInternalPaddingRight(style) : 0;
}
virtual int listSize() const {
return suggestions_.size();
@@ -387,6 +387,10 @@ WebViewImpl::~WebViewImpl() {
}
}
+RenderTheme* WebViewImpl::theme() const {
+ return page_.get() ? page_->theme() : RenderTheme::defaultTheme().get();
+}
+
void WebViewImpl::SetUseEditorDelegate(bool value) {
ASSERT(page_ != 0); // The macro doesn't like (!page_) with a scoped_ptr.
ASSERT(page_->editorClient());
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 28e3666..7635dbf 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -19,6 +19,7 @@
MSVC_PUSH_WARNING_LEVEL(0);
#include "Page.h"
+#include "RenderTheme.h"
MSVC_POP_WARNING();
namespace WebCore {
@@ -31,6 +32,7 @@ class Page;
class PlatformKeyboardEvent;
class PopupContainer;
class Range;
+class RenderTheme;
class Widget;
}
@@ -153,6 +155,8 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
return page_.get();
}
+ WebCore::RenderTheme* theme() const;
+
// Returns the main frame associated with this view. This may be NULL when
// the page is shutting down, but will be valid at all other times.
WebFrameImpl* main_frame() {