Changeset 125257 in webkit
- Timestamp:
- Aug 10, 2012 12:42:06 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125254 r125257 1 2012-08-10 Arko Saha <arko@motorola.com> 2 3 itemType.add should treat \t as a space. 4 https://bugs.webkit.org/show_bug.cgi?id=92991 5 6 Reviewed by Ryosuke Niwa. 7 8 Added test to verifiy itemtype, itemref, itemprop attributes behavior on adding 9 a token in presence of trailing space characters. 10 Rebased existing test cases. 11 12 * fast/dom/HTMLElement/class-list-expected.txt: 13 * fast/dom/HTMLElement/class-list-quirks-expected.txt: 14 * fast/dom/HTMLElement/script-tests/class-list.js: 15 * fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt: 16 * fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js: 17 * fast/dom/MicroData/domsettabletokenlist-attributes-add-token-expected.txt: Added. 18 * fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html: Added. 19 1 20 2012-08-09 Matt Falkenhagen <falken@chromium.org> 2 21 -
trunk/LayoutTests/fast/dom/HTMLElement/class-list-expected.txt
r125239 r125257 25 25 Testing add in presence of trailing white spaces. 26 26 PASS element.className is "x y" 27 PASS element.className is "x\t 27 PASS element.className is "x\ty" 28 28 PASS element.className is " y" 29 29 Test invalid tokens -
trunk/LayoutTests/fast/dom/HTMLElement/class-list-quirks-expected.txt
r125239 r125257 25 25 Testing add in presence of trailing white spaces. 26 26 PASS element.className is "x y" 27 PASS element.className is "x\t 27 PASS element.className is "x\ty" 28 28 PASS element.className is " y" 29 29 Test invalid tokens -
trunk/LayoutTests/fast/dom/HTMLElement/script-tests/class-list.js
r125239 r125257 101 101 createElement('x\t'); 102 102 element.classList.add('y'); 103 shouldBeEqualToString('element.className', 'x\t 103 shouldBeEqualToString('element.className', 'x\ty'); 104 104 105 105 createElement(' '); -
trunk/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt
r124859 r125257 27 27 - Testing add in presence of trailing white spaces. 28 28 PASS element.htmlFor.toString() is "x y" 29 PASS element.htmlFor.toString() is "x\t 29 PASS element.htmlFor.toString() is "x\ty" 30 30 PASS element.htmlFor.toString() is " y" 31 31 - Test invalid tokens -
trunk/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js
r124859 r125257 102 102 createElement('x\t'); 103 103 element.htmlFor.add('y'); 104 shouldBeEqualToString('element.htmlFor.toString()', 'x\t 104 shouldBeEqualToString('element.htmlFor.toString()', 'x\ty'); 105 105 106 106 createElement(' '); -
trunk/Source/WebCore/ChangeLog
r125256 r125257 1 2012-08-10 Arko Saha <arko@motorola.com> 2 3 itemType.add should treat \t as a space. 4 https://bugs.webkit.org/show_bug.cgi?id=92991 5 6 Reviewed by Ryosuke Niwa. 7 8 Earlier we used to append a space character i.e, ' ' to the string builder 9 if the last character of input string is not a space character in addToken() 10 method. We should add an space character if the last character of input is 11 not a HTML Space character like, '\n', '\r', '\t', '\f' or ' '. 12 13 We can observe the same behavior in FireFox, Opera and IE. They also treat 14 HTML space character as a space. 15 16 Test: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html 17 18 * html/DOMTokenList.cpp: 19 (WebCore::DOMTokenList::addToken): 20 1 21 2012-08-10 Tony Chang <tony@chromium.org> 2 22 -
trunk/Source/WebCore/html/DOMTokenList.cpp
r99645 r125257 57 57 StringBuilder builder; 58 58 builder.append(input); 59 if ( input[input.length()-1] != ' ')59 if (!isHTMLSpace(input[input.length() - 1])) 60 60 builder.append(' '); 61 61 62 builder.append(token); 62 63 return builder.toString();
Note: See TracChangeset
for help on using the changeset viewer.