Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 27059d44ca3687792473995c99ee26b7fb9040d3
      
https://github.com/WebKit/WebKit/commit/27059d44ca3687792473995c99ee26b7fb9040d3
  Author: Zak Ridouh <[email protected]>
  Date:   2026-07-18 (Sat, 18 Jul 2026)

  Changed paths:
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/rendering/RenderTable.cpp
    A Source/WebCore/style/values/sizing/StyleSizing.h

  Log Message:
  -----------
  Improve readability of StyleLogicalHeight by adopting a switch on statement.
https://bugs.webkit.org/show_bug.cgi?id=303746
rdar://166529986

Reviewed by Sam Weinig.

Replace the if/else chain in 
RenderTable::convertStyleLogicalHeightToComputedHeight()
with WTF::switchOn() for improved readability, matching the pattern already 
used in
RenderFlexibleBox and other rendering code.

The intrinsic and stretch sizing keywords are coalesced behind a new
Style::IsIntrinsicOrStretchSizeKeyword concept (the compile-time analog of the 
sizing
types' isIntrinsicOrStretch() predicate), placed in a new
style/values/sizing/StyleSizing.h header. The remaining keywords are enumerated
explicitly rather than caught by a generic handler, so that adding a new sizing 
keyword
fails to compile here and forces this switch to be revisited.

No new tests, no change of functionality.

* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
* Source/WebCore/style/values/sizing/StyleSizing.h: Added.
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

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



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

Reply via email to