[webkit-changes] [WebKit/WebKit] 3906ca: display: flex element not ignore font (content) li...

Alan Baradlay noreply at github.com
Thu Mar 30 10:52:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3906ca99d0cfb8ed5b90b4279449584f8ce0452a
      https://github.com/WebKit/WebKit/commit/3906ca99d0cfb8ed5b90b4279449584f8ce0452a
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    A LayoutTests/fast/flexbox/out-of-flow-with-sibling-anon-flex-item-expected.html
    A LayoutTests/fast/flexbox/out-of-flow-with-sibling-anon-flex-item.html
    M Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp

  Log Message:
  -----------
  display: flex element not ignore font (content) like as other browser engines.
https://bugs.webkit.org/show_bug.cgi?id=254595

Reviewed by Antti Koivisto.

When the beforeChild of a newly inserted out-of-flow block box is nested inside
an anonymous flex item
e.g.

<flex container>this text content is wrapped inside an anonymous flex item</flex container>
and
flex container.insertChild("out-of-flow block box")

we should go with the original insertion position (flex container) instead of trying to put this block box next to the text content under the anon flex item.
The spec states that out-of-flow boxes should be (statically) positioned as if were the sole flex item in the flex container.
(https://www.w3.org/TR/css-flexbox-1/#abspos-items)

This also matches the behavior of when the out-of-flow box is not dynamically inserted.
e.g.
<flex container><out-of-flow></out-of-flow>this text content is wrapped inside an anonymous flex item</flex container>

* LayoutTests/fast/flexbox/out-of-flow-with-sibling-anon-flex-item-expected.html: Added.
* LayoutTests/fast/flexbox/out-of-flow-with-sibling-anon-flex-item.html: Added.
* Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):

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




More information about the webkit-changes mailing list