⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 288015 in webkit


Ignore:
Timestamp:
Jan 14, 2022, 5:40:15 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
​https://bugs.webkit.org/show_bug.cgi?id=235218
<rdar://84617690>

Reviewed by Antti Koivisto.

Source/WebCore:

Even if the atomic inline level box itself does not stetch the line box, it may still affect the root inline box position
through baseline "syncing" (This is mostly the case with 0 tall boxes as (non-empty) atomic inline boxes in general stretch the line box).

Test: fast/block/line-layout/non-empty-inline-block-with-zero-height.html

  • layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:

(WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):

LayoutTests:

  • fast/block/line-layout/non-empty-inline-block-with-zero-height-expected.html: Added.
  • fast/block/line-layout/non-empty-inline-block-with-zero-height.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r288012 r288015  
     12022-01-14  Alan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
     4        https://bugs.webkit.org/show_bug.cgi?id=235218
     5        <rdar://84617690>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/block/line-layout/non-empty-inline-block-with-zero-height-expected.html: Added.
     10        * fast/block/line-layout/non-empty-inline-block-with-zero-height.html: Added.
     11
    1122022-01-14  Antti Koivisto  <antti@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r288014 r288015  
     12022-01-14  Alan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
     4        https://bugs.webkit.org/show_bug.cgi?id=235218
     5        <rdar://84617690>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Even if the atomic inline level box itself does not stetch the line box, it may still affect the root inline box position
     10        through baseline "syncing" (This is mostly the case with 0 tall boxes as (non-empty) atomic inline boxes in general stretch the line box).
     11
     12        Test: fast/block/line-layout/non-empty-inline-block-with-zero-height.html
     13
     14        * layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
     15        (WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
     16
    1172022-01-14  Chris Lord  <clord@igalia.com>
    218
  • trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp

    r287731 r288015  
    290290        }
    291291        inlineLevelBoxAbsoluteBaselineOffsetMap.add(&inlineLevelBox, absoluteBaselineOffset);
    292         auto affectsRootInlineBoxVerticalPosition = formattingGeometry.inlineLevelBoxAffectsLineBox(inlineLevelBox, lineBox);
     292
     293        auto inlineLevelBoxStrechesLineBox = formattingGeometry.inlineLevelBoxAffectsLineBox(inlineLevelBox, lineBox);
     294        auto affectsRootInlineBoxVerticalPosition = inlineLevelBoxStrechesLineBox || (inlineLevelBox.isAtomicInlineLevelBox() && inlineLevelBox.baseline());
    293295        if (affectsRootInlineBoxVerticalPosition) {
    294296            auto topOffsetFromRootInlineBoxBaseline = absoluteBaselineOffset + inlineLevelBox.layoutBounds().ascent;
Note: See TracChangeset for help on using the changeset viewer.