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

Changeset 249289 in webkit


Ignore:
Timestamp:
Aug 29, 2019, 1:07:36 PM (7 years ago)
Author:
Alan Bujtas
Message:

[LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
https://bugs.webkit.org/show_bug.cgi?id=201230
<rdar://problem/54806131>

Reviewed by Antti Koivisto.

This might change in the future but for now let's use the "complicated cases" when we need to compute the TFC's height and vertical margin.
This is very BFC specific since (block)TFC is always parented in a BFC.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249288 r249289  
     12019-08-29  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
     4        https://bugs.webkit.org/show_bug.cgi?id=201230
     5        <rdar://problem/54806131>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        This might change in the future but for now let's use the "complicated cases" when we need to compute the TFC's height and vertical margin.
     10        This is very BFC specific since (block)TFC is always parented in a BFC.
     11
     12        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
     13        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
     14
    1152019-08-29  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp

    r249172 r249289  
    258258
    259259    HeightAndMargin heightAndMargin;
    260     // TODO: Figure out the case for the document element. Let's just complicated-case it for now.
    261     if (layoutBox.isOverflowVisible() && !layoutBox.isDocumentBox())
     260    // FIXME: Let's special case the table height computation for now -> figure out whether tables fall into the "inFlowNonReplacedHeightAndMargin" category.
     261    if (layoutBox.establishesTableFormattingContext()) {
     262        auto usedHorizontalValues = UsedHorizontalValues { layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth() };
     263        heightAndMargin = complicatedCases(layoutState, layoutBox, usedValues, usedHorizontalValues);
     264    } else if (layoutBox.isOverflowVisible() && !layoutBox.isDocumentBox()) {
     265        // TODO: Figure out the case for the document element. Let's just complicated-case it for now.
    262266        heightAndMargin = inFlowNonReplacedHeightAndMargin(layoutState, layoutBox, usedValues);
    263     else {
     267    } else {
    264268        // 10.6.6 Complicated cases
    265269        // Block-level, non-replaced elements in normal flow when 'overflow' does not compute to 'visible' (except if the 'overflow' property's value has been propagated to the viewport).
Note: See TracChangeset for help on using the changeset viewer.