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

Changeset 245810 in webkit


Ignore:
Timestamp:
May 28, 2019, 7:48:57 AM (7 years ago)
Author:
Alan Bujtas
Message:

[LFC[IFC] Ignore the initial strut's height when the line does not have any content.
​https://bugs.webkit.org/show_bug.cgi?id=198268
<rdar://problem/51150057>

Reviewed by Antti Koivisto.

The strut (​https://www.w3.org/TR/CSS22/visudet.html#leading) defines the initial logical height
for the line. This height should be ignored though when the line does not have any content.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r245809 r245810  
     12019-05-28  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC[IFC] Ignore the initial strut's height when the line does not have any content.
     4        https://bugs.webkit.org/show_bug.cgi?id=198268
     5        <rdar://problem/51150057>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        The strut (https://www.w3.org/TR/CSS22/visudet.html#leading) defines the initial logical height
     10        for the line. This height should be ignored though when the line does not have any content.
     11
     12        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
     13        (WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):
     14
    1152019-05-27  Antoine Quint  <graouts@apple.com>
    216
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp

    r245792 r245810  
    471471    // 9.4.2 Inline formatting contexts
    472472    // A line box is always tall enough for all of the boxes it contains.
    473     auto lineBox = Display::Rect { line.logicalTop(), line.logicalLeft(), 0 , line.logicalHeight() };
     473
     474    // Ignore the initial strut.
     475    auto lineBox = Display::Rect { line.logicalTop(), line.logicalLeft(), 0 , line.hasContent() ? line.logicalHeight() : LayoutUnit { } };
    474476    // Create final display runs.
    475477    for (unsigned index = 0; index < lineItems.size(); ++index) {
Note: See TracChangeset for help on using the changeset viewer.