Changeset 267136 in webkit


Ignore:
Timestamp:
Sep 15, 2020 11:22:53 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Fix lazy image load painting
https://bugs.webkit.org/show_bug.cgi?id=216554

Patch by Rob Buis <rbuis@igalia.com> on 2020-09-15
Reviewed by Darin Adler.

Source/WebCore:

Fix lazy image load painting, when LoadImmediately was introduced, it correctly
triggered the immediate load but after finishing the load there was no transition
to the finished lazy load state, causing the logic in RenderImage::paint to not
paint the finished load. This was not detected before since most lazy load WPT tests are
not pixel tests but rather test correct load events etc. (image-loading-subpixel-clip.html
is an exception since it is a reftest).

Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-subpixel-clip.html

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::notifyFinished):

LayoutTests:

The test image-loading-subpixel-clip.html now passes.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r267129 r267136  
     12020-09-15  Rob Buis  <rbuis@igalia.com>
     2
     3        Fix lazy image load painting
     4        https://bugs.webkit.org/show_bug.cgi?id=216554
     5
     6        Reviewed by Darin Adler.
     7
     8        The test image-loading-subpixel-clip.html now passes.
     9
     10        * TestExpectations:
     11
    1122020-09-15  Karl Rackler  <rackler@apple.com>
    213
  • trunk/LayoutTests/TestExpectations

    r267086 r267136  
    551551imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html [ ImageOnlyFailure ]
    552552imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html [ ImageOnlyFailure ]
    553 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-subpixel-clip.html [ ImageOnlyFailure ]
    554553imported/w3c/web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html [ ImageOnlyFailure ]
    555554imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/reset-algorithm-rendering.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r267134 r267136  
     12020-09-15  Rob Buis  <rbuis@igalia.com>
     2
     3        Fix lazy image load painting
     4        https://bugs.webkit.org/show_bug.cgi?id=216554
     5
     6        Reviewed by Darin Adler.
     7
     8        Fix lazy image load painting, when LoadImmediately was introduced, it correctly
     9        triggered the immediate load but after finishing the load there was no transition
     10        to the finished lazy load state, causing the logic in RenderImage::paint to not
     11        paint the finished load. This was not detected before since most lazy load WPT tests are
     12        not pixel tests but rather test correct load events etc. (image-loading-subpixel-clip.html
     13        is an exception since it is a reftest).
     14
     15        Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-subpixel-clip.html
     16
     17        * loader/ImageLoader.cpp:
     18        (WebCore::ImageLoader::notifyFinished):
     19
    1202020-09-15  Zalan Bujtas  <zalan@apple.com>
    221
  • trunk/Source/WebCore/loader/ImageLoader.cpp

    r267083 r267136  
    329329    ASSERT_UNUSED(resource, &resource == m_image.get());
    330330
    331     if (m_lazyImageLoadState == LazyImageLoadState::Deferred) {
     331    if (isDeferred()) {
    332332        LazyLoadImageObserver::unobserve(element(), element().document());
    333333        m_lazyImageLoadState = LazyImageLoadState::FullImage;
Note: See TracChangeset for help on using the changeset viewer.