Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7c7fc84ee90a288c80d1d6feea120c519f4e6136
      
https://github.com/WebKit/WebKit/commit/7c7fc84ee90a288c80d1d6feea120c519f4e6136
  Author: Alan Baradlay <[email protected]>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M 
Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp

  Log Message:
  -----------
  [LFC][IFC] Layout bounds should be set on inline boxes only
https://bugs.webkit.org/show_bug.cgi?id=248506

Reviewed by Antti Koivisto.

1. Do not set "layout bounds" on non-inline boxes (spec agrees here)
2. Make sure hard line breaks still stretch their parent inline boxes when 
applicable

Current behavior:
1. Line break box gets computed layout bounds
2. When the line break box affects the line box, we stretch the line by the 
computed layout bounds value

Patch behavior:
1. Line break box makes the parent inline box "contentful" when applicable 
(this is the same as #2 at current behavior)
2. The "contentful" inline box (mostly the root inline box) stretches the line 
box by the computed layout bounds.
It makes break box behave like regular "text content", where the content 
indirectly affects the line box height.

This patch is also in preparation for supporting text-edge, where text-edge 
affects the layout bounds value.

* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::inlineLevelBoxAffectsLineBox const):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.cpp:
(WebCore::Layout::InlineFormattingQuirks::lineBreakBoxAffectsParentInlineBox):
(WebCore::Layout::InlineFormattingQuirks::inlineBoxAffectsLineBox const):
(WebCore::Layout::InlineFormattingQuirks::inlineLevelBoxAffectsLineBox const): 
Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.h:
* 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::computeLineBoxLogicalHeight const):
(WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition 
const):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to