[webkit-changes] [WebKit/WebKit] 556535: [LFC][IFC] Add support for line-box-contain: glyphs

Alan Baradlay noreply at github.com
Sat Oct 29 06:22:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 556535b1b0226fbf16d4a201afe782e591418b70
      https://github.com/WebKit/WebKit/commit/556535b1b0226fbf16d4a201afe782e591418b70
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2022-10-29 (Sat, 29 Oct 2022)

  Changed paths:
    M LayoutTests/fast/text/simple-line-layout-line-box-contain-glyphs-expected.html
    M LayoutTests/fast/text/simple-line-layout-line-box-contain-glyphs.html
    M Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp

  Log Message:
  -----------
  [LFC][IFC] Add support for line-box-contain: glyphs
https://bugs.webkit.org/show_bug.cgi?id=247072

Reviewed by Antti Koivisto.

"line-box-contain: glyphs" affects the height of the inline boxes and inline boxes constrain the line box geometry.
While most of the "line-box-contain" values only control whether a certain type of content should be included when computing the height of the line box,
"glyphs" and "font" indirectly affect the line box height by stretching/shrinking their containing inline boxes (including root inline box).

* Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h:
(WebCore::Layout::InlineLevelBox::isPreferredLineHeightFontMetricsBased const): "font" handling is moved over to adjustInlineBoxHeightsForLineBoxContainIfApplicable
(WebCore::Layout::InlineLevelBox::lineBoxContain const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::adjustedLayoutBoundsWithFallbackFonts const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::adjustInlineBoxHeightsForLineBoxContainIfApplicable):
(WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable):
(WebCore::Layout::LineBoxBuilder::adjustLayoutBoundsWithFallbackFonts const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
(WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForStyle):

* fast/text/simple-line-layout-line-box-contain-glyphs.html: turn it into a line-box-contain test.

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




More information about the webkit-changes mailing list