2009-03-26 Peter Kasting <pkasting@google.com>
authorpkasting@chromium.org <pkasting@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2009 23:25:18 +0000 (23:25 +0000)
committerpkasting@chromium.org <pkasting@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2009 23:25:18 +0000 (23:25 +0000)
        Reviewed by Adele Peterson.

        https://bugs.webkit.org/show_bug.cgi?id=24859
        Use CSS file instead of code to adjust search field styling.

        * css/themeWin.css:
        * rendering/RenderThemeWin.cpp:
        * rendering/RenderThemeWin.h:

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

WebCore/ChangeLog
WebCore/css/themeWin.css
WebCore/rendering/RenderThemeWin.cpp
WebCore/rendering/RenderThemeWin.h

index 604aa5b..3342802 100644 (file)
@@ -1,3 +1,14 @@
+2009-03-26  Peter Kasting  <pkasting@google.com>
+
+        Reviewed by Adele Peterson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=24859
+        Use CSS file instead of code to adjust search field styling.
+
+        * css/themeWin.css:
+        * rendering/RenderThemeWin.cpp:
+        * rendering/RenderThemeWin.h:
+
 2009-03-26  Darin Adler  <darin@apple.com>
 
         Reviewed by Geoff Garen.
index 933ffd8..6c582e9 100644 (file)
 
 input:not([type]), 
 input[type="text"],
-input[type="password"],
-input[type="search"] {
+input[type="password"] {
     margin:0;
     padding:1px 0;
 }
 
+input[type="search"] {
+    margin:0;
+    padding:1px;
+}
+
 input[type="checkbox"] {
     margin:3px 3px 3px 4px;
 }
index e882432..0518ef0 100644 (file)
@@ -737,16 +737,6 @@ bool RenderThemeWin::paintSearchField(RenderObject* o, const RenderObject::Paint
     return paintTextField(o, i, r);
 }
 
-void RenderThemeWin::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
-{   
-    // Override padding size to match AppKit text positioning.
-    const int padding = 1;
-    style->setPaddingLeft(Length(padding, Fixed));
-    style->setPaddingRight(Length(padding, Fixed));
-    style->setPaddingTop(Length(padding, Fixed));
-    style->setPaddingBottom(Length(padding, Fixed));
-}
-
 bool RenderThemeWin::paintSearchFieldCancelButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
     IntRect bounds = r;
index 77a95ae..664094f 100644 (file)
@@ -99,7 +99,6 @@ public:
     virtual int buttonInternalPaddingTop() const;
     virtual int buttonInternalPaddingBottom() const;
 
-    virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
 
     virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;