[webkit-changes] [WebKit/WebKit] 9f512d: [IFC][initial letter] Intrusive initial letter int...

Alan Baradlay noreply at github.com
Sun Jan 8 08:12:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9f512dad96178ee55ef193bddfd1f453f25a6021
      https://github.com/WebKit/WebKit/commit/9f512dad96178ee55ef193bddfd1f453f25a6021
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-01-08 (Sun, 08 Jan 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [IFC][initial letter] Intrusive initial letter introduces clearance
https://bugs.webkit.org/show_bug.cgi?id=250278

Reviewed by Antti Koivisto.

See the comment in LineBuilder::adjustGeometryForInitialLetterIfNeeded.
(When we need to clear an intrusive initial letter (to place the current line's initial letter)
the line "moves" after the clear position introducing a "before" clearance.
This ensures that containing block's logical height is correct by taking this clearance into account.

* Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::setClearGapBeforeFirstLine):
(WebCore::Layout::InlineFormattingState::clearGapBeforeFirstLine const):
(WebCore::Layout::InlineFormattingState::clearLineAndBoxes):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::adjustGeometryForInitialLetterIfNeeded):
(WebCore::Layout::LineBuilder::tryPlacingFloatBox):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):

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




More information about the webkit-changes mailing list