Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0ce091be08fb844e8bd97f67cd4a9d0ccf8946c1
      
https://github.com/WebKit/WebKit/commit/0ce091be08fb844e8bd97f67cd4a9d0ccf8946c1
  Author: Sam Weinig <[email protected]>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderImage.cpp
    M Source/WebCore/rendering/RenderImage.h
    M Source/WebCore/rendering/RenderImageResource.cpp
    M Source/WebCore/rendering/RenderImageResource.h
    M Source/WebCore/rendering/svg/RenderSVGImage.cpp
    M Source/WebCore/rendering/svg/RenderSVGImage.h
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGImage.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGImage.h
    M Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleCachedImage.h
    M Source/WebCore/style/values/images/kinds/StyleCursorImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleCursorImage.h
    M Source/WebCore/style/values/images/kinds/StyleImage.h
    M Source/WebCore/style/values/images/kinds/StyleMultiImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleMultiImage.h

  Log Message:
  -----------
  [Image Redux] Have Style::CachedImage's created for <img> elements store the 
full URL they were authored with
https://bugs.webkit.org/show_bug.cgi?id=326091

Reviewed by Simon Fraser.

Simplify how we get the full URL (including the fragment that would otherwise 
be stripped) to Style::CachedImage
by passing it in at creation time rather than requiring it to be bundled later 
with a draw call.

To keep behavior the same, we also add a new parameter on creation of 
Style::CachedImage that specifies the SVG
referencing mode (https://svgwg.org/specs/integration/#referencing-modes). For 
<img> (and similar), we use an
"animated image document" reference mode which disables the SVG resource paths 
in Style::CachedImage (matching
existing behavior and what we want). CSS images use "animated image document" 
or "resource document", allowing
the SVG resource paths. In the future, we will likely want to limit "resource 
document" to just mask related
CSS properties, but for now we are maintaining parity.

* Source/WebCore/rendering/RenderImage.cpp:
* Source/WebCore/rendering/RenderImage.h:
* Source/WebCore/rendering/RenderImageResource.cpp:
* Source/WebCore/rendering/RenderImageResource.h:
* Source/WebCore/rendering/svg/RenderSVGImage.cpp:
* Source/WebCore/rendering/svg/RenderSVGImage.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGImage.cpp:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGImage.h:
* Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleCachedImage.h:
* Source/WebCore/style/values/images/kinds/StyleCursorImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleCursorImage.h:
* Source/WebCore/style/values/images/kinds/StyleImage.h:
* Source/WebCore/style/values/images/kinds/StyleMultiImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleMultiImage.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to