Bug 1493932 [wpt PR 13198] - [css-contain] Fix size containment on fieldsets, a=testonly
authorManuel Rego Casasnovas <rego@igalia.com>
Wed, 03 Oct 2018 09:30:24 +0000
changeset 495413 6fc7a610766c5398182c7aaebb13e00d82cf0a57
parent 495412 badd9c5016ea2f343a332ab7a52fe8b317331ce9
child 495414 58ff6fcaae528bfd650028472f360f4c7a44a5a3
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1493932, 13198, 882388, 1242357, 594119
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1493932 [wpt PR 13198] - [css-contain] Fix size containment on fieldsets, a=testonly Automatic update from web-platform-tests[css-contain] Fix size containment on fieldsets Fieldsets with "contain: size" were not ignoring the legend when determining their size. Spec (https://drafts.csswg.org/css-contain/#containment-size): "When calculating the size of the containing element, it must be treated as having no contents." The patch is just an early return in LayoutFieldset::ComputePreferredLogicalWidths() like we have in other parts of the code. BUG=882388 TEST=external/wpt/css/css-contain/contain-size-fieldset-001.html Change-Id: I79425cf9c10ecf794f52cb4f635b95e1be059d81 Reviewed-on: https://chromium-review.googlesource.com/1242357 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#594119} -- wpt-commits: 8ccac53e6440a593035ed86a53aba7a278b147c5 wpt-pr: 13198
testing/web-platform/tests/css/css-contain/contain-size-fieldset-001.html
testing/web-platform/tests/css/css-contain/reference/contain-size-fieldset-001-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/contain-size-fieldset-001.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Size containment on fieldset</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
+<link rel="match" href="reference/contain-size-fieldset-001-ref.html">
+<meta name=assert content="Size containment does apply to fieldsets, thus their size is the same than if they don't have contents.">
+<style>
+fieldset {
+  contain: size;
+  display: inline-block;
+  color: transparent;
+  border: none;
+  padding: 0;
+}
+</style>
+
+<p>This test passes if it has the same output as the reference. You see the word "before", a small space, and then the word "after".</p>
+before<fieldset><legend>legend</legend></fieldset>after
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/reference/contain-size-fieldset-001-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<style>
+fieldset {
+  display: inline-block;
+  color: transparent;
+  border: none;
+  padding: 0;
+}
+</style>
+
+<p>This test passes if it has the same output as the reference. You see the word "before", a small space, and then the word "after".</p>
+before<fieldset></fieldset>after