Diff
Modified: trunk/LayoutTests/ChangeLog (96957 => 96958)
--- trunk/LayoutTests/ChangeLog 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/ChangeLog 2011-10-07 17:44:07 UTC (rev 96958)
@@ -1,3 +1,20 @@
+2011-10-07 Vineet Chaudary <[email protected]>
+
+ background-color affects the font color in disabled textarea.
+ https://bugs.webkit.org/show_bug.cgi?id=65361
+
+ Reviewed by Darin Adler.
+
+ For the background-color White and transparent the text color should be same.
+
+ * fast/forms/input-disabled-color.html: Modified test case.
+ * platform/chromium/test_expectations.txt: Needs rebaseline.
+ * platform/gtk/fast/forms/input-disabled-color-expected.png: Changed expected result.
+ * platform/gtk/fast/forms/input-disabled-color-expected.txt: Changed expected result.
+ * platform/mac/test_expectations.txt: Needs rebaseline.
+ * platform/qt/test_expectations.txt: Needs rebaseline.
+ * platform/win/test_expectations.txt: Needs rebaseline.
+
2011-10-07 Adam Barth <[email protected]>
Add missing tests for LegacyDefaultOptionalArguments/FileAPI IDL
Modified: trunk/LayoutTests/fast/forms/input-disabled-color.html (96957 => 96958)
--- trunk/LayoutTests/fast/forms/input-disabled-color.html 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/fast/forms/input-disabled-color.html 2011-10-07 17:44:07 UTC (rev 96958)
@@ -23,5 +23,10 @@
<input type=text style="color:red; background-color:grey" value="This text field is not disabled" ><br>
<input type=text style="color:grey; background-color:red" disabled value="The text in this disabled field should displayed as dimmed or grey" >
<input type=text style="color:grey; background-color:red" value="This text field is not disabled" ><br>
+<input type=text style="color:red; background-color:white" disabled value="The text in this disabled field should displayed as dimmed or grey" >
+<input type=text style="color:red; background-color:white" value="This text field is not disabled" ><br>
+<input type=text style="color:red; background-color:transparent" disabled value="The text in this disabled field should displayed as dimmed or grey" >
+<input type=text style="color:red; background-color:transparent" value="This text field is not disabled" ><br>
</body>
-</html>
\ No newline at end of file
+</html>
+
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (96957 => 96958)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-10-07 17:44:07 UTC (rev 96958)
@@ -3798,4 +3798,7 @@
// Broken in r96745.
BUGWK69494 WIN : webaudio/audiobuffersource-playbackrate.html = AUDIO
+// Need rebaseline
+BUGWK65361 : fast/forms/input-disabled-color.html = IMAGE+TEXT
+
BUGWK69587 : editing/pasteboard/smart-paste-008.html = IMAGE+TEXT
Modified: trunk/LayoutTests/platform/gtk/fast/forms/input-disabled-color-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/forms/input-disabled-color-expected.txt (96957 => 96958)
--- trunk/LayoutTests/platform/gtk/fast/forms/input-disabled-color-expected.txt 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/platform/gtk/fast/forms/input-disabled-color-expected.txt 2011-10-07 17:44:07 UTC (rev 96958)
@@ -61,6 +61,16 @@
text run at (198,314) width 4: " "
RenderTextControl {INPUT} at (204,311) size 194x25 [color=#808080] [bgcolor=#FF0000] [border: (2px inset #808080)]
RenderBR {BR} at (400,329) size 0x0
+ RenderTextControl {INPUT} at (2,340) size 194x25 [color=#FF0000] [bgcolor=#FFFFFF] [border: (2px inset #FF0000)]
+ RenderText {#text} at (198,343) size 4x19
+ text run at (198,343) width 4: " "
+ RenderTextControl {INPUT} at (204,340) size 194x25 [color=#FF0000] [bgcolor=#FFFFFF] [border: (2px inset #FF0000)]
+ RenderBR {BR} at (400,358) size 0x0
+ RenderTextControl {INPUT} at (2,369) size 194x25 [color=#FF0000] [border: (2px inset #FF0000)]
+ RenderText {#text} at (198,372) size 4x19
+ text run at (198,372) width 4: " "
+ RenderTextControl {INPUT} at (204,369) size 194x25 [color=#FF0000] [border: (2px inset #FF0000)]
+ RenderBR {BR} at (400,387) size 0x0
layer at (13,32) size 188x19 scrollWidth 464
RenderBlock {DIV} at (3,3) size 188x19 [color=#545454]
RenderText {#text} at (1,0) size 462x19
@@ -149,3 +159,19 @@
RenderBlock {DIV} at (3,3) size 188x19
RenderText {#text} at (1,0) size 201x19
text run at (1,0) width 201: "This text field is not disabled"
+layer at (13,351) size 188x19 scrollWidth 464
+ RenderBlock {DIV} at (3,3) size 188x19
+ RenderText {#text} at (1,0) size 462x19
+ text run at (1,0) width 462: "The text in this disabled field should displayed as dimmed or grey"
+layer at (215,351) size 188x19 scrollWidth 203
+ RenderBlock {DIV} at (3,3) size 188x19
+ RenderText {#text} at (1,0) size 201x19
+ text run at (1,0) width 201: "This text field is not disabled"
+layer at (13,380) size 188x19 scrollWidth 464
+ RenderBlock {DIV} at (3,3) size 188x19
+ RenderText {#text} at (1,0) size 462x19
+ text run at (1,0) width 462: "The text in this disabled field should displayed as dimmed or grey"
+layer at (215,380) size 188x19 scrollWidth 203
+ RenderBlock {DIV} at (3,3) size 188x19
+ RenderText {#text} at (1,0) size 201x19
+ text run at (1,0) width 201: "This text field is not disabled"
Modified: trunk/LayoutTests/platform/mac/test_expectations.txt (96957 => 96958)
--- trunk/LayoutTests/platform/mac/test_expectations.txt 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/platform/mac/test_expectations.txt 2011-10-07 17:44:07 UTC (rev 96958)
@@ -29,3 +29,6 @@
BUGWK67007 DEBUG : fast/ruby/after-table-doesnt-crash.html = CRASH
BUGWK67007 DEBUG : fast/ruby/generated-after-counter-doesnt-crash.html = CRASH
BUGWK67007 DEBUG : fast/ruby/generated-before-and-after-counter-doesnt-crash.html = CRASH
+
+// Need rebaseline
+BUGWK65361 : fast/forms/input-disabled-color.html = IMAGE+TEXT
Modified: trunk/LayoutTests/platform/qt/test_expectations.txt (96957 => 96958)
--- trunk/LayoutTests/platform/qt/test_expectations.txt 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/platform/qt/test_expectations.txt 2011-10-07 17:44:07 UTC (rev 96958)
@@ -26,3 +26,6 @@
BUGWK67007 DEBUG : fast/ruby/after-table-doesnt-crash.html = CRASH
BUGWK67007 DEBUG : fast/ruby/generated-after-counter-doesnt-crash.html = CRASH
BUGWK67007 DEBUG : fast/ruby/generated-before-and-after-counter-doesnt-crash.html = CRASH
+
+// Need rebaseline
+BUGWK65361 : fast/forms/input-disabled-color.html = IMAGE+TEXT
Modified: trunk/LayoutTests/platform/win/test_expectations.txt (96957 => 96958)
--- trunk/LayoutTests/platform/win/test_expectations.txt 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/LayoutTests/platform/win/test_expectations.txt 2011-10-07 17:44:07 UTC (rev 96958)
@@ -6,3 +6,6 @@
BUGWK67007 DEBUG : fast/ruby/after-table-doesnt-crash.html = CRASH
BUGWK67007 DEBUG : fast/ruby/generated-after-counter-doesnt-crash.html = CRASH
BUGWK67007 DEBUG : fast/ruby/generated-before-and-after-counter-doesnt-crash.html = CRASH
+
+// Need rebaseline
+BUGWK65361 : fast/forms/input-disabled-color.html = IMAGE+TEXT
Modified: trunk/Source/WebCore/ChangeLog (96957 => 96958)
--- trunk/Source/WebCore/ChangeLog 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/Source/WebCore/ChangeLog 2011-10-07 17:44:07 UTC (rev 96958)
@@ -1,3 +1,15 @@
+2011-10-07 Vineet Chaudary <[email protected]>
+
+ background-color affects the font color in disabled textarea.
+ https://bugs.webkit.org/show_bug.cgi?id=65361
+
+ Reviewed by Darin Adler.
+
+ For the transparent/translucent background colors use lightening fortext color.
+
+ * rendering/RenderTextControl.cpp:
+ (WebCore::disabledTextColor):
+
2011-10-07 David Barr <[email protected]>
Implement currentColor support for box-shadow and text-shadow
Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (96957 => 96958)
--- trunk/Source/WebCore/rendering/RenderTextControl.cpp 2011-10-07 17:33:55 UTC (rev 96957)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp 2011-10-07 17:44:07 UTC (rev 96958)
@@ -36,13 +36,15 @@
// Value chosen by observation. This can be tweaked.
static const int minColorContrastValue = 1300;
+// For transparent or translucent background color, use lightening.
+static const int minDisabledColorAlphaValue = 128;
static Color disabledTextColor(const Color& textColor, const Color& backgroundColor)
{
// The explicit check for black is an optimization for the 99% case (black on white).
// This also means that black on black will turn into grey on black when disabled.
Color disabledColor;
- if (textColor.rgb() == Color::black || differenceSquared(textColor, Color::white) > differenceSquared(backgroundColor, Color::white))
+ if (textColor.rgb() == Color::black || backgroundColor.alpha() < minDisabledColorAlphaValue || differenceSquared(textColor, Color::white) > differenceSquared(backgroundColor, Color::white))
disabledColor = textColor.light();
else
disabledColor = textColor.dark();