New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 712665 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 636993



Sign in to add a comment

Align NGBlockNode/NGInlineNode with LayoutObject::ChildrenInline

Project Member Reported by kojii@chromium.org, Apr 18 2017

Issue description

From https://codereview.chromium.org/2815003006/#msg22

NGBlockNode::FirstChild should create NGBlockNode or NGInlineNode in the same way as LayoutObject::ChildrenInline() does.

Doing so today fails 6 tests:
    NGBlockLayoutAlgorithmTest.CollapsingMarginsCase7
    NGBlockLayoutAlgorithmTest.PositionFloatInsideEmptyBlocks
    NGBlockNodeForTest.ChildFloatOnly
    NGBlockNodeForTest.ChildFloatWithSpaces
    NGOutOfFlowLayoutPartTest.OrthogonalWritingMode1
    NGOutOfFlowLayoutPartTest.OrthogonalWritingMode2

Need to investigate and make a switch.
 

Comment 1 by kojii@chromium.org, Apr 19 2017

Ouch, failures increased to 37, I need debugger to look into these.

NGBlockLayoutAlgorithmTest.InnerChildrenFragmentationSmallHeight
NGBlockLayoutAlgorithmTest.PositionBlocksWithClearanceAndIntrudingFloats
NGBlockLayoutAlgorithmTest.CollapsingMarginsCase2WithFloats
NGBlockLayoutAlgorithmTest.AutoMargin
NGInlineLayoutTest.BlockWithTextAndAtomicInline
NGBlockNodeForTest.ChildInlineAndBlock
NGBlockLayoutAlgorithmTest.InnerChildrenFragmentation
NGBlockLayoutAlgorithmTest.LayoutBlockChildrenWithWritingMode
NGOutOfFlowLayoutPartTest.FixedInsideAbs
NGInlineLayoutAlgorithmTest.TextFloatsAroundInlineFloatThatFitsOnLine
NGBlockNodeForTest.ChildFloatBeforeBlock
NGBlockNodeForTest.ChildBlockAndInline
NGBlockNodeForTest.ChildFloatAfterInline
NGBlockNodeForTest.ChildOofAfterInline
NGOutOfFlowLayoutPartTest.OrthogonalWritingMode2
NGOutOfFlowLayoutPartTest.OrthogonalWritingMode1
NGBlockLayoutAlgorithmTest.PositionFragmentsWithClear
NGBlockLayoutAlgorithmTest.LayoutBlockChildren
NGBlockLayoutAlgorithmTest.CollapsingMarginsCase1WithFloats
NGBlockChildIteratorTest.BreakTokenWithFinishedChild
NGBlockLayoutAlgorithmTest.PercentageResolutionSize
NGBlockLayoutAlgorithmTest.PositionFloatInsideEmptyBlocks
NGBlockLayoutAlgorithmTest.CollapsingMarginsCase7
NGBlockLayoutAlgorithmTest.CollapsingMarginsCase5
NGBlockLayoutAlgorithmTest.CollapsingMarginsCase4
NGBlockLayoutAlgorithmTest.CollapsingMarginsCase3
NGBlockChildIteratorTest.BreakTokenWithUnFinishedChild
NGInlineLayoutTest.BlockWithSingleTextNode
NGBlockLayoutAlgorithmTest.CollapsingMarginsWithText
NGInlineLayoutAlgorithmTest.BreakToken
NGBlockLayoutAlgorithmTest.InnerFormattingContextChildrenFragmentation
NGInlineLayoutAlgorithmTest.TextFloatsAroundFloatsBefore
NGBlockLayoutAlgorithmTest.BorderAndPadding
NGBlockLayoutAlgorithmTest.PositionEmptyBlocksInNewBfc
NGBlockLayoutAlgorithmTest.PositionFloatFragments
NGBlockNodeForTest.ChildFloatOnly
NGBlockNodeForTest.ChildFloatWithSpaces

Comment 2 by kojii@chromium.org, Apr 24 2017

Take #1 back, it was a trivial mistake, so 6 tests fail.

* 2 are easy to fix for me.
* 2 are abspos within inline, which we do not support yet.
* 2 are floats.
Project Member

Comment 3 by bugdroid1@chromium.org, May 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/415a2e47b6e9f046a503388298ad2e94b24e3c7b

commit 415a2e47b6e9f046a503388298ad2e94b24e3c7b
Author: glebl <glebl@chromium.org>
Date: Tue May 09 04:02:00 2017

Make leading OOF objects to be handled by block layout in LayoutNG

This patch changes LayoutNG's LayoutObject tree for DOM examples with
OOF object

We want to use the block layout for out of flow positioned
objects when they go in front of inline blocks or if they are just
standalone objects.
Example 1:
<div id="zero"><div id="oof"></div></div>
  Legacy Layout: #oof is in inline context.
  LayoutNG: #oof is in block context.

Example 2:
<div id=container><oof></oof>Hello!</div>
  Legacy Layout: oof is in inline context.
  LayoutNG: oof is in block context.

Example 3:
  <div id=container>Hello!<oof></oof></div>
  Legacy Layout: oof is in inline context.
  LayoutNG: oof is in inline context.

This also deprecates ShouldHandleByInlineContext in favor of
LayoutObject::ChildrenInline()

2 new failing tests:
floats-clear/floats-114.xht
floats-clear/floats-040.xht
Those are reftest, this patch fixes border/padding issue for OOF so they
started failing because we need to fix reftest as well.

BUG= 712665 ,635619

Review-Url: https://codereview.chromium.org/2847823002
Cr-Commit-Position: refs/heads/master@{#470179}

[modify] https://crrev.com/415a2e47b6e9f046a503388298ad2e94b24e3c7b/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/415a2e47b6e9f046a503388298ad2e94b24e3c7b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
[modify] https://crrev.com/415a2e47b6e9f046a503388298ad2e94b24e3c7b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/415a2e47b6e9f046a503388298ad2e94b24e3c7b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
[modify] https://crrev.com/415a2e47b6e9f046a503388298ad2e94b24e3c7b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/415a2e47b6e9f046a503388298ad2e94b24e3c7b/third_party/WebKit/Source/core/layout/ng/ng_block_node_test.cc

Comment 4 by kojii@chromium.org, May 23 2017

Cc: -glebl@chromium.org kojii@chromium.org
Owner: glebl@chromium.org
Status: Fixed (was: Assigned)
Thank you glebl@ for taking this.

Sign in to add a comment