Changeset 268178 in webkit


Ignore:
Timestamp:
Oct 8, 2020 5:49:38 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Fix image-loading-lazy-multiple-times.html
https://bugs.webkit.org/show_bug.cgi?id=216979

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-08
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add improved test result.

  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times-expected.txt:

Source/WebCore:

Once an image has been lazy loaded, it should be possible
to trigger a new lazy load through relevant mutations.

Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times.html

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r268173 r268178  
     12020-10-08  Rob Buis  <rbuis@igalia.com>
     2
     3        Fix image-loading-lazy-multiple-times.html
     4        https://bugs.webkit.org/show_bug.cgi?id=216979
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Add improved test result.
     9
     10        * web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times-expected.txt:
     11
    1122020-10-07  Antoine Quint  <graouts@webkit.org>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times-expected.txt

    r267083 r268178  
    11
    22
    3 FAIL Images with loading='lazy' can be lazy loaded multiple times assert_unreached: The loading=lazy below-viewport image should lazily load its second image, and not load it eagerly when the `src` attribute is changed Reached unreachable code
     3PASS Images with loading='lazy' can be lazy loaded multiple times
    44
  • trunk/Source/WebCore/ChangeLog

    r268176 r268178  
     12020-10-08  Rob Buis  <rbuis@igalia.com>
     2
     3        Fix image-loading-lazy-multiple-times.html
     4        https://bugs.webkit.org/show_bug.cgi?id=216979
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Once an image has been lazy loaded, it should be possible
     9        to trigger a new lazy load through relevant mutations.
     10
     11        Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times.html
     12
     13        * loader/ImageLoader.cpp:
     14        (WebCore::ImageLoader::updateFromElement):
     15
    1162020-10-08  Lauro Moura  <lmoura@igalia.com>
    217
  • trunk/Source/WebCore/loader/ImageLoader.cpp

    r267136 r268178  
    207207            document.cachedResourceLoader().setAutoLoadImages(autoLoadOtherImages);
    208208        } else {
    209             if (m_lazyImageLoadState == LazyImageLoadState::None && isImageElement) {
     209            if ((m_lazyImageLoadState == LazyImageLoadState::None || m_lazyImageLoadState == LazyImageLoadState::FullImage) && isImageElement) {
    210210                auto& imageElement = downcast<HTMLImageElement>(element());
    211211                if (imageElement.isLazyLoadable() && document.settings().lazyImageLoadingEnabled()) {
Note: See TracChangeset for help on using the changeset viewer.