summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 20:23:39 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 20:23:39 +0000
commit8acfeb388ff606818c6c05bfbff1c567a403f5b9 (patch)
tree770404f80a834b4f05508ea878f55438d6406f0a
parentab0e2220a2038f42c47ce6cf68691cc0e24b3eb0 (diff)
downloadchromium_src-8acfeb388ff606818c6c05bfbff1c567a403f5b9.zip
chromium_src-8acfeb388ff606818c6c05bfbff1c567a403f5b9.tar.gz
chromium_src-8acfeb388ff606818c6c05bfbff1c567a403f5b9.tar.bz2
Adjust the readonly form control state to no longer look
disabled. This matches other browsers and is roughly the patch I sent upstream. Our classic mode text inputs still needs some love, but I will do that in a separate change. BUG=1542 Review URL: http://codereview.chromium.org/8941 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4316 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.checksum2
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.pngbin3900 -> 3892 bytes
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.checksum2
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.pngbin4103 -> 4079 bytes
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.checksum2
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.pngbin3922 -> 3938 bytes
-rw-r--r--webkit/port/rendering/RenderThemeWin.cpp21
-rw-r--r--webkit/tools/layout_tests/test_lists/win/tests_fixable.txt1
8 files changed, 11 insertions, 17 deletions
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.checksum
index 6d72a65..c901478 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.checksum
+++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.checksum
@@ -1 +1 @@
-6e3a71182acc3aea2dde9ef466061e04 \ No newline at end of file
+2a8fcbf03fceabdc26b9d90f28235082 \ No newline at end of file
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.png
index a4fbb76..9549e45 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.png
+++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-appearance-readonly-expected.png
Binary files differ
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.checksum
index fef75e6..b54bba8c 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.checksum
+++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.checksum
@@ -1 +1 @@
-df9c7fad4c3e7ab48eab54b633f690cd \ No newline at end of file
+1dec66ed353db4787216d7561c877158 \ No newline at end of file
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.png
index 601e24b..a11a3b3 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.png
+++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-dimmed-expected.png
Binary files differ
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.checksum
index efa3775..9ecfeb8 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.checksum
+++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.checksum
@@ -1 +1 @@
-47e7d1c11bdd7f3b636fe1ae9b98d17f \ No newline at end of file
+628cd22fc1350094ef07129e982a9f0a \ No newline at end of file
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.png
index 3a09c40..fdfce51 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.png
+++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/forms/input-readonly-empty-expected.png
Binary files differ
diff --git a/webkit/port/rendering/RenderThemeWin.cpp b/webkit/port/rendering/RenderThemeWin.cpp
index 859df7d..aeac95d 100644
--- a/webkit/port/rendering/RenderThemeWin.cpp
+++ b/webkit/port/rendering/RenderThemeWin.cpp
@@ -414,22 +414,17 @@ bool RenderThemeWin::supportsFocusRing(const RenderStyle* style) const
unsigned RenderThemeWin::determineState(RenderObject* o)
{
unsigned result = TS_NORMAL;
- if (!isEnabled(o)) {
+ EAppearance appearance = o->style()->appearance();
+ if (!isEnabled(o))
result = TS_DISABLED;
- } else if (isReadOnlyControl(o)) {
- if (o->style()->appearance() == CheckboxAppearance ||
- o->style()->appearance() == RadioAppearance) {
- result = TS_DISABLED;
- } else if (o->style()->appearance() == TextFieldAppearance) {
- result = ETS_READONLY; // Readonly is supported on textfields.
- }
- } else if (isPressed(o)) { // Active overrides hover and focused.
+ else if (isReadOnlyControl(o) && (TextFieldAppearance == appearance || TextAreaAppearance == appearance))
+ result = ETS_READONLY; // Readonly is supported on textfields.
+ else if (isPressed(o)) // Active overrides hover and focused.
result = TS_PRESSED;
- } else if (supportsFocus(o->style()->appearance()) && isFocused(o)) {
+ else if (supportsFocus(appearance) && isFocused(o))
result = ETS_FOCUSED;
- } else if (isHovered(o)) {
+ else if (isHovered(o))
result = TS_HOT;
- }
if (isChecked(o))
result += 4; // 4 unchecked states, 4 checked states.
return result;
@@ -438,7 +433,7 @@ unsigned RenderThemeWin::determineState(RenderObject* o)
unsigned RenderThemeWin::determineClassicState(RenderObject* o)
{
unsigned result = 0;
- if (!isEnabled(o) || isReadOnlyControl(o))
+ if (!isEnabled(o))
result = DFCS_INACTIVE;
else if (isPressed(o)) // Active supersedes hover
result = DFCS_PUSHED;
diff --git a/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt
index 3c91e53..2882481 100644
--- a/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt
@@ -1274,7 +1274,6 @@ V8 | KJS # LayoutTests/fast/forms/select-initial-position.html = FAIL
V8 | KJS # LayoutTests/fast/forms/select-item-background-clip.html = FAIL
V8 | KJS # LayoutTests/fast/forms/select-visual-hebrew.html = FAIL | PASS
V8 | KJS # LayoutTests/fast/forms/textarea-rows-cols.html = FAIL
-V8 | KJS # LayoutTests/fast/forms/visual-hebrew-text-field.html = FAIL
V8 | KJS # LayoutTests/fast/frames/invalid.html = FAIL
V8 | KJS # LayoutTests/fast/frames/onlyCommentInIFrame.html = FAIL
V8 | KJS # LayoutTests/fast/frames/valid.html = FAIL