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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/content-attr.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 <style> 3 <style>
4 #before::before, #after::after { content: attr(my-value); } 4 #before::before, #after::after { content: attr(my-value); }
5 </style> 5 </style>
6 <div id="before"> 6 <div id="before">
7 <div></div> 7 <div></div>
8 <div> 8 <div>
9 <div></div> 9 <div></div>
10 </div> 10 </div>
11 </div> 11 </div>
12 <div id="after"> 12 <div id="after">
13 <div></div> 13 <div></div>
14 <div> 14 <div>
15 <div></div> 15 <div></div>
16 </div> 16 </div>
17 </div> 17 </div>
18 <script> 18 <script>
19 description("No subtree recalc when changing attribute used in generated content ."); 19 description("No subtree recalc when changing attribute used in generated content .");
20 20
21 document.body.offsetTop; // force layout 21 document.body.offsetTop; // force layout
22 22
23 // Setting attribute neither used in attribute selectors nor content should not 23 // Setting attribute neither used in attribute selectors nor content should not
24 // cause a recalc. 24 // cause a recalc.
25 25
26 before.setAttribute("attr-unused", "unused"); 26 before.setAttribute("attr-unused", "unused");
27 if (window.internals) 27 if (window.internals)
28 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0"); 28 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "0 ");
29 29
30 document.body.offsetTop; // force layout 30 document.body.offsetTop; // force layout
31 31
32 before.setAttribute("my-value", "before"); 32 before.setAttribute("my-value", "before");
33 if (window.internals) 33 if (window.internals)
34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 34 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2 ");
35 35
36 document.body.offsetTop; // force layout 36 document.body.offsetTop; // force layout
37 37
38 after.setAttribute("my-value", "after"); 38 after.setAttribute("my-value", "after");
39 if (window.internals) 39 if (window.internals)
40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 40 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2 ");
41 </script> 41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698