Changeset 240035 in webkit


Ignore:
Timestamp:
Jan 16, 2019 6:52:55 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC] Adjust margin box verification.
https://bugs.webkit.org/show_bug.cgi?id=193482

Source/WebCore:

Reviewed by Antti Koivisto.

In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect,
so let's check the individual margin values instead (and at this point we know that all other boxes match).

Test: fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

Tools:

Reviewed by Antti Koivisto.

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

Reviewed by Antti Koivisto.

  • fast/block/block-only/non-auto-top-bottom-height-with-auto-margins-expected.txt: Added.
  • fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240027 r240035  
     12019-01-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC] Adjust margin box verification.
     4        https://bugs.webkit.org/show_bug.cgi?id=193482
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/block/block-only/non-auto-top-bottom-height-with-auto-margins-expected.txt: Added.
     9        * fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html: Added.
     10
    1112019-01-15  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r240034 r240035  
     12019-01-16  Alan Kinsley  <zalan@apple.com>
     2
     3        [LFC] Adjust margin box verification.
     4        https://bugs.webkit.org/show_bug.cgi?id=193482
     5
     6        Reviewed by Antti Koivisto.
     7
     8        In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect,
     9        so let's check the individual margin values instead (and at this point we know that all other boxes match).
     10
     11        Test: fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html
     12
     13        * layout/Verification.cpp:
     14        (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
     15
    1162019-01-16  Zan Dobersek  <zdobersek@igalia.com>
    217
  • trunk/Source/WebCore/layout/Verification.cpp

    r239609 r240035  
    266266    }
    267267
    268     if (renderer.marginBoxRect() != renderBoxLikeMarginBox(displayBox)) {
    269         outputRect("marginBox", renderer.marginBoxRect(), renderBoxLikeMarginBox(displayBox));
    270         return true;
    271     }
    272 
    273268    if (renderer.borderBoxRect() != displayBox.borderBox()) {
    274269        outputRect("borderBox", renderer.borderBoxRect(), displayBox.borderBox());
     
    284279        outputRect("contentBox", renderer.contentBoxRect(), displayBox.contentBox());
    285280        return true;
     281    }
     282
     283    if (renderer.marginBoxRect() != renderBoxLikeMarginBox(displayBox)) {
     284        // In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect,
     285        // so let's check the individual margin values instead (and at this point we know that all other boxes match).
     286        auto marginsMatch = displayBox.marginBefore() == renderer.marginBefore()
     287            && displayBox.marginAfter() == renderer.marginAfter()
     288            && displayBox.marginStart() == renderer.marginStart()
     289            && displayBox.marginEnd() == renderer.marginEnd();
     290
     291        if (!marginsMatch) {
     292            outputRect("marginBox", renderer.marginBoxRect(), renderBoxLikeMarginBox(displayBox));
     293            return true;
     294        }
    286295    }
    287296
  • trunk/Tools/ChangeLog

    r240025 r240035  
     12019-01-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC] Adjust margin box verification.
     4        https://bugs.webkit.org/show_bug.cgi?id=193482
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * LayoutReloaded/misc/LFC-passing-tests.txt:
     9
    1102019-01-15  Sihui Liu  <sihui_liu@apple.com>
    211
  • trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt

    r239991 r240035  
    8080fast/block/block-only/out-of-flow-with-containing-block-border-padding.html
    8181fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html
     82fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html
    8283fast/block/basic/002.html
    8384fast/block/basic/003.html
Note: See TracChangeset for help on using the changeset viewer.