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

Changeset 288503 in webkit


Ignore:
Timestamp:
Jan 24, 2022, 5:55:10 PM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r288015. rdar://problem/84617690

[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.

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@288015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-613-branch
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613-branch/LayoutTests/ChangeLog

    r288502 r288503  
     12022-01-24  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r288015. rdar://problem/84617690
     4
     5    [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
     6    https://bugs.webkit.org/show_bug.cgi?id=235218
     7    <rdar://84617690>
     8   
     9    Reviewed by Antti Koivisto.
     10   
     11    Source/WebCore:
     12   
     13    Even if the atomic inline level box itself does not stetch the line box, it may still affect the root inline box position
     14    through baseline "syncing" (This is mostly the case with 0 tall boxes as (non-empty) atomic inline boxes in general stretch the line box).
     15   
     16    Test: fast/block/line-layout/non-empty-inline-block-with-zero-height.html
     17   
     18    * layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
     19    (WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
     20   
     21    LayoutTests:
     22   
     23    * fast/block/line-layout/non-empty-inline-block-with-zero-height-expected.html: Added.
     24    * fast/block/line-layout/non-empty-inline-block-with-zero-height.html: Added.
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2022-01-14  Alan Bujtas  <zalan@apple.com>
     30
     31            [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
     32            https://bugs.webkit.org/show_bug.cgi?id=235218
     33            <rdar://84617690>
     34
     35            Reviewed by Antti Koivisto.
     36
     37            * fast/block/line-layout/non-empty-inline-block-with-zero-height-expected.html: Added.
     38            * fast/block/line-layout/non-empty-inline-block-with-zero-height.html: Added.
     39
    1402022-01-24  Alan Coon  <alancoon@apple.com>
    241
  • branches/safari-613-branch/Source/WebCore/ChangeLog

    r288502 r288503  
     12022-01-24  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r288015. rdar://problem/84617690
     4
     5    [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
     6    https://bugs.webkit.org/show_bug.cgi?id=235218
     7    <rdar://84617690>
     8   
     9    Reviewed by Antti Koivisto.
     10   
     11    Source/WebCore:
     12   
     13    Even if the atomic inline level box itself does not stetch the line box, it may still affect the root inline box position
     14    through baseline "syncing" (This is mostly the case with 0 tall boxes as (non-empty) atomic inline boxes in general stretch the line box).
     15   
     16    Test: fast/block/line-layout/non-empty-inline-block-with-zero-height.html
     17   
     18    * layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
     19    (WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
     20   
     21    LayoutTests:
     22   
     23    * fast/block/line-layout/non-empty-inline-block-with-zero-height-expected.html: Added.
     24    * fast/block/line-layout/non-empty-inline-block-with-zero-height.html: Added.
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2022-01-14  Alan Bujtas  <zalan@apple.com>
     30
     31            [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px
     32            https://bugs.webkit.org/show_bug.cgi?id=235218
     33            <rdar://84617690>
     34
     35            Reviewed by Antti Koivisto.
     36
     37            Even if the atomic inline level box itself does not stetch the line box, it may still affect the root inline box position
     38            through baseline "syncing" (This is mostly the case with 0 tall boxes as (non-empty) atomic inline boxes in general stretch the line box).
     39
     40            Test: fast/block/line-layout/non-empty-inline-block-with-zero-height.html
     41
     42            * layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
     43            (WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
     44
    1452022-01-24  Alan Coon  <alancoon@apple.com>
    246
  • branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp

    r287731 r288503  
    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.