Changeset 51428 in webkit


Ignore:
Timestamp:
Nov 26, 2009 9:59:55 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-26 Kent Tamura <tkent@chromium.org>

Reviewed by Eric Seidel.

[Chromium] Ignore line-height CSS property specified to push buttons on
Windows and Linux.
https://bugs.webkit.org/show_bug.cgi?id=31712

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=button> issue with Chromium/Windows
and Chromium/Linux.

  • rendering/RenderThemeChromiumSkia.cpp: Implement adjustButtonStyle() to ignore line-height.
  • rendering/RenderThemeChromiumSkia.h: Declare adjustButtonStyle().
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51426 r51428  
     12009-11-26  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [Chromium] Ignore line-height CSS property specified to push buttons on
     6        Windows and Linux.
     7        https://bugs.webkit.org/show_bug.cgi?id=31712
     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=button> issue with Chromium/Windows
     15        and Chromium/Linux.
     16       
     17        * rendering/RenderThemeChromiumSkia.cpp: Implement adjustButtonStyle() to ignore line-height.
     18        * rendering/RenderThemeChromiumSkia.h: Declare adjustButtonStyle().
     19
    1202009-11-26  Kinuko Yasuda  <kinuko@chromium.com>
    221
  • trunk/WebCore/rendering/RenderThemeChromiumSkia.cpp

    r51368 r51428  
    349349}
    350350
     351void RenderThemeChromiumSkia::adjustButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const;
     352{
     353    if (style->appearance() == PushButtonPart) {
     354        // Ignore line-height.
     355        style->setLineHeight(RenderStyle::initialLineHeight());
     356    }
     357}
     358
     359
    351360bool RenderThemeChromiumSkia::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
    352361{
  • trunk/WebCore/rendering/RenderThemeChromiumSkia.h

    r51368 r51428  
    7272
    7373        virtual bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
     74        virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
    7475
    7576        virtual bool paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
Note: See TracChangeset for help on using the changeset viewer.