summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderThemeChromiumWin.cpp
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-09-13 16:35:48 +0100
committerIain Merrick <husky@google.com>2010-09-16 12:10:42 +0100
commit5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch)
treeddce1aa5e3b6967a69691892e500897558ff8ab6 /WebCore/rendering/RenderThemeChromiumWin.cpp
parent12bec63ec71e46baba27f0bd9bd9d8067683690a (diff)
downloadexternal_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip
external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz
external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebCore/rendering/RenderThemeChromiumWin.cpp')
-rw-r--r--WebCore/rendering/RenderThemeChromiumWin.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/WebCore/rendering/RenderThemeChromiumWin.cpp b/WebCore/rendering/RenderThemeChromiumWin.cpp
index 3023798..be670ff 100644
--- a/WebCore/rendering/RenderThemeChromiumWin.cpp
+++ b/WebCore/rendering/RenderThemeChromiumWin.cpp
@@ -56,6 +56,10 @@
namespace WebCore {
+// The standard width for the menu list drop-down button when run under
+// layout test mode. Use the value that's currently captured in most baselines.
+static const int kStandardMenuListButtonWidth = 17;
+
namespace {
class ThemePainter {
public:
@@ -437,6 +441,12 @@ bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo&
return paintSliderTrack(o, i, r);
}
+static int menuListButtonWidth()
+{
+ static int width = ChromiumBridge::layoutTestMode() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL);
+ return width;
+}
+
// Used to paint unstyled menulists (i.e. with the default border)
bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& r)
{
@@ -461,7 +471,7 @@ bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i,
// Take padding and border into account. If the MenuList is smaller than
// the size of a button, make sure to shrink it appropriately and not put
// its x position to the left of the menulist.
- const int buttonWidth = GetSystemMetrics(SM_CXVSCROLL);
+ const int buttonWidth = menuListButtonWidth();
int spacingLeft = borderLeft + box->paddingLeft();
int spacingRight = borderRight + box->paddingRight();
int spacingTop = borderTop + box->paddingTop();