Title: [102320] trunk
- Revision
- 102320
- Author
- [email protected]
- Date
- 2011-12-07 23:53:01 -0800 (Wed, 07 Dec 2011)
Log Message
CSS color gets adjusted for disabled input elements
https://bugs.webkit.org/show_bug.cgi?id=54643
Patch by Yosifumi Inoue <[email protected]> on 2011-12-07
Reviewed by Kent Tamura.
Source/WebCore:
No new tests. covered by existing tests. Need rebasing some existing tests for Chromimum.
Remove automatic color adjustment for disabled text control for Chromimum.
* css/themeChromium.css: Add CSS entries for default style for disabled input and textarea elements.
* WebCore/rendering/RenderTextControl.cpp:
(disabledTextColor): Removed for PLATFORM(CHROMIUM)
(RenderTextControl::adjustInnerTextStyle): Don't call disabledTextColor for Chromium.
LayoutTests:
* platform/chromium/test_expectations.txt: Add files need to be updated.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (102319 => 102320)
--- trunk/LayoutTests/ChangeLog 2011-12-08 07:33:51 UTC (rev 102319)
+++ trunk/LayoutTests/ChangeLog 2011-12-08 07:53:01 UTC (rev 102320)
@@ -1,3 +1,12 @@
+2011-12-07 Yosifumi Inoue <[email protected]>
+
+ CSS color gets adjusted for disabled input elements
+ https://bugs.webkit.org/show_bug.cgi?id=54643
+
+ Reviewed by Kent Tamura.
+
+ * platform/chromium/test_expectations.txt: Add files need to be updated.
+
2011-12-07 Dmitry Lomov <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=74038
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (102319 => 102320)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-12-08 07:33:51 UTC (rev 102319)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-12-08 07:53:01 UTC (rev 102320)
@@ -3788,6 +3788,17 @@
BUGWK73838 LEOPARD DEBUG : animations/animation-add-events-in-handler.html = CRASH
+// Need rebase - Removing auto gray for disabled text inputs.
+BUGWK54643 : fast/forms/basic-inputs.html = FAIL
+BUGWK54643 : fast/forms/basic-textareas-quirks.html = FAIL
+BUGWK54643 : fast/forms/basic-textareas.html = FAIL
+BUGWK54643 : fast/forms/file/file-input-disabled.html = FAIL
+BUGWK54643 : fast/forms/input-appearance-disabled.html = FAIL
+BUGWK54643 : fast/forms/input-disabled-color.html = FAIL
+BUGWK54643 : fast/forms/number/input-appearance-spinbutton-disabled-readonly.html = FAIL
+BUGWK54643 : fast/forms/placeholder-pseudo-style.html = FAIL
+BUGWK54643 : fast/forms/textarea-placeholder-pseudo-style.html = FAIL
+
// Need rebaseline on Linux and Win GPU
BUGWK73905 GPU LINUX : media/video-layer-crash.html = IMAGE+TEXT
BUGWK73905 GPU LINUX : media/video-transformed.html = IMAGE
Modified: trunk/Source/WebCore/ChangeLog (102319 => 102320)
--- trunk/Source/WebCore/ChangeLog 2011-12-08 07:33:51 UTC (rev 102319)
+++ trunk/Source/WebCore/ChangeLog 2011-12-08 07:53:01 UTC (rev 102320)
@@ -1,3 +1,19 @@
+2011-12-07 Yosifumi Inoue <[email protected]>
+
+ CSS color gets adjusted for disabled input elements
+ https://bugs.webkit.org/show_bug.cgi?id=54643
+
+ Reviewed by Kent Tamura.
+
+ No new tests. covered by existing tests. Need rebasing some existing tests for Chromimum.
+
+ Remove automatic color adjustment for disabled text control for Chromimum.
+
+ * css/themeChromium.css: Add CSS entries for default style for disabled input and textarea elements.
+ * WebCore/rendering/RenderTextControl.cpp:
+ (disabledTextColor): Removed for PLATFORM(CHROMIUM)
+ (RenderTextControl::adjustInnerTextStyle): Don't call disabledTextColor for Chromium.
+
2011-12-07 Dmitry Lomov <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=74038
Modified: trunk/Source/WebCore/css/themeChromium.css (102319 => 102320)
--- trunk/Source/WebCore/css/themeChromium.css 2011-12-08 07:33:51 UTC (rev 102319)
+++ trunk/Source/WebCore/css/themeChromium.css 2011-12-08 07:53:01 UTC (rev 102320)
@@ -70,3 +70,8 @@
font-size: smaller;
color: #444;
}
+
+input:disabled, isindex:disabled, textarea:disabled {
+ color: #545454; /* Color::light() for #000000. See RenderTextControl.cpp:disabledTextColor */
+}
+
Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (102319 => 102320)
--- trunk/Source/WebCore/rendering/RenderTextControl.cpp 2011-12-08 07:33:51 UTC (rev 102319)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp 2011-12-08 07:53:01 UTC (rev 102320)
@@ -34,6 +34,7 @@
namespace WebCore {
+#if !PLATFORM(CHROMIUM)
// Value chosen by observation. This can be tweaked.
static const int minColorContrastValue = 1300;
// For transparent or translucent background color, use lightening.
@@ -57,6 +58,7 @@
return disabledColor;
}
+#endif
RenderTextControl::RenderTextControl(Node* node)
: RenderBlock(node)
@@ -119,8 +121,13 @@
textBlockStyle->setUnicodeBidi(style()->unicodeBidi());
bool disabled = updateUserModifyProperty(node(), textBlockStyle);
- if (disabled)
+ if (disabled) {
+#if PLATFORM(CHROMIUM)
+ textBlockStyle->setColor(textBlockStyle->visitedDependentColor(CSSPropertyColor));
+#else
textBlockStyle->setColor(disabledTextColor(textBlockStyle->visitedDependentColor(CSSPropertyColor), startStyle->visitedDependentColor(CSSPropertyBackgroundColor)));
+#endif
+ }
}
int RenderTextControl::textBlockHeight() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes