Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6512cb0009b0458ed60644c2d21204add527f532
      
https://github.com/WebKit/WebKit/commit/6512cb0009b0458ed60644c2d21204add527f532
  Author: Elika Etemad <[email protected]>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

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

  Log Message:
  -----------
  Improve organization of data and logic for positioned layout
https://bugs.webkit.org/show_bug.cgi?id=288283
rdar://145348582

Reviewed by Alan Baradlay.

Improves the organization of our positioned layout logic by:
* Encapsulating containing block geometry calculations and data, and
  extracting and simplifying coordinate system conversion logic.
* Packaging up cached values into a single struct so they can be passed
  as a single parameter, making it easier to follow what data is being
  passed around and which parameters are being changed from function
  call to function call.
* Better organizing calculations into phases, so that future adjustments
  the containing block (e.g. for position-area) and additions to
  positioning logic (e.g. for the alignment properties) can be more
  easily and correctly integrated.

* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::LayoutRange::LayoutRange):
(WebCore::LayoutRange::min const):
(WebCore::LayoutRange::max const):
(WebCore::LayoutRange::size const):
(WebCore::LayoutRange::set):
(WebCore::LayoutRange::reset):
(WebCore::LayoutRange::moveBy):
(WebCore::LayoutRange::moveTo):
(WebCore::LayoutRange::shiftMinEdgeBy):
(WebCore::LayoutRange::shiftMaxEdgeBy):
(WebCore::LayoutRange::shiftMinEdgeTo):
(WebCore::LayoutRange::shiftMaxEdgeTo):
(WebCore::RenderBox::PositionedLayoutConstraints::needsAnchor const):
(WebCore::RenderBox::PositionedLayoutConstraints::isOrthogonal const):
(WebCore::RenderBox::PositionedLayoutConstraints::isBlockOpposing const):
(WebCore::RenderBox::PositionedLayoutConstraints::isBlockFlipped const):
(WebCore::RenderBox::PositionedLayoutConstraints::isLogicalLeftInlineStart 
const):
(WebCore::RenderBox::PositionedLayoutConstraints::containingSize const):
(WebCore::RenderBox::PositionedLayoutConstraints::marginBeforeValue const):
(WebCore::RenderBox::PositionedLayoutConstraints::marginAfterValue const):
(WebCore::RenderBox::PositionedLayoutConstraints::insetBeforeValue const):
(WebCore::RenderBox::PositionedLayoutConstraints::insetAfterValue const):
(WebCore::RenderBox::PositionedLayoutConstraints::PositionedLayoutConstraints):
(WebCore::RenderBox::PositionedLayoutConstraints::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::PositionedLayoutConstraints::convertLogicalLeftValue 
const):
(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::RenderBox::PositionedLayoutConstraints::computeBlockStaticDistance):
(WebCore::RenderBox::computePositionedLogicalHeight const):
(WebCore::RenderBox::PositionedLayoutConstraints::convertLogicalTopValue const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced const):
(WebCore::RenderBox::computeAnchorCenteredPosition const):
(WebCore::computeInlineStaticDistance): Deleted.
(WebCore::computeLogicalLeftPositionedOffset): Deleted.
(WebCore::computeBlockStaticDistance): Deleted.
(WebCore::computeLogicalTopPositionedOffset): Deleted.
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderElement.h:

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



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

Reply via email to