Changeset 282085 in webkit


Ignore:
Timestamp:
Sep 7, 2021 8:00:21 AM (11 months ago)
Author:
svillar@igalia.com
Message:

Interoperability issue in margin collapsing with overflow:hidden elements
https://bugs.webkit.org/show_bug.cgi?id=224185

Reviewed by Alan Bujtas.

Source/WebCore:

Margins should not self collapse for those elements that create new formatting contexts
like when using overflow:hidden.

Test: fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::isSelfCollapsingBlock const): Boxes that create new formatting context should
not self collapse.

LayoutTests:

  • TestExpectations: Unskipped 3 flexbox tests that are working fine now.
  • fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-expected.html: Added.
  • fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r282078 r282085  
     12021-08-26  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Interoperability issue in margin collapsing with overflow:hidden elements
     4        https://bugs.webkit.org/show_bug.cgi?id=224185
     5
     6        Reviewed by Alan Bujtas.
     7
     8        * TestExpectations: Unskipped 3 flexbox tests that are working fine now.
     9        * fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-expected.html: Added.
     10        * fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden.html: Added.
     11
    1122021-09-01  Sergio Villar Senin  <svillar@igalia.com>
    213
  • trunk/LayoutTests/TestExpectations

    r282078 r282085  
    41614161webkit.org/b/221474 imported/w3c/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-003.html [ ImageOnlyFailure ]
    41624162
    4163 # Writing modes in flexbox.
    4164 webkit.org/b/221475 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-writing-mode-013.html [ ImageOnlyFailure ]
    4165 webkit.org/b/221475 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-writing-mode-014.html [ ImageOnlyFailure ]
    4166 webkit.org/b/221475 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-writing-mode-015.html [ ImageOnlyFailure ]
    4167 
    41684163webkit.org/b/221468 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-align-self-horiz-002.xhtml [ ImageOnlyFailure ]
    41694164webkit.org/b/221468 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-align-self-vert-002.xhtml [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r282084 r282085  
     12021-08-26  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Interoperability issue in margin collapsing with overflow:hidden elements
     4        https://bugs.webkit.org/show_bug.cgi?id=224185
     5
     6        Reviewed by Alan Bujtas.
     7
     8        Margins should not self collapse for those elements that create new formatting contexts
     9        like when using overflow:hidden.
     10
     11        Test: fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden.html
     12
     13        * rendering/RenderBlock.cpp:
     14        (WebCore::RenderBlock::isSelfCollapsingBlock const): Boxes that create new formatting context should
     15        not self collapse.
     16
    1172021-09-07  Brent Fulgham  <bfulgham@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r282047 r282085  
    510510    // on whether we have content that is all self-collapsing or not.
    511511    if (hasAutoHeight || ((logicalHeightLength.isFixed() || logicalHeightLength.isPercentOrCalculated()) && logicalHeightLength.isZero()))
    512         return !childrenPreventSelfCollapsing();
     512        return !createsNewFormattingContext() && !childrenPreventSelfCollapsing();
     513
    513514
    514515    return false;
Note: See TracChangeset for help on using the changeset viewer.