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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo.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 <host id="host"> 3 <host id="host">
4 <div> 4 <div>
5 <div id="green" class="b">This text should be green</div> 5 <div id="green" class="b">This text should be green</div>
6 </div> 6 </div>
7 </host> 7 </host>
8 <script> 8 <script>
9 description("No need to invalidate for selectors right of ::content as ::content causes subtree invalidation."); 9 description("No need to invalidate for selectors right of ::content as ::content causes subtree invalidation.");
10 10
11 var root = host.createShadowRoot(); 11 var root = host.createShadowRoot();
12 root.innerHTML = '<style>.a ::content .b { color: green }</style><div id="outer" ><div class="b"><div class="b"><div class="b"><content/></div></div></div></div> '; 12 root.innerHTML = '<style>.a ::content .b { color: green }</style><div id="outer" ><div class="b"><div class="b"><div class="b"><content/></div></div></div></div> ';
13 13
14 shouldBeEqualToString("getComputedStyle(green).color", "rgb(0, 0, 0)"); 14 shouldBeEqualToString("getComputedStyle(green).color", "rgb(0, 0, 0)");
15 15
16 host.offsetTop; // force recalc 16 host.offsetTop; // force recalc
17 17
18 root.querySelector("#outer").className = "a"; 18 root.querySelector("#outer").className = "a";
19 if (window.internals) 19 if (window.internals)
20 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 20 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2 ");
21 21
22 shouldBeEqualToString("getComputedStyle(green).color", "rgb(0, 128, 0)"); 22 shouldBeEqualToString("getComputedStyle(green).color", "rgb(0, 128, 0)");
23 </script> 23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698