Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d0444c239ed0d2ee02d79c09d82da7cdf020e37f
      
https://github.com/WebKit/WebKit/commit/d0444c239ed0d2ee02d79c09d82da7cdf020e37f
  Author: Alan Baradlay <[email protected]>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

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

  Log Message:
  -----------
  Add debug assert to verify hasDefiniteHeightByStyle agrees with the slow path
https://bugs.webkit.org/show_bug.cgi?id=313314

Reviewed by Sammy Gill.

hasDefiniteHeightByStyle is a fast style-only alternative to
hasAutoHeightOrContainingBlockWithAutoHeight for resolving percentage
top/bottom on relatively positioned elements. Add a debug assert that
verifies the two paths agree post-layout.

The assert skips cases where the fast path is known to be more correct
than the slow path:
1. aspect-ratio: slow path does not know aspect-ratio + definite width = 
definite height
2. stretch: slow path does not recognize stretch needs ancestor resolution
3. percentage: slow path treats height: 100% against auto body as definite
4. intrinsic keywords: slow path treats fit-content/max-content/ min-content as 
definite

The assert also skips mid-layout calls where the slow path gives
conservative answers based on flex phase flags that have not been set yet.

* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::verifyDefiniteHeightConsistencyBetweenStyleAndContainingBlockChain):
(WebCore::RenderBoxModelObject::relativePositionOffset const):

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



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

Reply via email to