[webkit-changes] [WebKit/WebKit] fc6a09: Cherry-pick 282495 at main (c25019a48207). https://bu...

Alan Baradlay noreply at github.com
Wed Aug 28 15:29:01 PDT 2024


  Branch: refs/heads/webkitglib/2.46
  Home:   https://github.com/WebKit/WebKit
  Commit: fc6a09f5d15ca51c80a6d6815399d9af8cf4f110
      https://github.com/WebKit/WebKit/commit/fc6a09f5d15ca51c80a6d6815399d9af8cf4f110
  Author: Antti Koivisto <antti at apple.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M LayoutTests/fast/ruby/floating-ruby-text-expected.txt
    M LayoutTests/fast/ruby/positioned-ruby-text-expected.txt
    M Source/WebCore/layout/LayoutState.cpp
    M Source/WebCore/layout/LayoutState.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h
    M Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  Cherry-pick 282495 at main (c25019a48207). https://bugs.webkit.org/show_bug.cgi?id=278307

    [IFC][Ruby] Perform nested ruby layouts from IFC
    https://bugs.webkit.org/show_bug.cgi?id=278307
    rdar://134239864

    Reviewed by Alan Baradlay.

    Move nested ruby layouts to IFC. Handle also the case where we relayout because of
    a constraints change.

    * Source/WebCore/layout/LayoutState.cpp:
    (WebCore::Layout::LayoutState::LayoutState):
    (WebCore::Layout::LayoutState::layoutWithFormattingContextForBox):

    Add optional width constraint argument.

    * Source/WebCore/layout/LayoutState.h:
    * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
    (WebCore::Layout::InlineFormattingContext::layoutWithFormattingContextForBox):
    * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
    (WebCore::Layout::InlineFormattingContext::layoutWithFormattingContextForBox):
    * Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
    (WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):

    Include an opaque inline item for annotation boxes.

    * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
    (WebCore::Layout::LineBuilder::candidateContentForLine):

    Ensure opaque box has a layout.

    Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
    (WebCore::Layout::InlineDisplayContentBuilder::processRubyBase):
    * Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
    (WebCore::Layout::annotationMarginBoxVisualRect):
    (WebCore::Layout::annotationOverlapCheck):
    (WebCore::Layout::RubyFormattingContext::annotationBoxLogicalWidth):
    (WebCore::Layout::RubyFormattingContext::baseEndAdditionalLogicalWidth):
    (WebCore::Layout::RubyFormattingContext::applyRubyAlignOnBaseContent):
    (WebCore::Layout::RubyFormattingContext::applyRubyAlign):
    (WebCore::Layout::RubyFormattingContext::applyRubyAlignOnAnnotationBox):
    (WebCore::Layout::RubyFormattingContext::placeAnnotationBox):
    (WebCore::Layout::RubyFormattingContext::sizeAnnotationBox):

    Layout again if the annotation box size changed.

    (WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
    (WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
    * Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:
    * Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp:
    (WebCore::LayoutIntegration::layoutWithFormattingContextForBox):
    * Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h:
    * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
    (WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
    * Source/WebCore/rendering/RenderBlockFlow.cpp:
    (WebCore::RenderBlockFlow::layoutModernLines):

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

Canonical link: https://commits.webkit.org/282416.23@webkitglib/2.46


  Commit: 9bb2d09dae8cfa81a28c95c91e9a1b28fba4fcac
      https://github.com/WebKit/WebKit/commit/9bb2d09dae8cfa81a28c95c91e9a1b28fba4fcac
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineItem.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLevelBoxInlines.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp
    M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.h
    M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp

  Log Message:
  -----------
  Cherry-pick 282629 at main (746c3647737f). https://bugs.webkit.org/show_bug.cgi?id=278527

    [Cleanup] Use AtomicInlineBox consistently across inline layout
    https://bugs.webkit.org/show_bug.cgi?id=278527

    Reviewed by Antti Koivisto.

    Use "AtomicInlineBox" starting from InlineItems all the way to display boxes when applicable.
    (https://www.w3.org/TR/css-display-3/#atomic-inline)

    * Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp:
    (WebCore::Layout::computedExpansions):
    * Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
    (WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
    (WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
    * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
    (WebCore::Layout::InlineFormattingContext::resetGeometryForClampedContent):
    * Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
    (WebCore::Layout::InlineFormattingUtils::inlineLevelBoxAffectsLineBox const):
    (WebCore::Layout::InlineFormattingUtils::isAtSoftWrapOpportunity const):
    (WebCore::Layout::InlineFormattingUtils::nextWrapOpportunity const):
    * Source/WebCore/layout/formattingContexts/inline/InlineItem.h:
    (WebCore::Layout::InlineItem::isAtomicInlineBox const):
    (WebCore::Layout::InlineItem::isBox const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
    (WebCore::Layout::InlineItemsBuilder::build):
    (WebCore::Layout::InlineItemsBuilder::collectInlineItems):
    (WebCore::Layout::buildBidiParagraph):
    (WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):
    * Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h:
    (WebCore::Layout::InlineLevelBox::hasTextEmphasis const):
    (WebCore::Layout::InlineLevelBox::isAtomicInlineBox const):
    (WebCore::Layout::InlineLevelBox::isListMarker const):
    (WebCore::Layout::InlineLevelBox::isAtomicInlineLevelBox const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLevelBoxInlines.h:
    (WebCore::Layout::InlineLevelBox::createAtomicInlineBox):
    (WebCore::Layout::InlineLevelBox::mayStretchLineBox const):
    (WebCore::Layout::InlineLevelBox::createAtomicInlineLevelBox): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
    (WebCore::Layout::Line::resetBidiLevelForTrailingWhitespace):
    (WebCore::Layout::Line::append):
    (WebCore::Layout::Line::appendTextContent):
    (WebCore::Layout::Line::appendAtomicInlineBox):
    (WebCore::Layout::toLineRunType):
    (WebCore::Layout::Line::appendGenericInlineLevelBox): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
    (WebCore::Layout::Line::Run::isAtomicInlineBox const):
    (WebCore::Layout::Line::Run::isContentful const):
    (WebCore::Layout::Line::Run::isBox const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp:
    (WebCore::Layout::LineBox::logicalBorderBoxForAtomicInlineBox const):
    (WebCore::Layout::LineBox::logicalBorderBoxForAtomicInlineLevelBox const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h:
    (WebCore::Layout::LineBox::hasNonInlineBox const):
    (WebCore::Layout::LineBox::hasAtomicInlineBox const):
    (WebCore::Layout::LineBox::hasAtomicInlineLevelBox const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
    (WebCore::Layout::LineBoxBuilder::setVerticalPropertiesForInlineLevelBox const):
    (WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
    (WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable):
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
    (WebCore::Layout::LineBoxVerticalAligner::computeLogicalHeightAndAlign const):
    (WebCore::Layout::LineBoxVerticalAligner::adjustForAnnotationIfNeeded const):
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
    (WebCore::Layout::isContentfulOrHasDecoration):
    (WebCore::Layout::hasTrailingSoftWrapOpportunity):
    (WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
    (WebCore::Layout::LineBuilder::candidateContentForLine):
    (WebCore::Layout::LineBuilder::adjustedLineRectWithCandidateInlineContent const):
    * Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp:
    (WebCore::Layout::InlineQuirks::lineBreakBoxAffectsParentInlineBox):
    * Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp:
    (WebCore::Layout::IntrinsicWidthHandler::simplifiedMinimumWidth const):
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
    (WebCore::InlineDisplay::Box::isAtomicInlineBox const):
    (WebCore::InlineDisplay::Box::isInlineLevelBox const):
    (WebCore::InlineDisplay::Box::isAtomicInlineLevelBox const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
    (WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
    (WebCore::Layout::InlineDisplayContentBuilder::insertRubyAnnotationBox):
    (WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
    (WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
    (WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
    (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes):
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
    (WebCore::Layout::InlineDisplayLineBuilder::collectEnclosingLineGeometry const):
    * Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
    (WebCore::LayoutIntegration::showInlineContent):
    * Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
    (WebCore::LayoutIntegration::InlineContentBuilder::adjustDisplayLines const):
    * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
    (WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
    (WebCore::LayoutIntegration::LineLayout::hitTest):
    (WebCore::LayoutIntegration::LineLayout::shiftLinesBy):
    * Source/WebCore/layout/layouttree/LayoutBox.cpp:
    (WebCore::Layout::Box::isAtomicInlineBox const):
    (WebCore::Layout::Box::isLayoutContainmentBox const):
    (WebCore::Layout::Box::isSizeContainmentBox const):
    (WebCore::Layout::Box::isAtomicInlineLevelBox const): Deleted.
    * Source/WebCore/layout/layouttree/LayoutBox.h:
    * Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:
    (WebCore::Layout::showInlineTreeAndRuns):
    (WebCore::Layout::outputLayoutBox):

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

Canonical link: https://commits.webkit.org/282416.24@webkitglib/2.46


  Commit: acb4f5c32c7b15e1f14b3d4f305582a56b074de2
      https://github.com/WebKit/WebKit/commit/acb4f5c32c7b15e1f14b3d4f305582a56b074de2
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A LayoutTests/fast/inline-block/nested-inline-block-with-fixed-width-expected.html
    A LayoutTests/fast/inline-block/nested-inline-block-with-fixed-width.html
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp

  Log Message:
  -----------
  Cherry-pick 282654 at main (e576d349069d). https://bugs.webkit.org/show_bug.cgi?id=278543

    [IFC][Integration] Broken ad elements on cnn.com
    https://bugs.webkit.org/show_bug.cgi?id=278543
    <rdar://134383150>

    Reviewed by Antti Koivisto.

    Intrinsic width codepath (preferred width computation) is not supposed to run _layout_ code.

    * LayoutTests/fast/inline-block/nested-inline-block-with-fixed-width-expected.html: Added.
    * LayoutTests/fast/inline-block/nested-inline-block-with-fixed-width.html: Added.
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
    (WebCore::Layout::LineBuilder::candidateContentForLine):

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

Canonical link: https://commits.webkit.org/282416.25@webkitglib/2.46


Compare: https://github.com/WebKit/WebKit/compare/3e98c47de000...acb4f5c32c7b

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


More information about the webkit-changes mailing list