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

Side by Side Diff: LayoutTests/fast/css/invalidation/targeted-attribute-scope.html

Issue 1349543004: CSS: Avoid invalidating style when only descendants need updating (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: invalidatesSelf Created 5 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 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 .inner1 [attr] { color: red; } 4 .inner1 [attr] { color: red; }
5 .inner2 .nomatch { color: red; } 5 .inner2 .nomatch { color: red; }
6 </style> 6 </style>
7 <div id="outer"> 7 <div id="outer">
8 <div id="inner1"> 8 <div id="inner1">
9 <div></div> 9 <div></div>
10 </div> 10 </div>
11 <div id="inner2"> 11 <div id="inner2">
12 <div attr></div> 12 <div attr></div>
13 </div> 13 </div>
14 </div> 14 </div>
15 <script> 15 <script>
16 description("Test invalidation set scope for attribute features."); 16 description("Test invalidation set scope for attribute features.");
17 17
18 document.body.offsetLeft; // force style recalc. 18 document.body.offsetLeft; // force style recalc.
19 19
20 document.getElementById("inner1").className = "inner1"; 20 document.getElementById("inner1").className = "inner1";
21 document.getElementById("inner2").className = "inner2"; 21 document.getElementById("inner2").className = "inner2";
22 if (window.internals) 22 if (window.internals)
23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698