Skip to content

Images with loading="lazy" have uncontrollable gray border while load…#1418

Merged
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.38from
asurdej-comcast:lazy_image
Dec 10, 2024
Merged

Images with loading="lazy" have uncontrollable gray border while load…#1418
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.38from
asurdej-comcast:lazy_image

Conversation

@asurdej-comcast
Copy link
Copy Markdown

…ing https://bugs.webkit.org/show_bug.cgi?id=243601

Reviewed by Darin Adler.

Do not paint border while an image is in deferred state. The test image-loading-lazy-slow.html covers this. However, the current test runner logic stops page loads before making a pixel snapshot, causing the image to be painted as a broken image instead of the empty image at the time of calling takeScreenshot. To fix this, postpone the stopping of page loads and instead always stop page loads when reseting after the test.

Note that printing tests are not affected since they already made a pixel snapshot before stopping the page loads.

  • LayoutTests/TestExpectations:
  • LayoutTests/platform/ios/TestExpectations:
  • LayoutTests/platform/mac-wk1/TestExpectations:
  • Source/WebCore/rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced):
  • Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage):
    (WTR::InjectedBundle::done):

Canonical link: https://commits.webkit.org/253960@main

Cherry pick of WebKit/WebKit@7d844a4

…ing https://bugs.webkit.org/show_bug.cgi?id=243601

Reviewed by Darin Adler.

Do not paint border while an image is in deferred state.
The test image-loading-lazy-slow.html covers this. However, the current
test runner logic stops page loads before making a pixel snapshot, causing the
image to be painted as a broken image instead of the empty image at the
time of calling takeScreenshot. To fix this, postpone the stopping of page
loads and instead always stop page loads when reseting after the test.

Note that printing tests are not affected since they already made a pixel
snapshot before stopping the page loads.

* LayoutTests/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::done):

Canonical link: https://commits.webkit.org/253960@main
@magomez magomez merged commit a6a3fac into WebPlatformForEmbedded:wpe-2.38 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants