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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 3
4 <style> 4 <style>
5 div { width: 100px } 5 div { width: 100px }
6 [outer="1"] [inner="1"] { width: 200px } 6 [outer="1"] [inner="1"] { width: 200px }
7 [outer="2"] { width: 150px } 7 [outer="2"] { width: 150px }
8 [outer="3"][nomatch="1"] { width: 300px; } 8 [outer="3"][nomatch="1"] { width: 300px; }
9 </style> 9 </style>
10 10
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 var outer = document.getElementById('outer'); 39 var outer = document.getElementById('outer');
40 var inner = document.getElementById('inner'); 40 var inner = document.getElementById('inner');
41 var outer2 = document.getElementById('outer2'); 41 var outer2 = document.getElementById('outer2');
42 var outer3 = document.getElementById('outer3'); 42 var outer3 = document.getElementById('outer3');
43 43
44 // Style recalc should happen on "inner" and "outer", but not "inner2" or "mid". 44 // Style recalc should happen on "inner" and "outer", but not "inner2" or "mid".
45 outer.offsetTop; 45 outer.offsetTop;
46 outer.setAttribute('outer', '1'); 46 outer.setAttribute('outer', '1');
47 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 47 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2");
48 shouldBe("getComputedStyle(inner).width", '"200px"'); 48 shouldBe("getComputedStyle(inner).width", '"200px"');
49 49
50 // Style recalc should happen on "inner", but not "innerChild". 50 // Style recalc should happen on "inner", but not "innerChild".
51 inner.offsetTop; 51 inner.offsetTop;
52 inner.removeAttribute('inner'); 52 inner.removeAttribute('inner');
53 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 53 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1");
54 shouldBe("getComputedStyle(inner).width", '"100px"'); 54 shouldBe("getComputedStyle(inner).width", '"100px"');
55 55
56 // Style recalc should happen on "outer2", but not "inner3". 56 // Style recalc should happen on "outer2", but not "inner3".
57 outer2.offsetTop; 57 outer2.offsetTop;
58 outer2.setAttribute('outer', '2'); 58 outer2.setAttribute('outer', '2');
59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 59 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1");
60 shouldBe("getComputedStyle(outer2).width", '"150px"'); 60 shouldBe("getComputedStyle(outer2).width", '"150px"');
61 61
62 // Style recalc should happen on "outer3", but none of its children. 62 // Style recalc should happen on "outer3", but none of its children.
63 outer3.offsetTop; 63 outer3.offsetTop;
64 outer3.setAttribute('outer', '3'); 64 outer3.setAttribute('outer', '3');
65 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 65 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1");
66 </script> 66 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698