Rename RenderTheme::paintMenuListButton()
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Dec 2013 20:17:46 +0000 (20:17 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Dec 2013 20:17:46 +0000 (20:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125193

Reviewed by Simon Fraser.

Towards upstreaming the iOS concept of render theme decorations we should rename
RenderTheme::paintMenuListButton() to RenderTheme::paintMenuListButtonDecorations()
to better describe its purpose.

Also, fix code style issues.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMenuListButtonDecorations):
* platform/blackberry/RenderThemeBlackBerry.h:
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
* platform/gtk/RenderThemeGtk.h:
* platform/nix/RenderThemeNix.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintDecorations): Rename argument o, r to renderer and rect, respectively.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintMenuListButtonDecorations):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonDecorations): Rename argument o, r to renderer and rect,
respectively; also remove extraneous white space and substitute 1 for 1.0f.
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonDecorations): Ditto.
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMenuList): Rename argument o, i, r to renderer, paintInfo, and rect,
respectively.
(WebCore::RenderThemeWin::paintMenuListButtonDecorations): Ditto.
* rendering/RenderThemeWin.h:
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintMenuList): Ditto.
(WebCore::RenderThemeWinCE::paintMenuListButtonDecorations): Ditto.
* rendering/RenderThemeWinCE.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp
Source/WebCore/platform/blackberry/RenderThemeBlackBerry.h
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.h
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.h
Source/WebCore/platform/nix/RenderThemeNix.h
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderThemeSafari.cpp
Source/WebCore/rendering/RenderThemeSafari.h
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebCore/rendering/RenderThemeWin.h
Source/WebCore/rendering/RenderThemeWinCE.cpp
Source/WebCore/rendering/RenderThemeWinCE.h

index 7113aae..e961cea 100644 (file)
@@ -1,3 +1,47 @@
+2013-12-04  Daniel Bates  <dabates@apple.com>
+
+        Rename RenderTheme::paintMenuListButton()
+        https://bugs.webkit.org/show_bug.cgi?id=125193
+
+        Reviewed by Simon Fraser.
+
+        Towards upstreaming the iOS concept of render theme decorations we should rename
+        RenderTheme::paintMenuListButton() to RenderTheme::paintMenuListButtonDecorations()
+        to better describe its purpose.
+
+        Also, fix code style issues.
+
+        * platform/blackberry/RenderThemeBlackBerry.cpp:
+        (WebCore::RenderThemeBlackBerry::paintMenuListButtonDecorations):
+        * platform/blackberry/RenderThemeBlackBerry.h:
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
+        * platform/efl/RenderThemeEfl.h:
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
+        * platform/gtk/RenderThemeGtk.h:
+        * platform/nix/RenderThemeNix.h:
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::paintDecorations): Rename argument o, r to renderer and rect, respectively.
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::paintMenuListButtonDecorations):
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintMenuListButtonDecorations): Rename argument o, r to renderer and rect,
+        respectively; also remove extraneous white space and substitute 1 for 1.0f.
+        * rendering/RenderThemeSafari.cpp:
+        (WebCore::RenderThemeSafari::paintMenuListButtonDecorations): Ditto.
+        * rendering/RenderThemeSafari.h:
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::paintMenuList): Rename argument o, i, r to renderer, paintInfo, and rect,
+        respectively.
+        (WebCore::RenderThemeWin::paintMenuListButtonDecorations): Ditto.
+        * rendering/RenderThemeWin.h:
+        * rendering/RenderThemeWinCE.cpp:
+        (WebCore::RenderThemeWinCE::paintMenuList): Ditto.
+        (WebCore::RenderThemeWinCE::paintMenuListButtonDecorations): Ditto. 
+        * rendering/RenderThemeWinCE.h:
+
 2013-12-04  Andy Estes  <aestes@apple.com>
 
         [iOS] Build projects with $(ARCHS_STANDARD_32_64_BIT)
index bca78aa..92e17d9 100644 (file)
@@ -618,7 +618,7 @@ bool RenderThemeBlackBerry::paintMenuList(RenderObject* object, const PaintInfo&
     return false;
 }
 
-bool RenderThemeBlackBerry::paintMenuListButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+bool RenderThemeBlackBerry::paintMenuListButtonDecorations(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     return paintMenuList(object, info, rect);
 }
index faea895..4a9160f 100644 (file)
@@ -49,7 +49,7 @@ public:
     virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
     void calculateButtonSize(RenderStyle*) const;
     virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
     virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
     virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
     virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
index cbc5cab..4619e88 100755 (executable)
@@ -892,7 +892,7 @@ void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver* styleResolver, Ren
     adjustMenuListStyle(styleResolver, style, element);
 }
 
