Bug 153112

Summary: createAttribute should lowercase the attribute name in a HTML document
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, commit-queue, darin, esprehn+autocc, kangil.han
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fixes the bug darin: review+

Description Ryosuke Niwa 2016-01-14 16:06:15 PST
Implement step 2 in: https://dom.spec.whatwg.org/#dom-document-createattribute

The createAttribute(localName) method, when invoked, must run these steps:

1. If localName does not match the Name production in XML, throw an InvalidCharacterError exception.
2. If the context object is an HTML document, let localName be converted to ASCII lowercase.
3. Return a new attribute whose local name is localName.
Comment 1 Ryosuke Niwa 2016-01-15 19:29:15 PST
Created attachment 269138 [details]
Fixes the bug
Comment 2 Darin Adler 2016-01-18 14:05:50 PST
Comment on attachment 269138 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=269138&action=review

> Source/WebCore/ChangeLog:8
> +        In a HTML document, we should always lowercase localName in document.createAttribute as specifid in

Typo: specified
Comment 3 Ryosuke Niwa 2016-01-18 23:37:42 PST
Committed r195248: <http://trac.webkit.org/changeset/195248>