Changeset 240144 in webkit


Ignore:
Timestamp:
Jan 18, 2019 6:25:08 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][BFC] Check for inflow children while computing height for block formatting context roots.
https://bugs.webkit.org/show_bug.cgi?id=193555

Reviewed by Antti Koivisto.

Source/WebCore:

This patch also extends areEssentiallyEqual to 0.125px to be able to match (essentially equal) inline runs.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::contentHeightForFormattingContextRoot):

  • layout/Verification.cpp:

(WebCore::Layout::areEssentiallyEqual):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r240143 r240144  
     12019-01-18  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][BFC] Check for inflow children while computing height for block formatting context roots.
     4        https://bugs.webkit.org/show_bug.cgi?id=193555
     5
     6        Reviewed by Antti Koivisto.
     7
     8        This patch also extends areEssentiallyEqual to 0.125px to be able to match (essentially equal) inline runs.
     9
     10        * layout/FormattingContextGeometry.cpp:
     11        (WebCore::Layout::contentHeightForFormattingContextRoot):
     12        * layout/Verification.cpp:
     13        (WebCore::Layout::areEssentiallyEqual):
     14        * page/FrameViewLayoutContext.cpp:
     15        (WebCore::layoutUsingFormattingContext):
     16
    1172019-01-18  Yacine Bandou  <yacine.bandou@softathome.com>
    218
  • trunk/Source/WebCore/layout/FormattingContextGeometry.cpp

    r240036 r240144  
    115115        }
    116116    } else if (formattingRootContainer.establishesBlockFormattingContext() || layoutBox.isDocumentBox()) {
    117         auto& firstDisplayBox = layoutState.displayBoxForLayoutBox(*formattingRootContainer.firstInFlowChild());
    118         auto& lastDisplayBox = layoutState.displayBoxForLayoutBox(*formattingRootContainer.lastInFlowChild());
    119         top = firstDisplayBox.rectWithMargin().top();
    120         bottom = lastDisplayBox.rectWithMargin().bottom();
     117        if (formattingRootContainer.hasInFlowChild()) {
     118            auto& firstDisplayBox = layoutState.displayBoxForLayoutBox(*formattingRootContainer.firstInFlowChild());
     119            auto& lastDisplayBox = layoutState.displayBoxForLayoutBox(*formattingRootContainer.lastInFlowChild());
     120            top = firstDisplayBox.rectWithMargin().top();
     121            bottom = lastDisplayBox.rectWithMargin().bottom();
     122        }
    121123    }
    122124
  • trunk/Source/WebCore/layout/Verification.cpp

    r240035 r240144  
    4747        return true;
    4848
    49     return fabs(a - b.toFloat()) <= 4 * LayoutUnit::epsilon();
     49    return fabs(a - b.toFloat()) <= 8 * LayoutUnit::epsilon();
    5050}
    5151
  • trunk/Tools/ChangeLog

    r240141 r240144  
     12019-01-18  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][BFC] Check for inflow children while computing height for block formatting context roots.
     4        https://bugs.webkit.org/show_bug.cgi?id=193555
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * LayoutReloaded/misc/LFC-passing-tests.txt:
     9
    1102019-01-18  Philippe Normand  <pnormand@igalia.com>
    211
  • trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt

    r240111 r240144  
    106106fast/block/float/013.html
    107107fast/block/float/019.html
     108fast/block/float/030.html
    108109fast/block/float/negative-margin-clear.html
    109110fast/block/float/overhanging-after-height-decrease-offsets.html
Note: See TracChangeset for help on using the changeset viewer.