Changeset 106792 in webkit
- Timestamp:
- Feb 6, 2012 2:18:57 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106789 r106792 1 2012-02-06 Joe Thomas <joethomas@motorola.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=76995. 4 WebKit fails IETC :indeterminate and input type=radio test. 5 6 All input types should respect indeterminate property(getter and setter). This is true with other browsers. 7 Indeterminate appearance for radio input type is supported by IOS platform. Webkit need not support indeterminate appearance 8 for radio input type on other platforms. 9 10 Reviewed by Kent Tamura. 11 12 * fast/forms/indeterminate-input-types-expected.txt: Added. 13 * fast/forms/indeterminate-input-types.html: Added. 14 * fast/forms/indeterminate-radio.html: 15 1 16 2012-02-06 Nikolas Zimmermann <nzimmermann@rim.com> 2 17 -
trunk/LayoutTests/fast/forms/indeterminate-radio.html
r105980 r106792 6 6 div 7 7 { 8 color: red;8 color: green; 9 9 } 10 10 input:indeterminate + #test 11 11 { 12 color: green;12 color: red; 13 13 } 14 14 </style> -
trunk/Source/WebCore/ChangeLog
r106791 r106792 1 2012-02-06 Joe Thomas <joethomas@motorola.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=76995. 4 WebKit fails IETC :indeterminate and input type=radio test. 5 6 All input types should respect indeterminate property(getter and setter). This is true with other browsers. 7 Indeterminate appearance for radio input type is supported by IOS platform. Webkit need not support indeterminate appearance 8 for radio input type on other platforms. 9 10 Reviewed by Kent Tamura. 11 12 Test: fast/forms/indeterminate-input-types.html 13 14 * html/CheckboxInputType.cpp: 15 (WebCore::CheckboxInputType::supportsIndeterminateAppearance): Checks indeterminate appearance is supported. 16 (WebCore): 17 * html/CheckboxInputType.h: 18 (CheckboxInputType): 19 * html/HTMLInputElement.cpp: 20 (WebCore::HTMLInputElement::setIndeterminate): Removed the check isCheckable(). 21 (WebCore::HTMLInputElement::isIndeterminate): Checks indeterminate appearance is supported. 22 (WebCore): 23 * html/HTMLInputElement.h: 24 (HTMLInputElement): 25 * html/InputType.cpp: 26 (WebCore::InputType::supportsIndeterminateAppearance): Checks indeterminate appearance is supported. 27 (WebCore): 28 * html/InputType.h: 29 (InputType): 30 * html/RadioInputType.cpp: 31 (WebCore::RadioInputType::willDispatchClick): Indeterminate related code is moved to IOS specific. 32 (WebCore::RadioInputType::didDispatchClick): Ditto. 33 (WebCore::RadioInputType::supportsIndeterminateAppearance): Checks indeterminate appearance is supported. 34 (WebCore): 35 * html/RadioInputType.h: 36 (RadioInputType): 37 1 38 2012-02-06 Robin Cao <robin.cao@torchmobile.com.cn> 2 39 -
trunk/Source/WebCore/html/CheckboxInputType.cpp
r105710 r106792 102 102 } 103 103 104 bool CheckboxInputType::supportsIndeterminateAppearance() const 105 { 106 return true; 107 } 108 104 109 } // namespace WebCore -
trunk/Source/WebCore/html/CheckboxInputType.h
r103400 r106792 49 49 virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE; 50 50 virtual bool isCheckbox() const OVERRIDE; 51 virtual bool supportsIndeterminateAppearance() const OVERRIDE; 51 52 }; 52 53 -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r106769 r106792 935 935 void HTMLInputElement::setIndeterminate(bool newValue) 936 936 { 937 if ( !m_inputType->isCheckable() ||indeterminate() == newValue)937 if (indeterminate() == newValue) 938 938 return; 939 939 … … 1818 1818 } 1819 1819 1820 bool HTMLInputElement::isIndeterminate() const 1821 { 1822 return m_inputType->supportsIndeterminateAppearance() && indeterminate(); 1823 } 1824 1820 1825 } // namespace -
trunk/Source/WebCore/html/HTMLInputElement.h
r106769 r106792 129 129 // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state 130 130 bool shouldAppearChecked() const; 131 virtual bool isIndeterminate() const { return indeterminate(); }131 virtual bool isIndeterminate() const; 132 132 133 133 int size() const; -
trunk/Source/WebCore/html/InputType.cpp
r105937 r106792 732 732 } 733 733 734 bool InputType::supportsIndeterminateAppearance() const 735 { 736 return false; 737 } 738 734 739 namespace InputTypeNames { 735 740 -
trunk/Source/WebCore/html/InputType.h
r105937 r106792 264 264 virtual String serialize(double) const; 265 265 266 virtual bool supportsIndeterminateAppearance() const; 267 266 268 protected: 267 269 InputType(HTMLInputElement* element) : m_element(element) { } -
trunk/Source/WebCore/html/RadioInputType.cpp
r105710 r106792 153 153 154 154 state->checked = element()->checked(); 155 state->checkedRadioButton = element()->checkedRadioButtons().checkedButtonForGroup(element()->name()); 156 157 #if PLATFORM(IOS) 155 158 state->indeterminate = element()->indeterminate(); 156 state->checkedRadioButton = element()->checkedRadioButtons().checkedButtonForGroup(element()->name());157 159 158 160 if (element()->indeterminate()) 159 161 element()->setIndeterminate(false); 162 #endif 163 160 164 element()->setChecked(true, true); 161 165 … … 175 179 checkedRadioButton->setChecked(true); 176 180 } 181 182 #if PLATFORM(IOS) 177 183 element()->setIndeterminate(state.indeterminate); 184 #endif 185 178 186 } 179 187 … … 187 195 } 188 196 197 bool RadioInputType::supportsIndeterminateAppearance() const 198 { 199 #if PLATFORM(IOS) 200 return true; 201 #else 202 return false; 203 #endif 204 } 205 189 206 } // namespace WebCore -
trunk/Source/WebCore/html/RadioInputType.h
r105710 r106792 53 53 virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE; 54 54 virtual bool isRadioButton() const OVERRIDE; 55 virtual bool supportsIndeterminateAppearance() const OVERRIDE; 55 56 }; 56 57
Note: See TracChangeset
for help on using the changeset viewer.