Commit 44c31170 authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] Anonymous blocks percentage size fix

Anonymous blocks were passing indefinite block percentage resolution size to
their children. The fix is to handle anonymous blocks like we do anonymous
fragments, and use ParentPercentageResolutionSize().

Bug: 635619
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I147e92570a60b84aa0b840201542d98c0517e82e
Reviewed-on: https://chromium-review.googlesource.com/1034094Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554745}
parent 70b78f3a
...@@ -109,7 +109,6 @@ crbug.com/591099 compositing/geometry/bounds-ignores-hidden.html [ Failure ] ...@@ -109,7 +109,6 @@ crbug.com/591099 compositing/geometry/bounds-ignores-hidden.html [ Failure ]
crbug.com/591099 compositing/geometry/clipping-foreground.html [ Failure ] crbug.com/591099 compositing/geometry/clipping-foreground.html [ Failure ]
crbug.com/591099 compositing/geometry/foreground-layer.html [ Failure ] crbug.com/591099 compositing/geometry/foreground-layer.html [ Failure ]
crbug.com/591099 compositing/geometry/repaint-foreground-layer.html [ Failure ] crbug.com/591099 compositing/geometry/repaint-foreground-layer.html [ Failure ]
crbug.com/591099 compositing/geometry/video-opacity-overlay.html [ Failure ]
crbug.com/591099 compositing/iframes/floating-self-painting-frame.html [ Failure ] crbug.com/591099 compositing/iframes/floating-self-painting-frame.html [ Failure ]
crbug.com/591099 compositing/layer-creation/rotate3d-overlap.html [ Failure ] crbug.com/591099 compositing/layer-creation/rotate3d-overlap.html [ Failure ]
crbug.com/591099 compositing/overflow/border-radius-above-composited-subframe.html [ Failure ] crbug.com/591099 compositing/overflow/border-radius-above-composited-subframe.html [ Failure ]
...@@ -257,7 +256,6 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001e.x ...@@ -257,7 +256,6 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001e.x
crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001h.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001h.xht [ Pass ]
crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002e.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002e.xht [ Pass ]
crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-nested-002.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-nested-002.xht [ Pass ]
crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-percents-001.xht [ Failure ]
crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-006.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-006.xht [ Pass ]
crbug.com/591099 external/wpt/css/CSS2/normal-flow/root-box-001.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/root-box-001.xht [ Failure ]
crbug.com/591099 external/wpt/css/CSS2/text/white-space-mixed-003.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/text/white-space-mixed-003.xht [ Pass ]
...@@ -634,7 +632,6 @@ crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftest ...@@ -634,7 +632,6 @@ crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftest
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-012.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-012.html [ Failure ]
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-014.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-014.html [ Failure ]
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-015.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-015.html [ Failure ]
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/ib-split/percent-height-1.html [ Failure ]
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/ib-split/remove-from-split-inline-6.html [ Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/ib-split/remove-from-split-inline-6.html [ Pass ]
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/ib-split/split-inner-inline-2.html [ Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/ib-split/split-inner-inline-2.html [ Pass ]
crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-break-inside-001.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-break-inside-001.html [ Failure ]
...@@ -1221,9 +1218,7 @@ crbug.com/591099 fast/reflections/inline-crash.html [ Failure Pass ] ...@@ -1221,9 +1218,7 @@ crbug.com/591099 fast/reflections/inline-crash.html [ Failure Pass ]
crbug.com/591099 fast/replaced/absolute-position-percentage-height.html [ Failure ] crbug.com/591099 fast/replaced/absolute-position-percentage-height.html [ Failure ]
crbug.com/591099 fast/replaced/border-radius-clip.html [ Failure ] crbug.com/591099 fast/replaced/border-radius-clip.html [ Failure ]
crbug.com/591099 fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr.html [ Failure ] crbug.com/591099 fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr.html [ Failure ]
crbug.com/591099 fast/replaced/percent-height-in-anonymous-block.html [ Failure ]
crbug.com/591099 fast/replaced/preferred-widths.html [ Failure ] crbug.com/591099 fast/replaced/preferred-widths.html [ Failure ]
crbug.com/591099 fast/replaced/replaced-element-with-percentage-height-anonymous-block-parent.html [ Failure ]
crbug.com/591099 fast/replaced/table-percent-height.html [ Failure ] crbug.com/591099 fast/replaced/table-percent-height.html [ Failure ]
crbug.com/591099 fast/replaced/table-percent-width.html [ Failure ] crbug.com/591099 fast/replaced/table-percent-width.html [ Failure ]
crbug.com/591099 fast/replaced/table-replaced-element.html [ Failure ] crbug.com/591099 fast/replaced/table-replaced-element.html [ Failure ]
...@@ -1933,17 +1928,11 @@ crbug.com/591099 svg/as-border-image/svg-as-border-image.html [ Failure ] ...@@ -1933,17 +1928,11 @@ crbug.com/591099 svg/as-border-image/svg-as-border-image.html [ Failure ]
crbug.com/591099 svg/custom/getscreenctm-in-scrollable-div-area-nested.xhtml [ Failure ] crbug.com/591099 svg/custom/getscreenctm-in-scrollable-div-area-nested.xhtml [ Failure ]
crbug.com/591099 svg/custom/getscreenctm-in-scrollable-div-area.xhtml [ Failure ] crbug.com/591099 svg/custom/getscreenctm-in-scrollable-div-area.xhtml [ Failure ]
crbug.com/591099 svg/custom/inline-svg-use-available-width-in-stf.html [ Failure ] crbug.com/591099 svg/custom/inline-svg-use-available-width-in-stf.html [ Failure ]
crbug.com/591099 svg/custom/junk-data.svg [ Failure ]
crbug.com/591099 svg/custom/load-non-wellformed.svg [ Failure ]
crbug.com/591099 svg/custom/missing-xlink.svg [ Failure ]
crbug.com/591099 svg/custom/object-sizing-no-width-height.xhtml [ Failure ] crbug.com/591099 svg/custom/object-sizing-no-width-height.xhtml [ Failure ]
crbug.com/591099 svg/custom/path-bad-data.svg [ Failure ]
crbug.com/591099 svg/custom/text-match-highlight.html [ Failure ] crbug.com/591099 svg/custom/text-match-highlight.html [ Failure ]
crbug.com/591099 svg/custom/use-event-retargeting.html [ Failure ] crbug.com/591099 svg/custom/use-event-retargeting.html [ Failure ]
crbug.com/591099 svg/custom/use-font-face-crash.svg [ Failure ]
crbug.com/591099 svg/dom/svgangle-units.html [ Pass Timeout ] crbug.com/591099 svg/dom/svgangle-units.html [ Pass Timeout ]
crbug.com/591099 svg/filters/feTurbulence-bad-seeds.html [ Failure ] crbug.com/591099 svg/filters/feTurbulence-bad-seeds.html [ Failure ]
crbug.com/591099 svg/hixie/error/012.xml [ Failure ]
crbug.com/591099 svg/hixie/error/dumpAsText/004.xml [ Failure ] crbug.com/591099 svg/hixie/error/dumpAsText/004.xml [ Failure ]
crbug.com/591099 svg/hixie/error/dumpAsText/005.xml [ Failure ] crbug.com/591099 svg/hixie/error/dumpAsText/005.xml [ Failure ]
crbug.com/591099 svg/in-html/sizing/svg-inline.html [ Timeout ] crbug.com/591099 svg/in-html/sizing/svg-inline.html [ Timeout ]
......
...@@ -275,9 +275,6 @@ crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats/floats-wrap-bfc- ...@@ -275,9 +275,6 @@ crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats/floats-wrap-bfc-
### virtual/layout_ng/external/wpt/css/CSS2/normal-flow ### virtual/layout_ng/external/wpt/css/CSS2/normal-flow
crbug.com/704961 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/normal-flow/width-inherit-001.xht [ Failure ] crbug.com/704961 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/normal-flow/width-inherit-001.xht [ Failure ]
# Block: percent height in continuations.
crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/normal-flow/block-in-inline-percents-001.xht [ Failure ]
# Inline: border in continuations. Fail in Blink. # Inline: border in continuations. Fail in Blink.
crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/normal-flow/block-in-inline-empty-001.xht [ Failure ] crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/normal-flow/block-in-inline-empty-001.xht [ Failure ]
crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/normal-flow/block-in-inline-empty-004.xht [ Failure ] crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/normal-flow/block-in-inline-empty-004.xht [ Failure ]
......
...@@ -293,7 +293,7 @@ scoped_refptr<NGLayoutResult> NGBlockLayoutAlgorithm::Layout() { ...@@ -293,7 +293,7 @@ scoped_refptr<NGLayoutResult> NGBlockLayoutAlgorithm::Layout() {
// Anonymous constraint spaces are auto-sized. Don't let that affect // Anonymous constraint spaces are auto-sized. Don't let that affect
// block-axis percentage resolution. // block-axis percentage resolution.
if (ConstraintSpace().IsAnonymous()) if (ConstraintSpace().IsAnonymous() || Node().IsAnonymous())
child_percentage_size_ = ConstraintSpace().PercentageResolutionSize(); child_percentage_size_ = ConstraintSpace().PercentageResolutionSize();
else else
child_percentage_size_ = adjusted_size; child_percentage_size_ = adjusted_size;
...@@ -1645,7 +1645,6 @@ NGBlockLayoutAlgorithm::CreateConstraintSpaceForChild( ...@@ -1645,7 +1645,6 @@ NGBlockLayoutAlgorithm::CreateConstraintSpaceForChild(
space_builder.SetFragmentainerSpaceAtBfcStart(space_available); space_builder.SetFragmentainerSpaceAtBfcStart(space_available);
space_builder.SetFragmentationType( space_builder.SetFragmentationType(
ConstraintSpace().BlockFragmentationType()); ConstraintSpace().BlockFragmentationType());
return space_builder.ToConstraintSpace(writing_mode); return space_builder.ToConstraintSpace(writing_mode);
} }
......
...@@ -95,6 +95,10 @@ bool NGLayoutInputNode::IsListMarker() const { ...@@ -95,6 +95,10 @@ bool NGLayoutInputNode::IsListMarker() const {
return IsBlock() && box_->IsLayoutNGListMarker(); return IsBlock() && box_->IsLayoutNGListMarker();
} }
bool NGLayoutInputNode::IsAnonymous() const {
return box_->IsAnonymous();
}
bool NGLayoutInputNode::IsQuirkyContainer() const { bool NGLayoutInputNode::IsQuirkyContainer() const {
return box_->GetDocument().InQuirksMode() && return box_->GetDocument().InQuirksMode() &&
(box_->IsBody() || box_->IsTableCell()); (box_->IsBody() || box_->IsTableCell());
......
...@@ -59,6 +59,7 @@ class CORE_EXPORT NGLayoutInputNode { ...@@ -59,6 +59,7 @@ class CORE_EXPORT NGLayoutInputNode {
bool ShouldBeConsideredAsReplaced() const; bool ShouldBeConsideredAsReplaced() const;
bool IsListItem() const; bool IsListItem() const;
bool IsListMarker() const; bool IsListMarker() const;
bool IsAnonymous() const;
// If the node is a quirky container for margin collapsing, see: // If the node is a quirky container for margin collapsing, see:
// https://html.spec.whatwg.org/#margin-collapsing-quirks // https://html.spec.whatwg.org/#margin-collapsing-quirks
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment