The spec says to use the base url at parse time for request url, ignoring change to base url after that. https://html.spec.whatwg.org/multipage/images.html#update-the-image-data
Created attachment 391150 [details] Patch
Created attachment 391184 [details] Patch
Comment on attachment 391184 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391184&action=review > Source/WebCore/loader/ImageLoader.cpp:189 > + auto uri = document.completeURL(sourceURI(attr)); > + if (m_lazyImageLoadState == LazyImageLoadState::LoadImmediately) > + uri = m_image->url(); Seems a little strange to call this URI. Seems wasteful to compute the URL, then check m_lazyImageLoadState, then overwrite it. Iād write this: URL imageURL = m_lazyImageLoadState == LazyImageLoadState::LoadImmediately ? m_image->url() : document.completeURL(sourceURI(attr)); But also, i think this needs "why" comment. The concept here of "LoadImmediately" and special URL rules seems subtle and a bit tricky.
Created attachment 391278 [details] Patch
Comment on attachment 391278 [details] Patch Clearing flags on attachment: 391278 Committed r257054: <https://trac.webkit.org/changeset/257054>
All reviewed patches have been landed. Closing bug.
<rdar://problem/59627874>
The relevant tests were renamed to: html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html