[webkit-changes] [WebKit/WebKit] bfad00: Correct URL encoding of SVG <image> elements

Anne van Kesteren noreply at github.com
Sat Sep 2 23:30:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bfad000ee7c8b2b89733b2f243d1db130940ad8e
      https://github.com/WebKit/WebKit/commit/bfad000ee7c8b2b89733b2f243d1db130940ad8e
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2023-09-02 (Sat, 02 Sep 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=svg-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=svg-expected.txt
    M Source/WebCore/html/HTMLImageLoader.cpp
    M Source/WebCore/html/HTMLImageLoader.h
    M Source/WebCore/loader/ImageLoader.cpp
    M Source/WebCore/loader/ImageLoader.h
    M Source/WebCore/svg/SVGImageLoader.cpp
    M Source/WebCore/svg/SVGImageLoader.h

  Log Message:
  -----------
  Correct URL encoding of SVG <image> elements
https://bugs.webkit.org/show_bug.cgi?id=261065
rdar://114873373

Reviewed by Chris Dumez.

SVGImageLoader's sourceURI and HTMLImageLoader's sourceURI did some
wildly different processing and neither was necessary given that the
return value is passed to completeURL in ImageLoader, which does the
correct thing for both HTML <img> and SVG <image>.

(Perhaps the SVGImageLoader implementation was relevant at a point
where xml:base support was imagined, but xml:base will not return.)

* LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=svg-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=svg-expected.txt:
* Source/WebCore/html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::sourceURI const): Deleted.
* Source/WebCore/html/HTMLImageLoader.h:
* Source/WebCore/loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* Source/WebCore/loader/ImageLoader.h:
* Source/WebCore/svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::sourceURI const): Deleted.
* Source/WebCore/svg/SVGImageLoader.h:

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




More information about the webkit-changes mailing list