[webkit-reviews] review granted: [Bug 192950] Implement imagesrcset and imagesizes attributes on link rel=preload : [Attachment 371073] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 31 15:34:52 PDT 2019

youenn fablet <youennf at gmail.com> has granted Rob Buis <rbuis at igalia.com>'s
request for review:
Bug 192950: Implement imagesrcset and imagesizes attributes on link rel=preload

Attachment 371073: Patch


--- Comment #62 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 371073
  --> https://bugs.webkit.org/attachment.cgi?id=371073

View in context: https://bugs.webkit.org/attachment.cgi?id=371073&action=review

> Source/WebCore/loader/LinkLoader.cpp:245
> +    if (type == CachedResource::Type::ImageResource &&
!imageSrcSet.isEmpty()) {

We probably need to add a runtime check here to disable the behavior if the
flag is not enabled.

> Source/WebCore/loader/LinkLoader.h:66
> +    static std::unique_ptr<LinkPreloadResourceClient> preloadIfNeeded(const
LinkRelAttribute&, const URL& href, Document&, const String& as, const String&
media, const String& type, const String& crossOriginMode, const String&, const
String&, LinkLoader*);

Could we add the names of the string variables to improve readability.

> LayoutTests/imported/w3c/ChangeLog:66
> +

Not needed.

> +FAIL Makes sure that a dynamically added preload with imagesrcset works
assert_equals: resources/square.png?400 expected 1 but got 0

Could we add specific variations of these tests for iOS?

More information about the webkit-reviews mailing list