Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: wpe-2.38
Choose a base branch
from

Conversation

asurdej-comcast
Copy link

…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
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.

3 participants