Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a7e32536bc5938e07a1d701e3cf59a4c1204ac3
      
https://github.com/WebKit/WebKit/commit/8a7e32536bc5938e07a1d701e3cf59a4c1204ac3
  Author: Sammy Gill <[email protected]>
  Date:   2025-10-22 (Wed, 22 Oct 2025)

  Changed paths:
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  Stop converting from LayoutUnit to Length in RenderBox computeLogical{Width, 
Height} functions .
https://bugs.webkit.org/show_bug.cgi?id=301232
rdar://problem/163150604

Reviewed by Alan Baradlay.

In preparation for being able to zoom the Preferred, Minimum, and Maximum
sizes, we need to stop the conversion of LayoutUnits to Lengths in parts
of RenderBox::computeLogicalWidth and RenderBox::computeLogicalHeight.
This is because these values should already be zoomed and doing this
conversion would result in double zooming when we evaluate the length
that we create.

The computedHeightValue seems to do a mix of checking if it has a used
logical height from its formatting context, can compute a used logical
height from the aspect ratio, or falling back to its computed logical
height from style. In the cases where it can determine a used logical
height, checkMinMaxHeight is false so we end up returning this fixed
length value. Otherwise, it falls back to the logical height it got from
its RenderStyle or possibly the overriding one it’s using for its flex
basis computation.

I separated out these two pieces of logic into their own lambdas. The
usedLogicalHeightFromContext lambda returns an optional LayoutUnit to
indicate whether or not it was able to determine one matching the
checkMinMaxHeight logic.

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



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

Reply via email to