Bug 148843 - Element.tagName should be upper-case for HTML elements in HTML documents
Summary: Element.tagName should be upper-case for HTML elements in HTML documents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2015-09-04 16:22 PDT by Ryosuke Niwa
Modified: 2015-09-11 07:51 PDT (History)
7 users (show)

See Also:


Attachments
Patch (9.74 KB, patch)
2015-09-10 21:03 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-09-04 16:22:15 PDT
When creating an element with createElementNS, we should not preserve the cases.
e.g. document.createElementNS(HTMLNS, "html:table").tagName should be "HTML:TABLE" instead of "html:table".

See https://dom.spec.whatwg.org/#dom-document-createelementns

This bug was found by the newly added test:
LayoutTests/http/tests/w3c/html/semantics/tabular-data/the-table-element/table-insertRow.html
Comment 1 Radar WebKit Bug Importer 2015-09-04 16:24:02 PDT
<rdar://problem/22587044>
Comment 2 Ryosuke Niwa 2015-09-04 16:25:36 PDT
<rdar://problem/22559081>
Comment 3 Ryosuke Niwa 2015-09-04 16:31:43 PDT
document.implementation.createDocument("http://www.w3.org/1999/xhtml", "div", null).createElementNS("http://www.w3.org/1999/xhtml", "i").tagName

fails but

document.createElementNS("http://www.w3.org/1999/xhtml", "i").tagName

successfully upper-cases the tag name so there's some XHTML document weirdness going on here.
Comment 4 Chris Dumez 2015-09-10 21:03:52 PDT
Created attachment 260986 [details]
Patch
Comment 5 WebKit Commit Bot 2015-09-11 07:51:44 PDT
Comment on attachment 260986 [details]
Patch

Clearing flags on attachment: 260986

Committed r189618: <http://trac.webkit.org/changeset/189618>
Comment 6 WebKit Commit Bot 2015-09-11 07:51:49 PDT
All reviewed patches have been landed.  Closing bug.