Diff
Modified: trunk/Source/WebCore/ChangeLog (100269 => 100270)
--- trunk/Source/WebCore/ChangeLog 2011-11-15 13:38:23 UTC (rev 100269)
+++ trunk/Source/WebCore/ChangeLog 2011-11-15 13:43:36 UTC (rev 100270)
@@ -1,3 +1,21 @@
+2011-11-15 Pierre Rossi <[email protected]>
+
+ [Qt] Clean up the remaining duplicate code after the RenderThemeQt refactoring.
+ https://bugs.webkit.org/show_bug.cgi?id=72262
+
+ Reviewed by Antonio Gomes.
+
+ No new tests needed, this is purely cosmetic.
+
+ * platform/qt/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
+ * platform/qt/RenderThemeQStyle.h:
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustMenuListButtonStyle): remove the call to resetBorderRadius()
+ since the mobile theme actually didn't do this.
+ * platform/qt/RenderThemeQtMobile.cpp:
+ (WebCore::RenderThemeQtMobile::adjustMenuListStyle):
+
2011-11-15 Pavel Feldman <[email protected]>
Web Inspector: move generic code from DevTools.js into the WebCore.
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp (100269 => 100270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp 2011-11-15 13:38:23 UTC (rev 100269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp 2011-11-15 13:43:36 UTC (rev 100270)
@@ -382,19 +382,6 @@
return false;
}
-void RenderThemeQStyle::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
-{
- // Resetting the style like this leads to differences like:
- // - RenderTextControl {INPUT} at (2,2) size 168x25 [bgcolor=#FFFFFF] border: (2px inset #000000)]
- // + RenderTextControl {INPUT} at (2,2) size 166x26
- // in layout tests when a CSS style is applied that doesn't affect background color, border or
- // padding. Just worth keeping in mind!
- style->setBackgroundColor(Color::transparent);
- style->resetBorder();
- style->resetPadding();
- computeSizeBasedOnStyle(style);
-}
-
bool RenderThemeQStyle::paintTextField(RenderObject* o, const PaintInfo& i, const IntRect& r)
{
StylePainterQStyle p(this, i);
@@ -477,22 +464,13 @@
return false;
}
-void RenderThemeQStyle::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+void RenderThemeQStyle::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
{
// WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius();
- // Height is locked to auto.
- style->setHeight(Length(Auto));
-
- // White-space is locked to pre
- style->setWhiteSpace(PRE);
-
- computeSizeBasedOnStyle(style);
-
- // Add in the padding that we'd like to use.
- setPopupPadding(style);
+ RenderThemeQt::adjustMenuListButtonStyle(selector, style, e);
}
bool RenderThemeQStyle::paintMenuListButton(RenderObject* o, const PaintInfo& i,
@@ -640,20 +618,6 @@
return paintTextField(o, pi, r);
}
-void RenderThemeQStyle::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style,
- Element* e) const
-{
- // Resetting the style like this leads to differences like:
- // - RenderTextControl {INPUT} at (2,2) size 168x25 [bgcolor=#FFFFFF] border: (2px inset #000000)]
- // + RenderTextControl {INPUT} at (2,2) size 166x26
- // in layout tests when a CSS style is applied that doesn't affect background color, border or
- // padding. Just worth keeping in mind!
- style->setBackgroundColor(Color::transparent);
- style->resetBorder();
- style->resetPadding();
- computeSizeBasedOnStyle(style);
-}
-
void RenderThemeQStyle::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style,
Element* e) const
{
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h (100269 => 100270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h 2011-11-15 13:38:23 UTC (rev 100269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h 2011-11-15 13:43:36 UTC (rev 100270)
@@ -55,7 +55,6 @@
virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
@@ -78,7 +77,6 @@
virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&);
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (100269 => 100270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp 2011-11-15 13:38:23 UTC (rev 100269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp 2011-11-15 13:43:36 UTC (rev 100270)
@@ -332,10 +332,6 @@
void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
- // WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
- // see also http://bugs.webkit.org/show_bug.cgi?id=18399
- style->resetBorderRadius();
-
// Height is locked to auto.
style->setHeight(Length(Auto));
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp (100269 => 100270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp 2011-11-15 13:38:23 UTC (rev 100269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp 2011-11-15 13:43:36 UTC (rev 100270)
@@ -553,20 +553,9 @@
return false;
}
-void RenderThemeQtMobile::adjustMenuListStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+void RenderThemeQtMobile::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
{
- style->resetBorder();
-
- // Height is locked to auto.
- style->setHeight(Length(Auto));
-
- // White-space is locked to pre
- style->setWhiteSpace(PRE);
-
- computeSizeBasedOnStyle(style);
-
- // Add in the padding that we'd like to use.
- setPopupPadding(style);
+ RenderThemeQt::adjustMenuListStyle(selector, style, e);
style->setPaddingLeft(Length(menuListPadding, Fixed));
}