Bug 44494

Summary: Disallow setting Document.xmlVersion to unsupported versions
Product: WebKit Reporter: Andreas Kling <kling>
Component: DOMAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: abarth, cdumez, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Proposed patch
Proposed patch none

Description Andreas Kling 2010-08-24 00:11:29 PDT
Document.xmlVersion can currently be set to any string.

According to DOM Level 3 Core, it should throw NOT_SUPPORTED_ERR if you attempt to set an unsupported version.

Spec link:

This would fix the following in-tree tests which currently expect failure due to us lying about XML 1.1 support:
- dom/xhtml/level3/core/canonicalform06.xhtml
- dom/xhtml/level3/core/documentsetxmlversion01.xhtml
- dom/xhtml/level3/core/documentsetxmlversion05.xhtml
- dom/xhtml/level3/core/infoset06.xhtml
- dom/xhtml/level3/core/infoset07.xhtml
- dom/xhtml/level3/core/wellformed01.xhtml
- dom/xhtml/level3/core/wellformed02.xhtml
- dom/xhtml/level3/core/wellformed03.xhtml
- dom/xhtml/level3/core/wellformed04.xhtml

This test will break (it checks if XML 1.1 is supported by setting document.xmlVersion = '1.1'):
Comment 1 Andreas Kling 2010-08-24 00:21:00 PDT
Created attachment 65223 [details]
Proposed patch
Comment 2 Andreas Kling 2010-08-24 00:26:57 PDT
Created attachment 65224 [details]
Proposed patch
Comment 3 Tor Arne Vestbø 2010-08-24 01:31:44 PDT
Comment on attachment 65224 [details]
Proposed patch

Comment 4 Andreas Kling 2010-08-24 01:55:36 PDT
Comment on attachment 65224 [details]
Proposed patch

Clearing flags on attachment: 65224

Committed r65878: <http://trac.webkit.org/changeset/65878>
Comment 5 Andreas Kling 2010-08-24 01:55:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Review Bot 2010-08-24 02:31:21 PDT
http://trac.webkit.org/changeset/65878 might have broken GTK Linux 32-bit Release
Comment 7 Lucas Forschler 2019-02-06 09:03:09 PST
Mass moving XML DOM bugs to the "DOM" Component.