Changeset 144726 in webkit
- Timestamp:
- Mar 4, 2013, 10:57:55 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/Element/getAttribute-case-insensitivity-expected.txt (added)
-
LayoutTests/fast/dom/Element/getAttribute-case-insensitivity.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Element.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r144724 r144726 1 2013-03-04 Arpita Bahuguna <a.bah@samsung.com> 2 3 getAttribute does not behave correctly for mixed-case attributes on HTML elements 4 https://bugs.webkit.org/show_bug.cgi?id=105713 5 6 Reviewed by Andreas Kling. 7 8 * fast/dom/Element/getAttribute-case-insensitivity-expected.txt: Added. 9 * fast/dom/Element/getAttribute-case-insensitivity.html: Added. 10 Layout test added for verifying that getAttribute() and getAttributeNode() 11 APIs convert the passed attribute name to lowercase before comparing 12 against the existing attributes. 13 1 14 2013-03-04 Joshua Bell <jsbell@chromium.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r144725 r144726 1 2013-03-04 Arpita Bahuguna <a.bah@samsung.com> 2 3 getAttribute does not behave correctly for mixed-case attributes on HTML elements 4 https://bugs.webkit.org/show_bug.cgi?id=105713 5 6 Reviewed by Andreas Kling. 7 8 getAttribute() and getAttributeNode() APIs do not convert the 9 passed attribute name to lowercase before comparing against the 10 existing attributes. 11 The specification however states that the passed name should 12 be converted to ASCII lowercase before checking for the existence 13 of the given attribute. [www.w3.org/TR/domcore/#dom-element-getattribute] 14 15 Test: fast/dom/Element/getAttribute-case-insensitivity.html 16 17 * dom/Element.h: 18 (WebCore::ElementData::getAttributeItemIndex): 19 getAttributeItemIndex() accepts a bool param 'shouldIgnoreAttributeCase' 20 which specifies whether the attribute's case should be ignored 21 before comparison. But inspite of this param's value we still carry 22 out a case sensitive search. 23 Have modified the same to convert the passed attribute's name to 24 lowercase if 'shouldIgnoreAttributeCase' is true. 25 1 26 2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org> 2 27 -
trunk/Source/WebCore/dom/Element.h
r144010 r144726 942 942 const Attribute* attribute = attributeItem(i); 943 943 if (!attribute->name().hasPrefix()) { 944 if ( name== attribute->localName())944 if ((shouldIgnoreAttributeCase ? name.lower() : name) == attribute->localName()) 945 945 return i; 946 946 } else
Note:
See TracChangeset
for help on using the changeset viewer.