Commit ca1bcbb
Images with loading="lazy" have uncontrollable gray border while loading 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@main1 parent b13b132 commit ca1bcbb
3 files changed
Lines changed: 11 additions & 4 deletions
File tree
- LayoutTests
- Source/WebCore/rendering
- Tools/WebKitTestRunner/InjectedBundle
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
787 | 786 | | |
788 | 787 | | |
789 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
482 | 485 | | |
483 | | - | |
| 486 | + | |
484 | 487 | | |
485 | 488 | | |
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
489 | | - | |
| 492 | + | |
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
552 | 554 | | |
553 | 555 | | |
554 | 556 | | |
555 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
556 | 561 | | |
557 | 562 | | |
558 | 563 | | |
| |||
0 commit comments