WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207902
Lazy load images using base URL at parse time
https://bugs.webkit.org/show_bug.cgi?id=207902
Summary
Lazy load images using base URL at parse time
Rob Buis
Reported
2020-02-18 12:32:36 PST
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
Attachments
Patch
(5.71 KB, patch)
2020-02-19 03:18 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(6.09 KB, patch)
2020-02-19 11:56 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(6.17 KB, patch)
2020-02-20 05:20 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2020-02-19 03:18:05 PST
Created
attachment 391150
[details]
Patch
Rob Buis
Comment 2
2020-02-19 11:56:04 PST
Created
attachment 391184
[details]
Patch
Darin Adler
Comment 3
2020-02-19 21:31:53 PST
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.
Rob Buis
Comment 4
2020-02-20 05:20:58 PST
Created
attachment 391278
[details]
Patch
WebKit Commit Bot
Comment 5
2020-02-20 06:46:10 PST
Comment on
attachment 391278
[details]
Patch Clearing flags on attachment: 391278 Committed
r257054
: <
https://trac.webkit.org/changeset/257054
>
WebKit Commit Bot
Comment 6
2020-02-20 06:46:12 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2020-02-20 06:47:14 PST
<
rdar://problem/59627874
>
Simon Fraser (smfr)
Comment 8
2022-08-15 18:29:13 PDT
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug