Skip to content

REGRESSION (309405@main): CSS stretch and anonymous wrappers#64983

Closed
annevk wants to merge 1 commit into
WebKit:mainfrom
annevk:eng/REGRESSION-309405-main-CSS-stretch-and-anonymous-wrappers
Closed

REGRESSION (309405@main): CSS stretch and anonymous wrappers#64983
annevk wants to merge 1 commit into
WebKit:mainfrom
annevk:eng/REGRESSION-309405-main-CSS-stretch-and-anonymous-wrappers

Conversation

@annevk
Copy link
Copy Markdown
Contributor

@annevk annevk commented May 15, 2026

0b3ed4d

REGRESSION (309405@main): CSS stretch and anonymous wrappers
https://bugs.webkit.org/show_bug.cgi?id=314885
rdar://176398251

Reviewed by NOBODY (OOPS!).

Stretch height calculation should work in the same way as percentage
height calculation, by skipping anonymous wrappers. Not doing this
properly caused at least one website to not render its iframe at
viewport height.

Fix is verified with new tests and behavior matches Chromium and Gecko
(though the latter only when stretch keyword support is enabled).

Tests: imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001.html
       imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002.html

Upstream: web-platform-tests/wpt#59896

0b3ed4d

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ❌ 🧪 wpe-wk2 ❌ 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
⏳ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ❌ 🧪 mac-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision ❌ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ❌ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

https://bugs.webkit.org/show_bug.cgi?id=314885
rdar://176398251

Reviewed by NOBODY (OOPS!).

Stretch height calculation should work in the same way as percentage
height calculation, by skipping anonymous wrappers. Not doing this
properly caused at least one website to not render its iframe at
viewport height.

Fix is verified with new tests and behavior matches Chromium and Gecko
(though the latter only when stretch keyword support is enabled).

Tests: imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001.html
       imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002.html

Upstream: web-platform-tests/wpt#59896
@annevk annevk self-assigned this May 15, 2026
@annevk annevk added the Layout and Rendering For bugs with layout and rendering of Web pages. label May 15, 2026
@annevk annevk requested review from alanbaradlay and fantasai May 15, 2026 09:57
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 15, 2026
void mapAbsoluteToLocalPoint(OptionSet<MapCoordinatesMode>, TransformState&) const override;

bool skipContainingBlockForPercentHeightCalculation(const RenderBox& containingBlock, bool isPerpendicularWritingMode) const;
bool skipContainingBlockForPercentageOrStretchHeightCalculation(const RenderBox& containingBlock, bool isPerpendicularWritingMode) const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this go past the WPT importer - the tests are correct, however you are going to skip past things in quirks mode that aren't correct.

Percentages in quirks mode skip past all auto height things (which is what this function does), stretch should not (we don't want to expand that quirk to stretch).

stretch can resolve against the as due to the "body fills the viewport" quirk it can resolve as definite.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that’s what the failing test on the bot is pointing out as well. Thanks for the heads up!

@annevk
Copy link
Copy Markdown
Contributor Author

annevk commented May 17, 2026

Fixed by https://commits.webkit.org/313359@main.

@annevk annevk closed this May 17, 2026
@annevk annevk deleted the eng/REGRESSION-309405-main-CSS-stretch-and-anonymous-wrappers branch May 17, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layout and Rendering For bugs with layout and rendering of Web pages. merging-blocked Applied to prevent a change from being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants