Skip to content

Commit

Permalink
Do not skip out-of-flow boxes merging anonymous flex items.
Browse files Browse the repository at this point in the history
A misread of the spec made us skip out-of-flow boxes merging anonymous
flex items. Only merge anonymous flex items which are truly box
siblings.

Adjusted the wpt tests accordingly. Fwiw, Firefox nightly now passes
all of wpt/css/css-flexbox/anonymous-*

Bug: 788379, 806151
Change-Id: I124740e5d2150becdcc03ded26773a69607e0bbb
  • Loading branch information
Rune Lillesveen authored and chromium-wpt-export-bot committed Jan 31, 2018
1 parent 05b1e6f commit 100d6dd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
8 changes: 4 additions & 4 deletions css/css-flexbox/anonymous-flex-item-004.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Flex item - contiguous text runs - position:absolute</title>
<title>CSS Flexbox Test: Flex item - non-contiguous text runs - position:absolute</title>
<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-items">
<link rel="match" href="anonymous-flex-item-ref.html">
<p>There should be a space between "two" and "words" below.</p>
<div style="display:flex">two <span style="position:absolute"></span>words</div>
<link rel="match" href="anonymous-flex-item-split-ref.html">
<p>The words "Two" and "lines" should not be on the same line.</p>
<div style="display:flex;flex-direction:column">Two <span style="position:absolute"></span>lines</div>
10 changes: 6 additions & 4 deletions css/css-flexbox/anonymous-flex-item-005.html
@@ -1,12 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Flex item - contiguous text runs - position:absolute dynamic</title>
<title>CSS Flexbox Test: Flex item - non-contiguous text runs - position:absolute dynamic</title>
<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-items">
<link rel="match" href="anonymous-flex-item-ref.html">
<p>There should be a space between "two" and "words" below.</p>
<div style="display:flex">two <span id="absSpan"></span>words</div>
<link rel="match" href="anonymous-flex-item-split-ref.html">
<p>The words "Two" and "lines" should not be on the same line.</p>
<div style="display:flex;flex-direction:column">Two <span id="absSpan"></span>lines</div>
<script>
absSpan.style.display = "none";
document.body.offsetTop;
absSpan.style.position = "absolute";
absSpan.style.display = "inline";
</script>
8 changes: 4 additions & 4 deletions css/css-flexbox/anonymous-flex-item-006.html
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Flex item - contiguous text runs - position:absolute and node removal</title>
<title>CSS Flexbox Test: Flex item - non-contiguous text runs - position:absolute and node removal</title>
<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-items">
<link rel="match" href="anonymous-flex-item-ref.html">
<link rel="match" href="anonymous-flex-item-split-ref.html">
<style>.abs { position:absolute }</style>
<p>There should be a space between "two" and "words" below.</p>
<div style="display:flex">two <span class="abs"></span><span id="spanRemove"></span><span class="abs"></span>words</div>
<p>The words "Two" and "lines" should not be on the same line.</p>
<div style="display:flex;flex-direction:column">Two <span class="abs"></span><span id="spanRemove"></span><span class="abs"></span>lines</div>
<script>
document.body.offsetTop;
spanRemove.remove();
Expand Down
7 changes: 7 additions & 0 deletions css/css-flexbox/anonymous-flex-item-split-ref.html
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
<p>The words "Two" and "lines" should not be on the same line.</p>
Two<br>
lines

0 comments on commit 100d6dd

Please sign in to comment.