2009-11-24 Kent Tamura <tkent@chromium.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Nov 2009 02:16:38 +0000 (02:16 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Nov 2009 02:16:38 +0000 (02:16 +0000)
        Reviewed by Eric Seidel.

        [Chromium] Ignore line-height CSS property specified to a search field on
        Windows and Linux.
        https://bugs.webkit.org/show_bug.cgi?id=31820

        LayoutTests/fast/forms/control-restrict-line-height.html checks that the
        following controls should ignore line-height CSS property.
         - <select>
         - <input type=button>
         - <input type=search>
        This change addresses the <input type=search> issue with Chromium/Windows
        and Chromium/Linux.

        * rendering/RenderThemeChromiumSkia.cpp:
        (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): Implement this to ignore line-height.
        * rendering/RenderThemeChromiumSkia.h: Declare adjustSearchFieldStyle().

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

WebCore/ChangeLog
WebCore/rendering/RenderThemeChromiumSkia.cpp
WebCore/rendering/RenderThemeChromiumSkia.h

index 07080607673b0174ebfba64ec89906661997f7c5..e4dfce50254dcb866f0f8206df341ecab68faa3b 100644 (file)
@@ -1,3 +1,23 @@
+2009-11-24  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        [Chromium] Ignore line-height CSS property specified to a search field on
+        Windows and Linux.
+        https://bugs.webkit.org/show_bug.cgi?id=31820
+
+        LayoutTests/fast/forms/control-restrict-line-height.html checks that the
+        following controls should ignore line-height CSS property.
+         - <select>
+         - <input type=button>
+         - <input type=search>
+        This change addresses the <input type=search> issue with Chromium/Windows
+        and Chromium/Linux.
+
+        * rendering/RenderThemeChromiumSkia.cpp:
+        (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): Implement this to ignore line-height.
+        * rendering/RenderThemeChromiumSkia.h: Declare adjustSearchFieldStyle().
+
 2009-11-24  Simon Fraser  <simon.fraser@apple.com>
 
         No review.
index b582c183c2641efe6a224071652dfad83368dd29..86cd77266e0b68c3736a2f05aaf8f1abba73685d 100644 (file)
@@ -358,6 +358,12 @@ bool RenderThemeChromiumSkia::paintTextArea(RenderObject* o, const RenderObject:
     return paintTextField(o, i, r);
 }
 
+void RenderThemeChromiumSkia::adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+{
+     // Ignore line-height.
+     style->setLineHeight(RenderStyle::initialLineHeight());
+}
+
 bool RenderThemeChromiumSkia::paintSearchField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
 {
     return paintTextField(o, i, r);
index 98e3a355715683647f729415cff9c68b0e5c06c5..241e836cead97821ac1f211569cae8dbfbfc1389 100644 (file)
@@ -76,6 +76,7 @@ namespace WebCore {
 
         virtual bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
 
+        virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
         virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
 
         virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;