[webkit-changes] [WebKit/WebKit] 2de831: [IFC][Cleanup] Move InlineItem related cached data...

Alan Baradlay noreply at github.com
Tue Oct 3 09:18:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2de831aad6377d3677cb08f13936cb5e974cdbcd
      https://github.com/WebKit/WebKit/commit/2de831aad6377d3677cb08f13936cb5e974cdbcd
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-10-03 (Tue, 03 Oct 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.h
    M Source/WebCore/layout/formattingContexts/inline/InlineContentCache.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItem.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineTextItem.h
    M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp
    M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h
    M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [IFC][Cleanup] Move InlineItem related cached data under InlineContentCache::InlineItems
https://bugs.webkit.org/show_bug.cgi?id=262448

Reviewed by Antti Koivisto.

1. Add InlineContentCache::InlineItems structure.
2. Group
    InlineItemList
    m_contentRequiresVisualReordering
    m_isNonBidiTextAndForcedLineBreakOnlyContent
  together under InlineContentCache::InlineItems.

* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp:
(WebCore::Layout::computeBreakOpportunities):
(WebCore::Layout::InlineContentBalancer::InlineContentBalancer):
(WebCore::Layout::InlineContentBalancer::initialize):
(WebCore::Layout::InlineContentBalancer::balanceRangeWithLineRequirement):
(WebCore::Layout::InlineContentBalancer::balanceRangeWithNoLineRequirement):
(WebCore::Layout::InlineContentBalancer::shouldTrimLeading const):
(WebCore::Layout::InlineContentBalancer::shouldTrimTrailing const):
(WebCore::Layout::InlineContentBalancer::SlidingWidth::SlidingWidth):
(WebCore::Layout::InlineContentBalancer::SlidingWidth::advanceEnd):
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.h:
* Source/WebCore/layout/formattingContexts/inline/InlineContentCache.h:
(WebCore::Layout::InlineContentCache::InlineItems::content):
(WebCore::Layout::InlineContentCache::InlineItems::content const):
(WebCore::Layout::InlineContentCache::InlineItems::set):
(WebCore::Layout::InlineContentCache::InlineItems::append):
(WebCore::Layout::InlineContentCache::InlineItems::clear):
(WebCore::Layout::InlineContentCache::InlineItems::shrinkToFit):
(WebCore::Layout::InlineContentCache::InlineItems::isEmpty const):
(WebCore::Layout::InlineContentCache::InlineItems::size const):
(WebCore::Layout::InlineContentCache::InlineItems::setRequiresVisualReordering):
(WebCore::Layout::InlineContentCache::InlineItems::requiresVisualReordering const):
(WebCore::Layout::InlineContentCache::InlineItems::setIsNonBidiTextAndForcedLineBreakOnlyContent):
(WebCore::Layout::InlineContentCache::InlineItems::isNonBidiTextAndForcedLineBreakOnlyContent const):
(WebCore::Layout::InlineContentCache::inlineItems const):
(WebCore::Layout::InlineContentCache::inlineItems):
(WebCore::Layout::InlineContentCache::setInlineItems): Deleted.
(WebCore::Layout::InlineContentCache::appendInlineItems): Deleted.
(WebCore::Layout::InlineContentCache::setContentRequiresVisualReordering): Deleted.
(WebCore::Layout::InlineContentCache::contentRequiresVisualReordering const): Deleted.
(WebCore::Layout::InlineContentCache::setIsNonBidiTextAndForcedLineBreakOnlyContent): Deleted.
(WebCore::Layout::InlineContentCache::isNonBidiTextAndForcedLineBreakOnlyContent const): Deleted.
(WebCore::Layout::InlineContentCache::clearInlineItems): Deleted.
(WebCore::Layout::InlineContentCache::shrinkToFit): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicSizes):
(WebCore::Layout::InlineFormattingContext::maximumContentSize):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::layoutFloatContentOnly):
(WebCore::Layout::InlineFormattingContext::resetGeometryForClampedContent):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::nextWrapOpportunity):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h:
* Source/WebCore/layout/formattingContexts/inline/InlineItem.h:
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::initializeLayoutQueue):
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::buildBidiParagraph):
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxStart):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxEnd):
(WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::hasTrailingSoftWrapOpportunity):
(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::placeInlineAndFloatContent):
(WebCore::Layout::LineBuilder::leadingPunctuationWidthForLineCandiate const):
(WebCore::Layout::LineBuilder::trailingPunctuationOrStopOrCommaWidthForLineCandiate const):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::LineBuilder::handleRubyContent):
(WebCore::Layout::LineBuilder::rebuildLineWithInlineContent):
(WebCore::Layout::LineBuilder::isLastLineWithInlineContent const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/InlineTextItem.h:
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp:
(WebCore::Layout::IntrinsicWidthHandler::IntrinsicWidthHandler):
(WebCore::Layout::IntrinsicWidthHandler::computedIntrinsicSizes):
(WebCore::Layout::IntrinsicWidthHandler::maximumContentSize):
(WebCore::Layout::IntrinsicWidthHandler::computedIntrinsicWidthForConstraint):
(WebCore::Layout::IntrinsicWidthHandler::simplifiedMinimumWidth const):
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h:
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::placedInlineItemEnd):
(WebCore::Layout::consumeTrailingLineBreakIfApplicable):
(WebCore::Layout::TextOnlySimpleLineBuilder::TextOnlySimpleLineBuilder):
(WebCore::Layout::TextOnlySimpleLineBuilder::initialize):
(WebCore::Layout::TextOnlySimpleLineBuilder::placeInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::placeNonWrappingInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::commitCandidateContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToTrailingItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::isEligibleForSimplifiedTextOnlyInlineLayout):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::InlineInvalidation):
(WebCore::Layout::inlineItemPositionForDisplayBox):
(WebCore::Layout::inlineItemPositionForDamagedContentPosition):
(WebCore::Layout::leadingInlineItemPositionForDamage):
(WebCore::Layout::leadingInlineItemPositionOnLastLine):
(WebCore::Layout::leadingInlineItemPositionByDamagedBox):
(WebCore::Layout::InlineInvalidation::applyFullDamageIfNeeded):
(WebCore::Layout::InlineInvalidation::textInserted):
(WebCore::Layout::InlineInvalidation::textWillBeRemoved):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxInserted):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxWillBeRemoved):
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::nextWrapOpportunityWithinRubyContainer):
(WebCore::Layout::RubyFormattingContext::layoutInlineAxis):
(WebCore::Layout::RubyFormattingContext::placeRubyContent):
(WebCore::Layout::RubyFormattingContext::layoutRubyBaseInlineAxis):
(WebCore::Layout::RubyFormattingContext::nextWrapOpportunity):
(WebCore::Layout::RubyFormattingContext::logicaWidthForRubyRange const):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateStyle):
(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::insertedIntoTree):
(WebCore::LayoutIntegration::LineLayout::removedFromTree):
(WebCore::LayoutIntegration::LineLayout::updateTextContent):
(WebCore::LayoutIntegration::LineLayout::releaseCaches):
(WebCore::LayoutIntegration::LineLayout::contentNeedsVisualReordering const):

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




More information about the webkit-changes mailing list