Bug 153112 - createAttribute should lowercase the attribute name in a HTML document
Summary: createAttribute should lowercase the attribute name in a HTML document
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-14 16:06 PST by Ryosuke Niwa
Modified: 2016-01-18 23:37 PST (History)
6 users (show)

See Also:


Attachments
Fixes the bug (33.24 KB, patch)
2016-01-15 19:29 PST, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>