[webkit-changes] [WebKit/WebKit] 8e308b: Serialize xmlns attributes first

Anne van Kesteren noreply at github.com
Sun Apr 2 03:13:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e308b5b3f9eab463b01ceb5cec91d6a562ffcf4
      https://github.com/WebKit/WebKit/commit/8e308b5b3f9eab463b01ceb5cec91d6a562ffcf4
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2023-04-02 (Sun, 02 Apr 2023)

  Changed paths:
    M LayoutTests/fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts-expected.txt
    M LayoutTests/fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict-expected.txt
    M LayoutTests/fast/dom/serialize-nodes-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/domparsing/XMLSerializer-serializeToString-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/template-expected.txt
    M LayoutTests/svg/custom/xlink-prefix-generation-in-attributes-expected.txt
    M Source/WebCore/editing/MarkupAccumulator.cpp

  Log Message:
  -----------
  Serialize xmlns attributes first
https://bugs.webkit.org/show_bug.cgi?id=248747
rdar://103234827

Reviewed by Antoine Quint.

A modest change to align with the non-broken aspects of https://w3c.github.io/DOM-Parsing/:

- Serialize xmlns attributes before we serialize the attribute they are for
- Use lowercase "ns" in the generated namespace prefix

* LayoutTests/fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts-expected.txt:
* LayoutTests/fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict-expected.txt:
* LayoutTests/fast/dom/serialize-nodes-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/domparsing/XMLSerializer-serializeToString-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/template-expected.txt:
* LayoutTests/svg/custom/xlink-prefix-generation-in-attributes-expected.txt:
* Source/WebCore/editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::entityMaskForText const):
(WebCore::MarkupAccumulator::generateUniquePrefix):
(WebCore::MarkupAccumulator::appendAttribute):

Canonical link: https://commits.webkit.org/262492@main




More information about the webkit-changes mailing list