[webkit-changes] [WebKit/WebKit] b82a10: [IFC] Introduce InlineItem type 'opaque'

Alan Baradlay noreply at github.com
Sat Aug 26 08:52:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b82a10b890c06e7e8500ad254759afa10e934589
      https://github.com/WebKit/WebKit/commit/b82a10b890c06e7e8500ad254759afa10e934589
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-08-26 (Sat, 26 Aug 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineItem.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp

  Log Message:
  -----------
  [IFC] Introduce InlineItem type 'opaque'
https://bugs.webkit.org/show_bug.cgi?id=260693

Reviewed by Antti Koivisto.

This is in preparation for implementing out-of-flow static positioning by placing opaque items on the line.

An opaque item:
  - does not introduce a soft wrap opportunity
  - does not participate in line breaking (zero logical width)
  - has the bidi level of 0xff
  - does not affect parent inline box/line box height
  - does not create display box

* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::hasLeadingTextContent):
(WebCore::Layout::isWhitespaceOnlyContent):
(WebCore::Layout::isNonContentRunsOnly):
(WebCore::Layout::isWrappableRun):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutFloatContentOnly):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::inlineItemWidth const):
(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::InlineFormattingGeometry::nextWrapOpportunity):
* Source/WebCore/layout/formattingContexts/inline/InlineItem.h:
(WebCore::Layout::InlineItem::isOpaque const):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::buildBidiParagraph):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendOpaqueBox):
(WebCore::Layout::Line::TrimmableTrailingContent::remove):
(WebCore::Layout::toLineRunType):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::Run::isOutOfFlowPositioned const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
(WebCore::Layout::LineBuilder::leadingPunctuationWidthForLineCandiate const):
(WebCore::Layout::LineBuilder::trailingPunctuationOrStopOrCommaWidthForLineCandiate const):
(WebCore::Layout::LineBuilder::candidateContentForLine):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

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




More information about the webkit-changes mailing list