From f73795cc3b93564eacb218af8cb56ee44faccf2f Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 3 Mar 2016 17:15:22 -0800 Subject: [PATCH] Bug 1253354: Update flexbox reftests that deal with table parts in a flex container; now these elements will be blockified & will become flex items. r=mats Specific changes: - flexbox-table-fixup-001a.xhtml previously tested that table parts would get wrapped in an anonymous table, which would form a single flex item. This patch changes it to instead test that each table-part forms its own flex item. - flexbox-table-fixup-001b.xhtml previously was a "belt and suspenders" afterthought to its "001a" counterpart. It verified that flex-item properties (like "flex") had no effect on table parts in a flex container. This patch removes this test (since it's no longer valid) and renames the "001a" test to simply "001" as a result. - flexbox-with-pseudo-elements-003.html previously tested that ::before/::after pseudo-elements with table-part display values would have their flex-item-related properties ignored (because they'd be wrapped in an anonymous table). This patch flips that expectation, because now these pseudo-elements will directly become flex items and these properties should be honored. --HG-- rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001a.xhtml => layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001.xhtml --- .../flexbox/flexbox-table-fixup-001-ref.xhtml | 36 ++++----- ...1a.xhtml => flexbox-table-fixup-001.xhtml} | 33 ++++----- .../flexbox/flexbox-table-fixup-001b.xhtml | 74 ------------------- .../flexbox-with-pseudo-elements-003-ref.html | 4 + .../flexbox-with-pseudo-elements-003.html | 19 +++-- .../w3c-css/submitted/flexbox/reftest.list | 7 +- 6 files changed, 47 insertions(+), 126 deletions(-) rename layout/reftests/w3c-css/submitted/flexbox/{flexbox-table-fixup-001a.xhtml => flexbox-table-fixup-001.xhtml} (54%) delete mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001b.xhtml diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001-ref.xhtml b/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001-ref.xhtml index 1530f08187b6..4611521543a7 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001-ref.xhtml +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001-ref.xhtml @@ -3,8 +3,8 @@ Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ --> - + CSS Reftest Reference @@ -12,14 +12,9 @@ - -
cell1cell2 +
cell1
cell2
- -
cell1t
cell1
t
- -
div
cell1
cell1
diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001a.xhtml b/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001.xhtml similarity index 54% rename from layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001a.xhtml rename to layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001.xhtml index 911023de3383..00e1a54ffa19 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001a.xhtml +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001.xhtml @@ -4,14 +4,15 @@ http://creativecommons.org/publicdomain/zero/1.0/ --> - CSS Test: Testing that table cells in a flex container get an anonymous table wrapper that forms the flex item + CSS Test: Testing that table cells in a flex container get blockified and each form their own flex item @@ -23,12 +24,10 @@ justify-content: space-around; } - td { - padding-top: 0px; - padding-bottom: 0px; + /* Remove any default padding for td elements, so we can compare them + easily against blocks in the reference case. */ + padding: 0px; } .a { @@ -48,19 +47,19 @@ - + +
cell1cell2
- +
cell1t
- - -
div
cell1
+ +
cell1
diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001b.xhtml b/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001b.xhtml deleted file mode 100644 index 82d4d444f856..000000000000 --- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-001b.xhtml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - CSS Test: Testing that the 'flex' shorthand has no effect on table cells in a flex container, since they aren't flex items - - - - - - - -
cell1cell2
- - -
cell1t
- - - -
div
cell1
- - diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003-ref.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003-ref.html index 3ff42a7fb75e..bdb973023aed 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003-ref.html +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003-ref.html @@ -26,10 +26,14 @@ .fakeBefore { content: 'b'; background: yellow; + align-self: center; + order: 1; } .fakeAfter { content: 'a'; background: lightblue; + align-self: center; + order: -1; } diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003.html index e3f2f22e05ae..fe531b126f31 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003.html +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-003.html @@ -7,10 +7,9 @@ flex container, specifically when they've got display:table-row or table-cell. - Note that we *don't* treat the table row or cell frames themselves as flex - items, because they get wrapped in an anonymous table box, and *that* is - the flex item. So, "align-self" and "order" have no effect on the - row/cell. --> + The table-row / table-cell 'display' values should be blockified, and the + pseudo-elements should be treated as flex items. (They should not get + wrapped in an anonymous table box.) --> CSS Test: Testing that generated content nodes with table-part display types are wrapped with an anonymous table, which forms a flex item @@ -32,15 +31,19 @@ display: table-row; content: 'b'; background: yellow; - align-self: center; /* should have no effect */ - order: 1; /* should have no effect */ + /* If these "align-self" & "order" properties impact the rendering (as + they should), that verifies we're being treated as a flex item. */ + align-self: center; + order: 1; } div.withAfter::after { display: table-cell; content: 'a'; background: lightblue; - align-self: center; /* should have no effect */ - order: -1; /* should have no effect */ + /* If these "align-self" & "order" properties impact the rendering (as + they should), that verifies we're being treated as a flex item. */ + align-self: center; + order: -1; } diff --git a/layout/reftests/w3c-css/submitted/flexbox/reftest.list b/layout/reftests/w3c-css/submitted/flexbox/reftest.list index f0e88bbf332e..565c62f88123 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list +++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list @@ -169,9 +169,8 @@ fails == flexbox-min-width-auto-002b.html flexbox-min-width-auto-002-ref.html # == flexbox-sizing-vert-001.xhtml flexbox-sizing-vert-001-ref.xhtml == flexbox-sizing-vert-002.xhtml flexbox-sizing-vert-002-ref.xhtml -# Tests for table-fixup on flex items -!= flexbox-table-fixup-001a.xhtml flexbox-table-fixup-001-ref.xhtml -!= flexbox-table-fixup-001b.xhtml flexbox-table-fixup-001-ref.xhtml +# Tests for table-fixup *not happening* on direct children of a flex container +== flexbox-table-fixup-001.xhtml flexbox-table-fixup-001-ref.xhtml # Tests for handling of whitespace within anonymous flex items. == flexbox-whitespace-handling-001a.xhtml flexbox-whitespace-handling-001-ref.xhtml @@ -181,7 +180,7 @@ fails == flexbox-min-width-auto-002b.html flexbox-min-width-auto-002-ref.html # # Tests for flex containers with pseudo-elements == flexbox-with-pseudo-elements-001.html flexbox-with-pseudo-elements-001-ref.html == flexbox-with-pseudo-elements-002.html flexbox-with-pseudo-elements-002-ref.html -!= flexbox-with-pseudo-elements-003.html flexbox-with-pseudo-elements-003-ref.html +== flexbox-with-pseudo-elements-003.html flexbox-with-pseudo-elements-003-ref.html # Tests for combined influence of 'writing-mode' & 'direction' on flex axes test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-001.html flexbox-writing-mode-001-ref.html