Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-contain.html

Issue 2328633003: A container of out-of-flow positioned descendants should be an offsetParent. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-transform.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-contain.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-contain.html b/third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-contain.html
new file mode 100644
index 0000000000000000000000000000000000000000..0e5897f49cca826e08c188a8a3ea9d5344db69ed
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-contain.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- contain:paint establishes a containing block for out-of-flow positioned descendants. -->
+<div id="containPaint" style="contain:paint;">
+ <div id="test1"></div>
+</div>
+<!-- contain:layout does NOT establish a containing block for out-of-flow positioned descendants. -->
+<div id="containLayout" style="contain:layout;">
+ <div id="test2"></div>
+</div>
+<!-- contain:style does NOT establish a containing block for out-of-flow positioned descendants. -->
+<div id="containStyle" style="contain:style;">
+ <div id="test3"></div>
+</div>
+<!-- contain:size does NOT establish a containing block for out-of-flow positioned descendants. -->
+<div id="containStyle" style="contain:size;">
+ <div id="test4"></div>
+</div>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script>
+ test(function() {
+ assert_equals(document.getElementById("test1").offsetParent, document.getElementById("containPaint"));
+ }, "inside contain:paint");
+ test(function() {
+ assert_equals(document.getElementById("test2").offsetParent, document.body);
+ }, "inside contain:layout");
+ test(function() {
+ assert_equals(document.getElementById("test3").offsetParent, document.body);
+ }, "inside contain:style");
+ test(function() {
+ assert_equals(document.getElementById("test4").offsetParent, document.body);
+ }, "inside contain:size");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-transform.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698