Changeset 110480 in webkit


Ignore:
Timestamp:
Mar 12, 2012 2:33:48 PM (12 years ago)
Author:
Beth Dakin
Message:

https://bugs.webkit.org/show_bug.cgi?id=80888
Clear background for NSTextFieldCell is unreliable and not necessary
-and corresponding-
<rdar://problem/10663710>

Reviewed by Dan Bernstein.

With http://trac.webkit.org/changeset/104240 I thought it was necessary to
make NSTextFieldCells draw with a clear background in order to allow styled
text fields. That is not actually necessary; we just had a different bug
where isControlStyled() was only checking for styled borders on text fields.
Text fields can also be styled with backgrounds, so they need the full check.

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::isControlStyled):
(WebCore::RenderThemeMac::textField):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110478 r110480  
     12012-03-12  Beth Dakin  <bdakin@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=80888
     4        Clear background for NSTextFieldCell is unreliable and not necessary
     5        -and corresponding-
     6        <rdar://problem/10663710>
     7
     8        Reviewed by Dan Bernstein.
     9
     10        With http://trac.webkit.org/changeset/104240 I thought it was necessary to
     11        make NSTextFieldCells draw with a clear background in order to allow styled
     12        text fields. That is not actually necessary; we just had a different bug
     13        where isControlStyled() was only checking for styled borders on text fields.
     14        Text fields can also be styled with backgrounds, so they need the full check.
     15        * rendering/RenderThemeMac.mm:
     16        (WebCore::RenderThemeMac::isControlStyled):
     17        (WebCore::RenderThemeMac::textField):
     18
    1192012-03-12  Scott Byer  <scottbyer@chromium.org>
    220
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r109785 r110480  
    488488                                     const FillLayer& background, const Color& backgroundColor) const
    489489{
    490     if (style->appearance() == TextFieldPart || style->appearance() == TextAreaPart || style->appearance() == ListboxPart)
     490    if (style->appearance() == TextAreaPart || style->appearance() == ListboxPart)
    491491        return style->border() != border;
    492492       
     
    21382138        [m_textField.get() setEditable:YES];
    21392139        [m_textField.get() setFocusRingType:NSFocusRingTypeExterior];
    2140 
    2141         // Setting a clear background on the cell is necessary for CSS-styled backgrounds
    2142         // to show through. Ideally, there would be a better way to do this.
    2143         [m_textField.get() setDrawsBackground:YES];
    2144         [m_textField.get() setBackgroundColor:[NSColor clearColor]];
    21452140    }
    21462141
Note: See TracChangeset for help on using the changeset viewer.