Bug 44494 - Disallow setting Document.xmlVersion to unsupported versions
Summary: Disallow setting Document.xmlVersion to unsupported versions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 00:11 PDT by Andreas Kling
Modified: 2019-02-06 09:03 PST (History)
4 users (show)

See Also:


Attachments
Proposed patch (9.13 KB, patch)
2010-08-24 00:21 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch (9.14 KB, patch)
2010-08-24 00:26 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-version

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'):
dom/xhtml/level3/core/documentsetxmlversion03.xhtml
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

LGTM
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.