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

Changeset 246464 in webkit


Ignore:
Timestamp:
Jun 15, 2019, 7:36:40 AM (7 years ago)
Author:
Alan Bujtas
Message:

[LFC][MarginCollapsing] Remove redundant checks in MarginCollapse::marginBefore/AfterCollapsesWith*
https://bugs.webkit.org/show_bug.cgi?id=198882
<rdar://problem/51773334>

Reviewed by Antti Koivisto.

In-flow child can neither be floating nor out-of-flow positioned.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246463 r246464  
     12019-06-15  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][MarginCollapsing] Remove redundant checks in MarginCollapse::marginBefore/AfterCollapsesWith*
     4        https://bugs.webkit.org/show_bug.cgi?id=198882
     5        <rdar://problem/51773334>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        In-flow child can neither be floating nor out-of-flow positioned.
     10
     11        * layout/blockformatting/BlockMarginCollapse.cpp:
     12        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
     13        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):
     14
    1152019-06-15  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp

    r246463 r246464  
    213213        return false;
    214214
    215     // Margins between a floated box and any other box do not collapse.
    216     if (firstInFlowChild.isFloatingPositioned())
    217         return false;
    218 
    219     // Margins of absolutely positioned boxes do not collapse.
    220     if (firstInFlowChild.isOutOfFlowPositioned())
    221         return false;
    222 
    223215    // Margins of inline-block boxes do not collapse.
    224216    if (firstInFlowChild.isInlineBlockBox())
     
    349341    if (!computedMinHeight.isAuto() && computedMinHeight.value()
    350342        && (marginAfterCollapsesWithParentMarginBefore(layoutState, lastInFlowChild) || hasClearance(layoutState, lastInFlowChild)))
    351         return false;
    352 
    353     // Margins between a floated box and any other box do not collapse.
    354     if (lastInFlowChild.isFloatingPositioned())
    355         return false;
    356 
    357     // Margins of absolutely positioned boxes do not collapse.
    358     if (lastInFlowChild.isOutOfFlowPositioned())
    359343        return false;
    360344
Note: See TracChangeset for help on using the changeset viewer.