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

Changeset 249288 in webkit


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

[LFC][TFC] The table wrapper box is a block level box
https://bugs.webkit.org/show_bug.cgi?id=201229
<rdar://problem/54805515>

Reviewed by Antti Koivisto.

This is the anonymous box that we inject as the parent of the table caption/actual table box.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::complicatedCases):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::isFloatAvoider const):
(WebCore::Layout::Box::isBlockLevelBox const):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249287 r249288  
     12019-08-29  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][TFC] The table wrapper box is a block level box
     4        https://bugs.webkit.org/show_bug.cgi?id=201229
     5        <rdar://problem/54805515>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        This is the anonymous box that we inject as the parent of the table caption/actual table box.
     10
     11        * layout/FormattingContextGeometry.cpp:
     12        (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
     13        * layout/blockformatting/BlockFormattingContext.cpp:
     14        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
     15        * layout/layouttree/LayoutBox.cpp:
     16        (WebCore::Layout::Box::establishesBlockFormattingContext const):
     17        (WebCore::Layout::Box::isFloatAvoider const):
     18        (WebCore::Layout::Box::isBlockLevelBox const):
     19
    1202019-08-29  Youenn Fablet  <youenn@apple.com>
    221
  • trunk/Source/WebCore/layout/FormattingContextGeometry.cpp

    r249177 r249288  
    728728    ASSERT(!layoutBox.replaced());
    729729    // TODO: Use complicated-case for document renderer for now (see BlockFormattingContext::Geometry::inFlowHeightAndMargin).
    730     ASSERT((layoutBox.isBlockLevelBox() && layoutBox.isInFlow() && !layoutBox.isOverflowVisible()) || layoutBox.isInlineBlockBox() || layoutBox.isFloatingPositioned() || layoutBox.isDocumentBox());
     730    ASSERT((layoutBox.isBlockLevelBox() && layoutBox.isInFlow() && !layoutBox.isOverflowVisible()) || layoutBox.isInlineBlockBox() || layoutBox.isFloatingPositioned() || layoutBox.isDocumentBox() || layoutBox.isTableBox());
    731731
    732732    // 10.6.6 Complicated cases
  • trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp

    r248365 r249288  
    253253{
    254254    // We only need to estimate margin top for float related layout (formatting context roots avoid floats).
    255     ASSERT(layoutBox.isFloatingPositioned() || layoutBox.hasFloatClear() || layoutBox.establishesBlockFormattingContext() || layoutBox.establishesInlineFormattingContext());
     255    ASSERT(layoutBox.isFloatAvoider() || layoutBox.establishesInlineFormattingContext());
    256256
    257257    // In order to figure out whether a box should avoid a float, we need to know the final positions of both (ignore relative positioning for now).
  • trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp

    r249085 r249288  
    9292        return true;
    9393
     94    if (isTableWrapperBox())
     95        return true;
     96
    9497    return false;
    9598}
     
    177180bool Box::isFloatAvoider() const
    178181{
    179     return establishesBlockFormattingContext() || isFloatingPositioned();
     182    return establishesBlockFormattingContext() || establishesTableFormattingContext() || isFloatingPositioned() || hasFloatClear();
    180183}
    181184
     
    277280    // Block level elements generate block level boxes.
    278281    auto display = m_style.display();
    279     return display == DisplayType::Block || display == DisplayType::ListItem || (display == DisplayType::Table && !isTableWrapperBox());
     282    return display == DisplayType::Block || display == DisplayType::ListItem || display == DisplayType::Table;
    280283}
    281284
Note: See TracChangeset for help on using the changeset viewer.