Bug 1494495 [wpt PR 13231] - Ensure that we establish an overflow clip on paint containment., a=testonly
authorVladimir Levin <vmpstr@chromium.org>
Fri, 05 Oct 2018 14:21:22 +0000
changeset 495805 f797a850769e20bd2120fd6690dd57ecfaca0fc2
parent 495804 b9b5f7cd0c5e1df2b7d04cba7495cb76a1c4ab91
child 495806 9de10ce5fa72aee30f70bc222b4515ecfe8908d0
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
bugs1494495, 13231, 882322, 1246922, 595201
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 1494495 [wpt PR 13231] - Ensure that we establish an overflow clip on paint containment., a=testonly Automatic update from web-platform-testsEnsure that we establish an overflow clip on paint containment. This patch ensures that we don't leak geometry outside of paint contained element, which may incorrectly affect layout oveflow of other elements. Added a WPT with a tall clipped div which causes scrollbars without this patch, and passes with the patch. R=chrishtr@chromium.org Bug: 882322 Cq-Include-Trybots: luci.chromium.try‚Äč:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I929542d4ad643df8dad1ab388a878bd0892c0c69 Reviewed-on: https://chromium-review.googlesource.com/1246922 Commit-Queue: vmpstr <vmpstr@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#595201} -- wpt-commits: b949365f277286071a0368f69091f6303164f99f wpt-pr: 13231
testing/web-platform/tests/css/css-contain/contain-paint-clip-019.html
testing/web-platform/tests/css/css-contain/reference/contain-paint-clip-019-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/contain-paint-clip-019.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+
+<meta charset="UTF-8">
+
+<title>CSS Containment Test: 'contain: paint' and clipping prevents scrollbars</title>
+
+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-contain-1/#containment-paint">
+<link rel="match" href="reference/contain-paint-clip-019-ref.html">
+
+<meta content="This test checks that the paint containment of an element clips contents.
+  It should also prevent layout overflow from being propagated to ancestors." name="assert">
+<meta content="" name="flags">
+
+<style>
+  #container {
+    contain: paint;
+    width: 100px;
+    height: 100px;
+  }
+  #green {
+    background-color: green;
+    width: 100px;
+    height: 100px;
+  }
+  #red {
+    background-color: red;
+    width: 100px;
+    height: 10000px;
+  }
+</style>
+
+<p>Test passes if there there is a green square. No red and no scrollbars should be visible.</p>
+
+<div id="container">
+  <div id="green"></div>
+  <div id="red"></div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/reference/contain-paint-clip-019-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+
+<meta charset="UTF-8">
+
+<title>CSS Reference Test</title>
+
+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
+
+<style>
+  #green {
+    background-color: green;
+    width: 100px;
+    height: 100px;
+  }
+</style>
+
+<p>Test passes if there there is a green square. No red and no scrollbars should be visible.</p>
+
+<div id="green"></div>