https://bugs.webkit.org/show_bug.cgi?id=76995.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 08:06:16 +0000 (08:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 08:06:16 +0000 (08:06 +0000)
WebKit fails IETC :indeterminate and input type=radio test.

As per the HTML spec http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#dom-input-indeterminate,
only checkbox input type should respect the indeterminate state.
Removed the support for indeterminate state for radio input types.

Source/WebCore:

Patch by Joe Thomas <joethomas@motorola.com> on 2012-01-26
Reviewed by Eric Seidel.

Modified the existing test cases.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setIndeterminate): Indeterminate state is supported only for checkbox input type.

LayoutTests:

Modified the existing test cases.

Patch by Joe Thomas <joethomas@motorola.com> on 2012-01-26
Reviewed by Eric Seidel.

* fast/forms/indeterminate-radio.html:
* fast/forms/radio-checkbox-restore-indeterminate.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105968 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/forms/indeterminate-radio.html
LayoutTests/fast/forms/radio-checkbox-restore-indeterminate.html
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLInputElement.cpp

index 5ee6b5c..13a27ff 100644 (file)
@@ -1,3 +1,19 @@
+2012-01-26  Joe Thomas  <joethomas@motorola.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=76995.
+        WebKit fails IETC :indeterminate and input type=radio test.
+
+        As per the HTML spec http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#dom-input-indeterminate,
+        only checkbox input type should respect the indeterminate state.
+        Removed the support for indeterminate state for radio input types.
+
+        Modified the existing test cases.
+
+        Reviewed by Eric Seidel.
+
+        * fast/forms/indeterminate-radio.html:
+        * fast/forms/radio-checkbox-restore-indeterminate.html:
+
 2012-01-25  Levi Weintraub  <leviw@chromium.org>
 
         Layout Test fast/js/dfg-uint32array-overflow-values.html is slow on Chromium Debug bots
index d484404..d3239e3 100644 (file)
@@ -5,11 +5,11 @@
     <style type="text/css">
     div
     {
-        color: red;
+        color: green;
     }
     input:indeterminate + #test
     {
-        color: green;
+        color: red;
     }
 </style>
 </head>
index fb89ccf..16ccdd8 100644 (file)
@@ -67,8 +67,8 @@
         log('Click unselected all radio buttons: FAIL');
 
         log('<br>Checking whether default-prevented click clobbered indeterminate state:')
-        log('On checked radio button: ' + (radio3.indeterminate ? 'PASS' : 'FAIL'));
-        log('On unchecked radio button: ' + (radio4.indeterminate ? 'PASS' : 'FAIL'));
+        log('On checked radio button: ' + (!radio3.indeterminate ? 'PASS' : 'FAIL'));
+        log('On unchecked radio button: ' + (!radio4.indeterminate ? 'PASS' : 'FAIL'));
         log('On checked checkbox: ' + (check1.indeterminate ? 'PASS' : 'FAIL'));
         log('On unchecked checkbox: ' + (check2.indeterminate ? 'PASS' : 'FAIL'));
 
index f267670..4e28047 100644 (file)
@@ -1,3 +1,19 @@
+2012-01-26  Joe Thomas  <joethomas@motorola.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=76995.
+        WebKit fails IETC :indeterminate and input type=radio test.
+
+        As per the HTML spec http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#dom-input-indeterminate,
+        only checkbox input type should respect the indeterminate state.
+        Removed the support for indeterminate state for radio input types.
+
+        Reviewed by Eric Seidel.
+
+        Modified the existing test cases.
+
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::setIndeterminate): Indeterminate state is supported only for checkbox input type.
+
 2012-01-25  Daniel Cheng  <dcheng@chromium.org>
 
         [chromium] Fix ClipboardChromium::validateFilename to actually operate on extensions
index 413c127..a231b6f 100644 (file)
@@ -946,7 +946,7 @@ void HTMLInputElement::setChecked(bool nowChecked, bool sendChangeEvent)
 
 void HTMLInputElement::setIndeterminate(bool newValue)
 {
-    if (!m_inputType->isCheckable() || indeterminate() == newValue)
+    if (!isCheckbox() || indeterminate() == newValue)
         return;
 
     m_isIndeterminate = newValue;