Commit 8dc84bd
committed
Repeating background-image sized to the content-box fails to fill the viewport in an iframe
https://bugs.webkit.org/show_bug.cgi?id=278166
rdar://133952319
Reviewed by Alan Baradlay.
283482@main fixed background-clip to not apply to the root. This should have fixed the behavior
seen in https://codepen.io/thebabydino/pen/GRbOXZp where WebKit failed to tile the gradient image,
however 282712@main introduced a regression; it conflated `background-clip` and `background-origin`
when passing the the `m_overrideClip` value to `calculateBackgroundImageGeometry()`, which caused
us to use the border-box as the background-origin at the root.
Fix by separating m_overrideClip from m_overrideOrigin in BackgroundPainter; the table code has
to set both.
* LayoutTests/fast/backgrounds/background-clip-on-root-expected.html: Added.
* LayoutTests/fast/backgrounds/background-clip-on-root.html: Added.
* Source/WebCore/rendering/BackgroundPainter.cpp:
(WebCore::BackgroundPainter::paintFillLayer const):
* Source/WebCore/rendering/BackgroundPainter.h:
(WebCore::BackgroundPainter::setOverrideOrigin):
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
Canonical link: https://commits.webkit.org/284165@main1 parent 6e02a5c commit 8dc84bd
File tree
5 files changed
+53
-2
lines changed- LayoutTests/fast/backgrounds
- Source/WebCore/rendering
5 files changed
+53
-2
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | | - | |
| 1432 | + | |
1433 | 1433 | | |
| 1434 | + | |
| 1435 | + | |
1434 | 1436 | | |
1435 | 1437 | | |
1436 | 1438 | | |
| |||
0 commit comments