Changeset 51368 in webkit


Ignore:
Timestamp:
Nov 24, 2009 6:16:38 PM (14 years ago)
Author:
eric@webkit.org
Message:

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().
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51367 r51368  
     12009-11-24  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [Chromium] Ignore line-height CSS property specified to a search field on
     6        Windows and Linux.
     7        https://bugs.webkit.org/show_bug.cgi?id=31820
     8
     9        LayoutTests/fast/forms/control-restrict-line-height.html checks that the
     10        following controls should ignore line-height CSS property.
     11         - <select>
     12         - <input type=button>
     13         - <input type=search>
     14        This change addresses the <input type=search> issue with Chromium/Windows
     15        and Chromium/Linux.
     16
     17        * rendering/RenderThemeChromiumSkia.cpp:
     18        (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): Implement this to ignore line-height.
     19        * rendering/RenderThemeChromiumSkia.h: Declare adjustSearchFieldStyle().
     20
    1212009-11-24  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/WebCore/rendering/RenderThemeChromiumSkia.cpp

    r51218 r51368  
    359359}
    360360
     361void RenderThemeChromiumSkia::adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
     362{
     363     // Ignore line-height.
     364     style->setLineHeight(RenderStyle::initialLineHeight());
     365}
     366
    361367bool RenderThemeChromiumSkia::paintSearchField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
    362368{
  • trunk/WebCore/rendering/RenderThemeChromiumSkia.h

    r48822 r51368  
    7777        virtual bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
    7878
     79        virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
    7980        virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
    8081
Note: See TracChangeset for help on using the changeset viewer.