Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 47765a7a3b70f173fe5c95a26e139f95697a65a9
      
https://github.com/WebKit/WebKit/commit/47765a7a3b70f173fe5c95a26e139f95697a65a9
  Author: Alan Baradlay <[email protected]>
  Date:   2026-06-29 (Mon, 29 Jun 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderBox.h
    M Source/WebCore/rendering/RenderImage.cpp
    M Source/WebCore/rendering/RenderImage.h
    M Source/WebCore/rendering/RenderReplaced.cpp
    M Source/WebCore/rendering/RenderReplaced.h
    M Source/WebCore/rendering/RenderVideo.cpp
    M Source/WebCore/rendering/RenderVideo.h
    M Source/WebCore/rendering/svg/RenderSVGRoot.cpp
    M Source/WebCore/rendering/svg/RenderSVGRoot.h
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.h

  Log Message:
  -----------
  [cleanup] Replace ShouldComputePreferred with IsComputingIntrinsicSize
https://bugs.webkit.org/show_bug.cgi?id=318070

Reviewed by Antti Koivisto.

ShouldComputePreferred { ComputeActual, ComputePreferred } was the 
replaced-element
width path's way of saying "are we computing the intrinsic-width contribution or
laying out": ComputePreferred is used only by 
computeIntrinsicLogicalWidthContributions,
ComputeActual everywhere else. That is exactly what IsComputingIntrinsicSize { 
No, Yes }
already expresses -- and it is used the same way, gating the percentage/calc 
min and max
sizes that can't resolve during intrinsic sizing. "Preferred" was just the 
legacy term
for the min/max-content contributions.

Replace ShouldComputePreferred with IsComputingIntrinsicSize (ComputePreferred 
-> Yes,
ComputeActual -> No) and remove the enum. No behavior change.

* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderImage.cpp:
(RenderImage::computeReplacedLogicalWidth):
* Source/WebCore/rendering/RenderImage.h:
* Source/WebCore/rendering/RenderReplaced.cpp:
(RenderReplaced::computeReplacedLogicalWidth):
(RenderReplaced::computeReplacedLogicalWidthRespectingMinMaxWidth):
(RenderReplaced::computeIntrinsicLogicalWidthContributions):
* Source/WebCore/rendering/RenderReplaced.h:
* Source/WebCore/rendering/RenderVideo.cpp:
(RenderVideo::computeReplacedLogicalWidth):
* Source/WebCore/rendering/RenderVideo.h:
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(RenderSVGRoot::computeReplacedLogicalWidth):
* Source/WebCore/rendering/svg/RenderSVGRoot.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp:
(LegacyRenderSVGRoot::computeReplacedLogicalWidth):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.h:

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



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

Reply via email to