Bug 148843

Summary: Element.tagName should be upper-case for HTML elements in HTML documents
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, commit-queue, esprehn+autocc, gyuyoung.kim, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.