-bool RenderThemeEfl::paintMenuListButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+bool RenderThemeEfl::paintMenuListButtonDecorations(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     return paintMenuList(object, info, rect);
 }
index 6a64f57..6eb7c92 100644 (file)
@@ -141,7 +141,7 @@ public:
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
     virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
index bb4dddd..39f1104 100644 (file)
@@ -223,7 +223,7 @@ void RenderThemeGtk::adjustMenuListButtonStyle(StyleResolver* styleResolver, Ren
     adjustMenuListStyle(styleResolver, style, e);
 }
 
-bool RenderThemeGtk::paintMenuListButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+bool RenderThemeGtk::paintMenuListButtonDecorations(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     return paintMenuList(object, info, rect);
 }
index 5e53476..759526a 100644 (file)
@@ -137,7 +137,7 @@ protected:
     virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
     virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
     virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
index 61e5d03..595ccf1 100644 (file)
@@ -88,7 +88,10 @@ protected:
 
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
     virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const OVERRIDE;
-    virtual bool paintMenuListButton(RenderObject* o, const PaintInfo& i, const IntRect& r) OVERRIDE { return paintMenuList(o, i, r); }
+    virtual bool paintMenuListButtonDecorations(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect) OVERRIDE
+    {
+        return paintMenuList(renderer, paintInfo, rect);
+    }
 
     virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const OVERRIDE;
     virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
index d5ba25c..649c718 100644 (file)
@@ -442,15 +442,15 @@ bool RenderTheme::paintBorderOnly(RenderObject* o, const PaintInfo& paintInfo, c
     return false;
 }
 
-bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
+bool RenderTheme::paintDecorations(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
     if (paintInfo.context->paintingDisabled())
         return false;
 
     // Call the appropriate paint method based off the appearance value.
-    switch (o->style().appearance()) {
+    switch (renderer->style().appearance()) {
     case MenulistButtonPart:
-        return paintMenuListButton(o, paintInfo, r);
+        return paintMenuListButtonDecorations(renderer, paintInfo, rect);
     case TextFieldPart:
     case TextAreaPart:
     case ListboxPart:
index 0cd620d..8a14a25 100644 (file)
@@ -281,7 +281,7 @@ protected:
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
 
     virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
 
 #if ENABLE(METER_ELEMENT)
     virtual void adjustMeterStyle(StyleResolver*, RenderStyle*, Element*) const;
index 69a660f..4b6cfeb 100644 (file)
@@ -122,7 +122,7 @@ protected:
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
     virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
 
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
     virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
 #if ENABLE(PROGRESS_ELEMENT)
index 334857b..2dd2df9 100644 (file)
@@ -1191,29 +1191,29 @@ void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const PaintIn
     }
 }
 
-bool RenderThemeMac::paintMenuListButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeMac::paintMenuListButtonDecorations(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    IntRect bounds = IntRect(r.x() + o->style().borderLeftWidth(),
-                             r.y() + o->style().borderTopWidth(),
-                             r.width() - o->style().borderLeftWidth() - o->style().borderRightWidth(),
-                             r.height() - o->style().borderTopWidth() - o->style().borderBottomWidth());
+    IntRect bounds = IntRect(rect.x() + renderer->style().borderLeftWidth(),
+                             rect.y() + renderer->style().borderTopWidth(),
+                             rect.width() - renderer->style().borderLeftWidth() - renderer->style().borderRightWidth(),
+                             rect.height() - renderer->style().borderTopWidth() - renderer->style().borderBottomWidth());
     // Draw the gradients to give the styled popup menu a button appearance
-    paintMenuListButtonGradients(o, paintInfo, bounds);
+    paintMenuListButtonGradients(renderer, paintInfo, bounds);
 
     // Since we actually know the size of the control here, we restrict the font scale to make sure the arrows will fit vertically in the bounds
-    float fontScale = std::min(o->style().fontSize() / baseFontSize, bounds.height() / (baseArrowHeight * 2 + baseSpaceBetweenArrows));
+    float fontScale = std::min(renderer->style().fontSize() / baseFontSize, bounds.height() / (baseArrowHeight * 2 + baseSpaceBetweenArrows));
     float centerY = bounds.y() + bounds.height() / 2.0f;
     float arrowHeight = baseArrowHeight * fontScale;
     float arrowWidth = baseArrowWidth * fontScale;
-    float leftEdge = bounds.maxX() - arrowPaddingRight * o->style().effectiveZoom() - arrowWidth;
+    float leftEdge = bounds.maxX() - arrowPaddingRight * renderer->style().effectiveZoom() - arrowWidth;
     float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale;
 
-    if (bounds.width() < arrowWidth + arrowPaddingLeft * o->style().effectiveZoom())
+    if (bounds.width() < arrowWidth + arrowPaddingLeft * renderer->style().effectiveZoom())
         return false;
 
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
 
-    paintInfo.context->setFillColor(o->style().visitedDependentColor(CSSPropertyColor), o->style().colorSpace());
+    paintInfo.context->setFillColor(renderer->style().visitedDependentColor(CSSPropertyColor), renderer->style().colorSpace());
     paintInfo.context->setStrokeStyle(NoStroke);
 
     FloatPoint arrow1[3];
@@ -1237,10 +1237,10 @@ bool RenderThemeMac::paintMenuListButton(RenderObject* o, const PaintInfo& paint
 
     // FIXME: Should the separator thickness and space be scaled up by fontScale?
     int separatorSpace = 2; // Deliberately ignores zoom since it looks nicer if it stays thin.
-    int leftEdgeOfSeparator = static_cast<int>(leftEdge - arrowPaddingLeft * o->style().effectiveZoom()); // FIXME: Round?
+    int leftEdgeOfSeparator = static_cast<int>(leftEdge - arrowPaddingLeft * renderer->style().effectiveZoom()); // FIXME: Round?
 
     // Draw the separator to the left of the arrows
-    paintInfo.context->setStrokeThickness(1.0f); // Deliberately ignores zoom since it looks nicer if it stays thin.
+    paintInfo.context->setStrokeThickness(1); // Deliberately ignores zoom since it looks nicer if it stays thin.
     paintInfo.context->setStrokeStyle(SolidStroke);
     paintInfo.context->setStrokeColor(leftSeparatorColor, ColorSpaceDeviceRGB);
     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()),
index 912ed26..2ebbffc 100644 (file)
@@ -807,17 +807,17 @@ void RenderThemeSafari::paintMenuListButtonGradients(RenderObject* o, const Pain
     paintInfo.context->restore();
 }
 
-bool RenderThemeSafari::paintMenuListButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeSafari::paintMenuListButtonDecorations(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    IntRect bounds = IntRect(r.x() + o->style().borderLeftWidth(),
-                             r.y() + o->style().borderTopWidth(),
-                             r.width() - o->style().borderLeftWidth() - o->style().borderRightWidth(),
-                             r.height() - o->style().borderTopWidth() - o->style().borderBottomWidth());
+    IntRect bounds = IntRect(rect.x() + renderer->style().borderLeftWidth(),
+                             rect.y() + renderer->style().borderTopWidth(),
+                             rect.width() - renderer->style().borderLeftWidth() - renderer->style().borderRightWidth(),
+                             rect.height() - renderer->style().borderTopWidth() - renderer->style().borderBottomWidth());
     // Draw the gradients to give the styled popup menu a button appearance
-    paintMenuListButtonGradients(o, paintInfo, bounds);
-    
+    paintMenuListButtonGradients(renderer, paintInfo, bounds);
+
     // Since we actually know the size of the control here, we restrict the font scale to make sure the arrow will fit vertically in the bounds
-    float fontScale = min(o->style().fontSize() / baseFontSize, bounds.height() / baseArrowHeight);
+    float fontScale = min(renderer->style().fontSize() / baseFontSize, bounds.height() / baseArrowHeight);
     float centerY = bounds.y() + bounds.height() / 2.0f;
     float arrowHeight = baseArrowHeight * fontScale;
     float arrowWidth = baseArrowWidth * fontScale;
@@ -828,7 +828,7 @@ bool RenderThemeSafari::paintMenuListButton(RenderObject* o, const PaintInfo& pa
 
     paintInfo.context->save();
 
-    paintInfo.context->setFillColor(o->style().visitedDependentColor(CSSPropertyColor), ColorSpaceDeviceRGB);
+    paintInfo.context->setFillColor(renderer->style().visitedDependentColor(CSSPropertyColor), ColorSpaceDeviceRGB);
     paintInfo.context->setStrokeColor(NoStroke, ColorSpaceDeviceRGB);
 
     FloatPoint arrow[3];
@@ -841,13 +841,13 @@ bool RenderThemeSafari::paintMenuListButton(RenderObject* o, const PaintInfo& pa
 
     Color leftSeparatorColor(0, 0, 0, 40);
     Color rightSeparatorColor(255, 255, 255, 40);
-    
+
     // FIXME: Should the separator thickness and space be scaled up by fontScale?
     int separatorSpace = 2;
     int leftEdgeOfSeparator = static_cast<int>(leftEdge - arrowPaddingLeft); // FIXME: Round?
 
     // Draw the separator to the left of the arrows
-    paintInfo.context->setStrokeThickness(1.0f);
+    paintInfo.context->setStrokeThickness(1);
     paintInfo.context->setStrokeStyle(SolidStroke);
     paintInfo.context->setStrokeColor(leftSeparatorColor, ColorSpaceDeviceRGB);
     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()),
index 457e0d3..d4ab7c7 100644 (file)
@@ -105,7 +105,7 @@ protected:
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
     virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
 
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
     virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
     virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
index 8231fa6..25a81c8 100644 (file)
@@ -777,13 +777,13 @@ bool RenderThemeWin::paintTextField(RenderObject* o, const PaintInfo& i, const I
     return false;
 }
 
-bool RenderThemeWin::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& r)
+bool RenderThemeWin::paintMenuList(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
     HANDLE theme;
     int part;
     if (haveTheme && (windowsVersion() >= WindowsVista)) {
         theme = menuListTheme();
-        if (o->frame().settings().applicationChromeMode())
+        if (renderer->frame().settings().applicationChromeMode())
             part = CP_READONLY;
         else
             part = CP_BORDER;
@@ -792,9 +792,9 @@ bool RenderThemeWin::paintMenuList(RenderObject* o, const PaintInfo& i, const In
         part = TFP_TEXTFIELD;
     }
 
-    drawControl(i.context,  o, theme, ThemeData(part, determineState(o)), r);
+    drawControl(i.context,  renderer, theme, ThemeData(part, determineState(renderer)), rect);
     
-    return paintMenuListButton(o, i, r);
+    return paintMenuListButtonDecorations(renderer, paintInfo, rect);
 }
 
 void RenderThemeWin::adjustMenuListStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
@@ -834,16 +834,16 @@ void RenderThemeWin::adjustMenuListButtonStyle(StyleResolver* styleResolver, Ren
     style->setWhiteSpace(PRE);
 }
 
-bool RenderThemeWin::paintMenuListButton(RenderObject* o, const PaintInfo& i, const IntRect& r)
+bool RenderThemeWin::paintMenuListButtonDecorations(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
     // FIXME: Don't make hardcoded assumptions about the thickness of the textfield border.
     int borderThickness = haveTheme ? 1 : 2;
 
     // Paint the dropdown button on the inner edge of the text field,
     // leaving space for the text field's 1px border
-    IntRect buttonRect(r);
+    IntRect buttonRect(rect);
     buttonRect.inflate(-borderThickness);
-    if (o->style().direction() == LTR)
+    if (renderer->style().direction() == LTR)
         buttonRect.setX(buttonRect.maxX() - dropDownButtonWidth);
     buttonRect.setWidth(dropDownButtonWidth);
 
@@ -854,7 +854,7 @@ bool RenderThemeWin::paintMenuListButton(RenderObject* o, const PaintInfo& i, co
         buttonRect.setWidth(buttonRect.width() + vistaMenuListButtonOutset);
     }
 
-    drawControl(i.context, o, menuListTheme(), getThemeData(o), buttonRect);
+    drawControl(paintInfo.context, renderer, menuListTheme(), getThemeData(renderer), buttonRect);
 
     return false;
 }
index d032843..e09d4c8 100644 (file)
@@ -89,7 +89,7 @@ public:
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
     virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
-    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual bool paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& r);
     virtual bool paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& r);
index cbb80b9..d38c5a7 100644 (file)
@@ -242,18 +242,18 @@ void RenderThemeWinCE::adjustMenuListStyle(StyleResolver* styleResolver, RenderS
     adjustMenuListButtonStyle(styleResolver, style, e);
 }
 
-bool RenderThemeWinCE::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& r)
+bool RenderThemeWinCE::paintMenuList(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    paintTextField(o, i, r);
-    paintMenuListButton(o, i, r);
+    paintTextField(renderer, paintInfo, rect);
+    paintMenuListButtonDecorations(renderer, paintInfo, rect);
     return true;
 }
 
-bool RenderThemeWinCE::paintMenuListButton(RenderObject* o, const PaintInfo& i, const IntRect& r)
+bool RenderThemeWinCE::paintMenuListButtonDecorations(RenderObject* renderer, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    IntRect buttonRect(r.maxX() - dropDownButtonWidth - 1, r.y(), dropDownButtonWidth, r.height());
+    IntRect buttonRect(rect.maxX() - dropDownButtonWidth - 1, rect.y(), dropDownButtonWidth, rect.height());
     buttonRect.inflateY(-1);
-    i.context->drawFrameControl(buttonRect, DFC_SCROLL, DFCS_SCROLLCOMBOBOX | determineClassicState(o));
+    paintInfo.context->drawFrameControl(buttonRect, DFC_SCROLL, DFCS_SCROLLCOMBOBOX | determineClassicState(renderer));
     return true;
 }
 
index f8026e9..010fd1e 100644 (file)
@@ -85,7 +85,7 @@ namespace WebCore {
         virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
         virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
 
-        virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual bool paintMenuListButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&);
 
         virtual bool paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& r);
         virtual bool paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& r);