[webkit-changes] [WebKit/WebKit] 724b42: Align <script type language> with the HTML Standard

Anne van Kesteren noreply at github.com
Tue Jul 11 17:54:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 724b4299fdbc3181883cadfb094b2e431af2da02
      https://github.com/WebKit/WebKit/commit/724b4299fdbc3181883cadfb094b2e431af2da02
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M LayoutTests/fast/html/script-allowed-types-languages-expected.txt
    M LayoutTests/fast/html/script-allowed-types-languages.html
    M LayoutTests/fast/tokenizer/004-expected.txt
    M LayoutTests/fast/tokenizer/004.html
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-svg-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-xhtml-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log
    M LayoutTests/svg/custom/absolute-sized-content-with-resources.xhtml
    M LayoutTests/svg/custom/relative-sized-content-with-resources.xhtml
    M LayoutTests/svg/custom/relative-sized-content.xhtml
    M LayoutTests/svg/custom/relative-sized-image.xhtml
    M Source/WebCore/dom/ScriptElement.cpp
    M Source/WebCore/dom/ScriptElement.h
    M Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp

  Log Message:
  -----------
  Align <script type language> with the HTML Standard
https://bugs.webkit.org/show_bug.cgi?id=257080
rdar://109600797

Reviewed by Alexey Shvayka.

In particular:

- Stop supporting language attribute values in the type attribute value.
- Stop supporting javascript1.6 and javascript1.7 altogether.
- Strip ASCII whitespace rather than some variant of Unicode whitespace.

In terms of interoperability:

- The non-whitespace changes align WebKit with Chromium and Gecko.
- The whitespace change align us with Gecko only.

New test is upstreamed via https://github.com/web-platform-tests/wpt/pull/40112.

* LayoutTests/fast/html/script-allowed-types-languages-expected.txt:
* LayoutTests/fast/html/script-allowed-types-languages.html:
* LayoutTests/fast/tokenizer/004-expected.txt:
* LayoutTests/fast/tokenizer/004.html:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-svg-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-xhtml-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log:
* LayoutTests/svg/custom/absolute-sized-content-with-resources.xhtml:
* LayoutTests/svg/custom/relative-sized-content-with-resources.xhtml:
* LayoutTests/svg/custom/relative-sized-content.xhtml:
* LayoutTests/svg/custom/relative-sized-image.xhtml:
* Source/WebCore/dom/ScriptElement.cpp:
(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::determineScriptType const):
(WebCore::ScriptElement::prepareScript):
(WebCore::isLegacySupportedJavaScriptLanguage): Deleted.
* Source/WebCore/dom/ScriptElement.h:
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::endElementNs):

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




More information about the webkit-changes mailing list