Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8479656c19991a68d7fab4d55d90d1f05f828027
      
https://github.com/WebKit/WebKit/commit/8479656c19991a68d7fab4d55d90d1f05f828027
  Author: Alan Baradlay <[email protected]>
  Date:   2026-05-16 (Sat, 16 May 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-indefinite-cb-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-indefinite-cb-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-indefinite-cb.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-replaced-percentage-child-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-replaced-percentage-child-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-replaced-percentage-child.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002.html
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderBox.h

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

Reviewed by Antti Koivisto.

  <div style="height: 200px">
    <div></div>
    <iframe style="height: stretch; width: 40px"></iframe>
  </div>

The iframe should stretch to 200 pixels tall. Instead it was 150.

The block-level <div> next to the inline iframe makes WebKit wrap the
iframe in an anonymous block box. The stretch resolution gate asked
that anonymous wrapper if it had a definite block size, got "no" (auto
height), and gave up - falling back to the iframe's intrinsic size.

CSS 2 Section 9.2.1.1 says anonymous block boxes are ignored when
resolving values that would refer to them, and css-sizing-4 Section
6.7 defines stretch as behaving like 100%. The fix walks past those
anonymous wrappers (and flow threads) before checking definite-ness,
mirroring how percent height resolution already does it.

Note that quirks-mode handling diverges from percent here: stretch does not 
walk past auto-height ancestors.

(test case credits go to Anne van Kesteren)

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-indefinite-cb-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-indefinite-cb-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-indefinite-cb.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-replaced-percentage-child-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-replaced-percentage-child-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-stretch-replaced-percentage-child.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-anonymous-block-001.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/stretch/stretch-quirk-002.html:
 Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeSizingKeywordLogicalContentHeightUsingGeneric 
const):
(WebCore::containingBlockForStretchResolution):
(WebCore::RenderBox::isBlockSizeResolvableForStretch const):
(WebCore::RenderBox::containingBlockHasDefiniteBlockSize const): Deleted.
* Source/WebCore/rendering/RenderBox.h:
(WebCore::RenderBox::isResolveableStretchSize const):
(WebCore::RenderBox::isUnresolveableStretchSize const):

Canonical link: https://commits.webkit.org/313359@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to