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

Changeset 267572 in webkit


Ignore:
Timestamp:
Sep 25, 2020, 9:05:45 AM (6 years ago)
Author:
Alan Bujtas
Message:

[LFC][Out-of-flow] ASSERTION FAILED: !layoutBox.isOutOfFlowPositioned() in WebCore::Layout::FormattingContext::Geometry::computedHeightValue
https://bugs.webkit.org/show_bug.cgi?id=216976

Reviewed by Antti Koivisto.

Source/WebCore:

Geometry::computedHeightValue is a simple resolver function. It should not really care about
whether the box's containing block has valid vertical geometry. The callsite (where this assert is important) is already testing this condition.

Test: fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple.html

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
(WebCore::Layout::FormattingContext::Geometry::constraintsForInFlowContent):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):

LayoutTests:

  • fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple-expected.html: Added.
  • fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r267571 r267572  
     12020-09-25  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][Out-of-flow] ASSERTION FAILED: !layoutBox.isOutOfFlowPositioned() in WebCore::Layout::FormattingContext::Geometry::computedHeightValue
     4        https://bugs.webkit.org/show_bug.cgi?id=216976
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple-expected.html: Added.
     9        * fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple.html: Added.
     10
    1112020-09-25  Antoine Quint  <graouts@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r267571 r267572  
     12020-09-25  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][Out-of-flow] ASSERTION FAILED: !layoutBox.isOutOfFlowPositioned() in WebCore::Layout::FormattingContext::Geometry::computedHeightValue
     4        https://bugs.webkit.org/show_bug.cgi?id=216976
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Geometry::computedHeightValue is a simple resolver function. It should not really care about
     9        whether the box's containing block has valid vertical geometry. The callsite (where this assert is important) is already testing this condition.
     10
     11        Test: fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple.html
     12
     13        * layout/FormattingContext.h:
     14        * layout/FormattingContextGeometry.cpp:
     15        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
     16        (WebCore::Layout::FormattingContext::Geometry::constraintsForInFlowContent):
     17        * layout/blockformatting/BlockFormattingContext.cpp:
     18        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
     19
    1202020-09-25  Antoine Quint  <graouts@webkit.org>
    221
  • trunk/Source/WebCore/layout/FormattingContext.h

    r267342 r267572  
    4141namespace Layout {
    4242
    43 class Box;
    4443class BoxGeometry;
    4544class ReplacedBox;
  • trunk/Source/WebCore/layout/FormattingContextGeometry.cpp

    r267308 r267572  
    7575
    7676    if (!containingBlockHeight) {
    77         // Containing block's height is already computed since we layout the out-of-flow boxes as the last step.
    78         ASSERT(!layoutBox.isOutOfFlowPositioned());
    7977        if (layoutState().inQuirksMode())
    8078            containingBlockHeight = formattingContext().quirks().heightValueOfNearestContainingBlockWithFixedHeight(layoutBox);
     
    11751173{
    11761174    auto& boxGeometry = formattingContext().geometryForBox(containerBox, escapeReason);
    1177     // FIXME: Find out if min/max-height properties should also be taken into account here.
    11781175    return { { boxGeometry.contentBoxLeft(), boxGeometry.contentBoxWidth() }, { boxGeometry.contentBoxTop(), computedHeight(containerBox) } };
    11791176}
  • trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp

    r267343 r267572  
    148148            auto establishesFormattingContext = layoutBox.establishesFormattingContext();
    149149            if (establishesFormattingContext) {
    150                 // Now that we computed the root's height, we can layout the out-of-flow descendants.
     150                // Now that we computed the box's height, we can layout the out-of-flow descendants.
    151151                if (is<ContainerBox>(layoutBox) && downcast<ContainerBox>(layoutBox).hasChild()) {
    152152                    auto& containerBox = downcast<ContainerBox>(layoutBox);
Note: See TracChangeset for help on using the changeset viewer.