Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 166ddb1f423ee6a9b6b251961ed326633f2de160
      
https://github.com/WebKit/WebKit/commit/166ddb1f423ee6a9b6b251961ed326633f2de160
  Author: Alan Baradlay <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/percentage-padding-orthogonal-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/padding-percent-orthogonal-dynamic-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/vertical-containing-block-width-changes-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/vertical-containing-block-width-changes-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/vertical-containing-block-width-changes.html
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  A percentage width child of a vertical writing mode box stops following the 
box's width after a style change
https://bugs.webkit.org/show_bug.cgi?id=326521
<rdar://problem/189316242>

Reviewed by Antti Koivisto.

  <div style="writing-mode: vertical-rl; width: 50px; height: 100px">
    <div style="width: 100%"></div>
  </div>

The child should be 100px wide after the box grows to 100px. Instead it stayed 
50px wide.

RenderBox::styleDidChange cached isHorizontalWritingMode() to detect an 
orientation change, but RenderElement::styleWillChange had already reset that 
flag to horizontal.
Every style change on a vertical box (even a color change) looked like an 
orientation change and took the box's descendants out of the percentage height 
maps, so a later change of the box's width did not mark the child for layout.

Let's compare the orientation of the old and the new style instead.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/vertical-containing-block-width-changes-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/vertical-containing-block-width-changes-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/vertical-containing-block-width-changes.html:
 Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/percentage-padding-orthogonal-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/padding-percent-orthogonal-dynamic-expected.txt:

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



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

Reply via email to