gecko-dev/testing/web-platform/tests/domparsing
Kent Tamura a7a0e9b4ee Bug 1535765 [wpt PR 15779] - XMLSerializer: Keep redundant but harmless default namespace declarations, a=testonly
Automatic update from web-platform-tests
XMLSerializer: Keep redundant but harmless default namespace declarations

Since crrev.com/632142, XMLSerializer has dropped redundant xmlns="..."
declarations. It matches to IE, Edge, and DOM P&S standard.  This CL
reverts the behavior to unbreak existing applications.  The restored
behavior matches to Firefox and Safari.

* MarkupAccumulator::AppendElement():
  Even if ignore_namespace_definition_attribute_ is set, we drop a
  xmlns="..." only if its value is inconsistent with element's
  namespace.

* MarkupAccumulator::AppendStartTagOpen():
  if local_default_namespace is "" and ns is null, do not emit xmlns="".
  This avoids to serialize xmlns="" twice.

Bug: https://github.com/w3c/DOM-Parsing/issues/47
Bug: 940204
Change-Id: I2978ddc9a3f9511d227a9a1b902f1811ac1c3c07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1516124
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639873}

--

wpt-commits: 4dc79803ad127fb635a03ec8b248c8671b4c3b67
wpt-pr: 15779
2019-04-01 14:43:21 +01:00
..
createContextualFragment.html
DOMParser-parseFromString-html.html Bug 1529242 [wpt PR 15471] - domparsing: HTML Parser: Remove conditional parsing of <noembed> content, a=testonly 2019-03-16 12:13:06 +00:00
DOMParser-parseFromString-xml-doctype.html
DOMParser-parseFromString-xml-internal-subset.html
DOMParser-parseFromString-xml-parsererror.html
DOMParser-parseFromString-xml.html
innerhtml-01.xhtml
innerhtml-03.xhtml
innerhtml-04.html
innerhtml-05.xhtml
innerhtml-06.html
innerhtml-07.html
innerhtml-mxss.sub.html
insert-adjacent.html
insert_adjacent_html-xhtml.xhtml
insert_adjacent_html.html
insert_adjacent_html.js
interfaces.any.js
META.yml
outerhtml-01.html
outerhtml-02.html
style_attribute_html.html
xml-serialization.xhtml
xmldomparser.html
XMLSerializer-serializeToString.html Bug 1535765 [wpt PR 15779] - XMLSerializer: Keep redundant but harmless default namespace declarations, a=testonly 2019-04-01 14:43:21 +01:00