Changeset 97741 in webkit
- Timestamp:
- Oct 18, 2011 5:39:11 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r97738 r97741 1 2011-10-18 Sachin Puranik <jcqt43@motorola.com> 2 3 Option.value should trim extra internal html spaces 4 https://bugs.webkit.org/show_bug.cgi?id=69455 5 6 Reviewed by Kent Tamura. 7 8 Currently option.value does not trim the internal white space as suggested by spec. This patch implements the same. 9 10 * fast/forms/option-value-trim-html-spaces-expected.txt: Test case to test the text triming on the value attribute. 11 * fast/forms/option-value-trim-html-spaces.html: Test case to test the text triming on the value attribute. 12 1 13 2011-10-18 Mihnea Ovidenie <mihnea@adobe.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r97738 r97741 1 2011-10-18 Sachin Puranik <jcqt43@motorola.com> 2 3 Option.value should trim extra internal html spaces 4 https://bugs.webkit.org/show_bug.cgi?id=69455 5 6 Reviewed by Kent Tamura. 7 8 Currently option.value does not trim the internal white space as suggested by spec. This patch implements the same. 9 10 Test: fast/forms/option-value-trim-html-spaces.html 11 12 * dom/OptionElement.cpp: Removed a function as this implementation is moved to the HTMLOptionElement.cpp file. 13 * html/HTMLOptionElement.cpp: 14 (WebCore::HTMLOptionElement::value): Implementation of .value function which will now trim the html white spaces. 15 1 16 2011-10-18 Mihnea Ovidenie <mihnea@adobe.com> 2 17 -
trunk/Source/WebCore/dom/OptionElement.cpp
r97720 r97741 118 118 } 119 119 120 String OptionElement::collectOptionValue(const OptionElementData& data, const Element* element)121 {122 String value = data.value();123 if (!value.isNull())124 return value;125 126 // Use the text if the value wasn't set.127 return collectOptionInnerText(element).stripWhiteSpace();128 }129 130 120 // OptionElementData 131 121 OptionElementData::OptionElementData() -
trunk/Source/WebCore/html/HTMLOptionElement.cpp
r97533 r97741 156 156 String HTMLOptionElement::value() const 157 157 { 158 return OptionElement::collectOptionValue(m_data, this); 158 if (!m_data.value().isNull()) 159 return m_data.value(); 160 161 return collectOptionInnerText(this).stripWhiteSpace(isHTMLSpace).simplifyWhiteSpace(isHTMLSpace); 162 159 163 } 160 164
Note: See TracChangeset
for help on using the changeset viewer.