[webkit-changes] [WebKit/WebKit] 8b25ac: [IFC] Turn BoxGeometry's padding into non-optional

Alan Baradlay noreply at github.com
Tue Jan 16 08:56:49 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8b25ac1ab720d22851f54dbd28ae33aedc420492
      https://github.com/WebKit/WebKit/commit/8b25ac1ab720d22851f54dbd28ae33aedc420492
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-01-16 (Tue, 16 Jan 2024)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/FormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/FormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/FormattingGeometry.h
    M Source/WebCore/layout/formattingContexts/block/BlockFormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/table/TableFormattingGeometry.cpp
    M Source/WebCore/layout/layouttree/LayoutBoxGeometry.h

  Log Message:
  -----------
  [IFC] Turn BoxGeometry's padding into non-optional
https://bugs.webkit.org/show_bug.cgi?id=267559

Reviewed by Antti Koivisto.

While padding is not applicable for all box types, from layout point of view 0 value is no different from std::nullopt.

* Source/WebCore/layout/formattingContexts/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
* Source/WebCore/layout/formattingContexts/FormattingGeometry.cpp:
(WebCore::Layout::FormattingGeometry::computedHeight const):
(WebCore::Layout::FormattingGeometry::computedWidth const):
(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingGeometry::computedPadding const):
* Source/WebCore/layout/formattingContexts/FormattingGeometry.h:
* Source/WebCore/layout/formattingContexts/block/BlockFormattingGeometry.cpp:
(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentHeightAndMargin const):
(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentWidthAndMargin const):
* Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.cpp:
(WebCore::Layout::BlockFormattingQuirks::stretchedInFlowHeightIfApplicable const):
(WebCore::Layout::BlockFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::inlineItemWidth const):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::addBorderAndPaddingEndForInlineBoxDecorationClone):
(WebCore::Layout::Line::Run::isContentfulOrHasDecoration):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp:
(WebCore::Layout::LineBox::logicalBorderBoxForInlineBox const):
* Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp:
(WebCore::Layout::InlineQuirks::inlineBoxAffectsLineBox const):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::paddingLeftInInlineDirection):
(WebCore::Layout::paddingRightInInlineDirection):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::InlineDisplayLineBuilder::collectEnclosingLineGeometry const):
* Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
* Source/WebCore/layout/formattingContexts/table/TableFormattingGeometry.cpp:
(WebCore::Layout::TableFormattingGeometry::horizontalSpaceForCellContent const):
(WebCore::Layout::TableFormattingGeometry::verticalSpaceForCellContent const):
* Source/WebCore/layout/layouttree/LayoutBoxGeometry.h:
(WebCore::Layout::BoxGeometry::verticalPadding const):
(WebCore::Layout::BoxGeometry::horizontalPadding const):
(WebCore::Layout::BoxGeometry::borderAndPaddingStart const):
(WebCore::Layout::BoxGeometry::borderAndPaddingEnd const):
(WebCore::Layout::BoxGeometry::borderAndPaddingBefore const):
(WebCore::Layout::BoxGeometry::borderAndPaddingAfter const):
(WebCore::Layout::BoxGeometry::horizontalBorderAndPadding const):
(WebCore::Layout::BoxGeometry::verticalBorderAndPadding const):
(WebCore::Layout::BoxGeometry::contentBoxTop const):
(WebCore::Layout::BoxGeometry::contentBoxLeft const):
(WebCore::Layout::BoxGeometry::paddingBoxHeight const):
(WebCore::Layout::BoxGeometry::paddingBoxWidth const):
(WebCore::Layout::BoxGeometry::setPadding):
(WebCore::Layout::BoxGeometry::setHorizontalPadding):
(WebCore::Layout::BoxGeometry::setVerticalPadding):
(WebCore::Layout::BoxGeometry::paddingBefore const):
(WebCore::Layout::BoxGeometry::paddingStart const):
(WebCore::Layout::BoxGeometry::paddingAfter const):
(WebCore::Layout::BoxGeometry::paddingEnd const):

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




More information about the webkit-changes mailing list