Changeset 246461 in webkit


Ignore:
Timestamp:
Jun 15, 2019 7:11:37 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][MarginCollapsing] Add check for computed height value in MarginCollapse::marginsCollapseThrough
https://bugs.webkit.org/show_bug.cgi?id=198883
<rdar://problem/51773395>

Reviewed by Antti Koivisto.

"A box's own margins collapse if... ...and it has a 'height' of either 0 or 'auto"
https://www.w3.org/TR/CSS22/box.html#collapsing-margins

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246460 r246461  
     12019-06-15  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][MarginCollapsing] Add check for computed height value in MarginCollapse::marginsCollapseThrough
     4        https://bugs.webkit.org/show_bug.cgi?id=198883
     5        <rdar://problem/51773395>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        "A box's own margins collapse if... ...and it has a 'height' of either 0 or 'auto"
     10        https://www.w3.org/TR/CSS22/box.html#collapsing-margins
     11
     12        * layout/blockformatting/BlockMarginCollapse.cpp:
     13        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
     14
    1152019-06-15  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp

    r241546 r246461  
    385385        return false;
    386386
     387    auto& style = layoutBox.style();
     388    auto computedHeightValueIsZero = style.height().isFixed() && !style.height().value();
     389    if (!(style.height().isAuto() || computedHeightValueIsZero))
     390        return false;
     391
    387392    // FIXME: Check for computed 0 height.
    388     if (!layoutBox.style().height().isAuto())
    389         return false;
    390 
    391     // FIXME: Check for computed 0 height.
    392     if (!layoutBox.style().minHeight().isAuto())
     393    if (!style.minHeight().isAuto())
    393394        return false;
    394395
Note: See TracChangeset for help on using the changeset viewer.