[webkit-changes] [WebKit/WebKit] 8dc84b: Repeating background-image sized to the content-bo...
Simon Fraser
noreply at github.com
Tue Sep 24 09:46:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8dc84bd0499b8b77ad84e8c41d606b148a717c83
https://github.com/WebKit/WebKit/commit/8dc84bd0499b8b77ad84e8c41d606b148a717c83
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-09-24 (Tue, 24 Sep 2024)
Changed paths:
A LayoutTests/fast/backgrounds/background-clip-on-root-expected.html
A LayoutTests/fast/backgrounds/background-clip-on-root.html
M Source/WebCore/rendering/BackgroundPainter.cpp
M Source/WebCore/rendering/BackgroundPainter.h
M Source/WebCore/rendering/RenderTableCell.cpp
Log Message:
-----------
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 at 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 at 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@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list