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

Changeset 249083 in webkit


Ignore:
Timestamp:
Aug 24, 2019, 6:24:29 AM (7 years ago)
Author:
Alan Bujtas
Message:

[LFC][BFC] Non-inline formatting context(table, grid etc) root container should not collapse through.
https://bugs.webkit.org/show_bug.cgi?id=201099
<rdar://problem/54658946>

Reviewed by Antti Koivisto.

I didn't manage to find it in the spec, but surely formatting contexts like table, grid and flex should behave like
block so that their vertical margins are not adjoining, when they have at least one inflow child.

  • layout/blockformatting/BlockMarginCollapse.cpp:

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

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249082 r249083  
     12019-08-24  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][BFC] Non-inline formatting context(table, grid etc) root container should not collapse through.
     4        https://bugs.webkit.org/show_bug.cgi?id=201099
     5        <rdar://problem/54658946>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        I didn't manage to find it in the spec, but surely formatting contexts like table, grid and flex should behave like
     10        block so that their vertical margins are not adjoining, when they have at least one inflow child.
     11
     12        * layout/blockformatting/BlockMarginCollapse.cpp:
     13        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
     14
    1152019-08-24  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp

    r248200 r249083  
    409409        }
    410410
    411         if (establishesBlockFormattingContext(layoutBox))
    412             return false;
     411        // A root of a non-inline formatting context (table, flex etc) with inflow descendants should not collapse through.
     412        return false;
    413413    }
    414414
Note: See TracChangeset for help on using the changeset viewer.