summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 01:14:38 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 01:14:38 +0000
commit597dbf7d2957462aa97c4cbd4ba28266d948d9b3 (patch)
tree03efdba5d4ff971e9e7becf1e2a99f5b28b5bd8f
parentc8d935edbdf4d1cf89034d7cfb0c3ba339c06685 (diff)
downloadchromium_src-597dbf7d2957462aa97c4cbd4ba28266d948d9b3.zip
chromium_src-597dbf7d2957462aa97c4cbd4ba28266d948d9b3.tar.gz
chromium_src-597dbf7d2957462aa97c4cbd4ba28266d948d9b3.tar.bz2
Linux: respect theme's autocomplete popups padding.
Review URL: http://codereview.chromium.org/113602 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16452 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webview_impl.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 0e13f6e..f26db01 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -70,6 +70,8 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "PopupMenuClient.h"
#if defined(OS_WIN)
#include "RenderThemeChromiumWin.h"
+#elif defined(OS_LINUX)
+#include "RenderThemeChromiumLinux.h"
#endif
#include "RenderView.h"
#include "ResourceHandle.h"
@@ -153,7 +155,7 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient {
SetSuggestions(suggestions);
FontDescription font_description;
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
theme()->systemFont(CSSValueWebkitControl, font_description);
#else
NOTIMPLEMENTED();
@@ -199,7 +201,7 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient {
return 0;
}
virtual int clientPaddingLeft() const {
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
// Bug http://crbug.com/7708 seems to indicate the style can be NULL.
WebCore::RenderStyle* style = GetTextFieldStyle();
return style ? theme()->popupInternalPaddingLeft(style) : 0;
@@ -209,7 +211,7 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient {
#endif
}
virtual int clientPaddingRight() const {
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
// Bug http://crbug.com/7708 seems to indicate the style can be NULL.
WebCore::RenderStyle* style = GetTextFieldStyle();
return style ? theme()->popupInternalPaddingRight(style) : 0;
@@ -1493,7 +1495,8 @@ void WebViewImpl::SetPreferences(const WebPreferences& preferences) {
#if defined(OS_WIN)
// RenderTheme is a singleton that needs to know the default font size to
// draw some form controls. We let it know each time the size changes.
- WebCore::RenderThemeChromiumWin::setDefaultFontSize(preferences.default_font_size);
+ WebCore::RenderThemeChromiumWin::setDefaultFontSize(
+ preferences.default_font_size);
#endif
}