Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <section id="container" style="will-change: transform"> | |
|
suzyh_UTC10 (ex-contributor)
2016/09/27 03:49:10
What is the purpose of "will-change: transform" he
Eric Willigers
2016/09/27 04:34:28
It is for the last three tests. offset-distance, o
| |
| 5 <div id="d1" style="offset-position: 0% 0%"> | |
| 6 <span id="s1"></span> | |
| 7 </div> | |
| 8 <div id="d2" style="offset-path: path('m 0 0 z')"> | |
| 9 <span id="s2"></span> | |
| 10 </div> | |
| 11 <div id="d3" style="offset-distance: 100%"> | |
| 12 <span id="s3"></span> | |
| 13 </div> | |
| 14 <div id="d4" style="offset-rotation: 360deg"> | |
| 15 <span id="s4"></span> | |
| 16 </div> | |
| 17 <div id="d5" style="offset-anchor: bottom right"> | |
| 18 <span id="s5"></span> | |
| 19 </div> | |
| 20 </section> | |
| 21 <script> | |
| 22 'use strict'; | |
| 23 test(function() { | |
| 24 assert_equals(document.getElementById("s1").offsetParent, document.getElemen tById("d1")); | |
|
suzyh_UTC10 (ex-contributor)
2016/09/27 03:49:10
Aside: Wow, offsetParent is a confusing name in th
Eric Willigers
2016/09/27 04:34:28
Agreed. Confusing name.
https://drafts.csswg.org/c
| |
| 25 }, "inside offset-position"); | |
| 26 test(function() { | |
| 27 assert_equals(document.getElementById("s2").offsetParent, document.getElemen tById("d2")); | |
|
sashab
2016/09/29 04:47:37
Just use s2, d2 etc instead of getElementById.
Eric Willigers
2016/09/29 05:07:30
Done.
| |
| 28 }, "inside offset-path"); | |
| 29 test(function() { | |
| 30 assert_equals(document.getElementById("s3").offsetParent, document.getElemen tById("container")); | |
| 31 }, "inside offset-distance"); | |
| 32 test(function() { | |
| 33 assert_equals(document.getElementById("s4").offsetParent, document.getElemen tById("container")); | |
| 34 }, "inside offset-rotation"); | |
| 35 test(function() { | |
| 36 assert_equals(document.getElementById("s5").offsetParent, document.getElemen tById("container")); | |
| 37 }, "inside offset-anchor"); | |
| 38 </script> | |
| OLD | NEW |