Title: [110480] trunk/Source/WebCore
Revision
110480
Author
[email protected]
Date
2012-03-12 14:33:48 -0700 (Mon, 12 Mar 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110479 => 110480)


--- trunk/Source/WebCore/ChangeLog	2012-03-12 21:28:04 UTC (rev 110479)
+++ trunk/Source/WebCore/ChangeLog	2012-03-12 21:33:48 UTC (rev 110480)
@@ -1,3 +1,21 @@
+2012-03-12  Beth Dakin  <[email protected]>
+
+        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):
+
 2012-03-12  Scott Byer  <[email protected]>
 
         Cleanup obsolete files.

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (110479 => 110480)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2012-03-12 21:28:04 UTC (rev 110479)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2012-03-12 21:33:48 UTC (rev 110480)
@@ -487,7 +487,7 @@
 bool RenderThemeMac::isControlStyled(const RenderStyle* style, const BorderData& border,
                                      const FillLayer& background, const Color& backgroundColor) const
 {
-    if (style->appearance() == TextFieldPart || style->appearance() == TextAreaPart || style->appearance() == ListboxPart)
+    if (style->appearance() == TextAreaPart || style->appearance() == ListboxPart)
         return style->border() != border;
         
     // FIXME: This is horrible, but there is not much else that can be done.  Menu lists cannot draw properly when
@@ -2137,11 +2137,6 @@
         [m_textField.get() setBezeled:YES];
         [m_textField.get() setEditable:YES];
         [m_textField.get() setFocusRingType:NSFocusRingTypeExterior];
-
-        // Setting a clear background on the cell is necessary for CSS-styled backgrounds
-        // to show through. Ideally, there would be a better way to do this.
-        [m_textField.get() setDrawsBackground:YES];
-        [m_textField.get() setBackgroundColor:[NSColor clearColor]];
     }
 
     return m_textField.get();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to