Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2c2c247d82cde905fba95b94056312928310ae96
      
https://github.com/WebKit/WebKit/commit/2c2c247d82cde905fba95b94056312928310ae96
  Author: Sammy Gill <sammy.g...@apple.com>
  Date:   2025-08-04 (Mon, 04 Aug 2025)

  Changed paths:
    M Source/WebCore/rendering/BaselineAlignment.cpp
    M Source/WebCore/rendering/BaselineAlignment.h
    M Source/WebCore/rendering/GridBaselineAlignment.cpp
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderBox.h
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  Refactor synthesizedBaseline to take in baseline type and writing mode for 
synthesis
https://bugs.webkit.org/show_bug.cgi?id=296823
rdar://157320099

Reviewed by Alan Baradlay.

We currently take in the parent's writing mode in synthesizedBaseline
and then determine both the type of baseline and writing mode which
determines the line over/under edges from it. However, it seems like
this may not always be correct as the writing modes for both may be
different.

The type of baseline that is synthesized, the dominant baseline, should
come from the writing mode of the parent since it is what is used to
"align content within the box."
https://drafts.csswg.org/css-inline-3/#dominant-baseline-property

On the other hand, the writing mode which is used to determine the line
under/over edges may or may not be the same as the parent's writing
mode. In fact, css-align calls this scenario towards the bottom of
"Determining the Baselines of a Box."
https://drafts.csswg.org/css-align-3/#baseline-rules

In preparation to fix a bug which is a result of this mismatch, we can
refactor synthesizedBaseline to instead take in these two parameters
instead of trying to determine them from just the parent's style.

We can instead have these functions live on BaselineAlignmentState
instead of RenderBox since that may be a better fit for them in terms of
organization.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to