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

Side by Side Diff: LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html

Issue 143873016: Implement style invalidation tree walk for targeted style recalc upon class change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/targeted-class-style-invalidation-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3
4 <style>
5 .outer .inner {}
6 </style>
7
8 <div id="outer">
9 <div id="inner" class="inner">
10 </div>
11 <div id="inner2">
12 </div>
13 </div>
14
15 <script>
16 description("Test that adding and removing class names only updates the elements that are affected.");
17
18 function insertStyleSheet(css)
19 {
20 var styleElement = document.createElement("style");
21 styleElement.textContent = css;
22 (document.head || document.documentElement).appendChild(styleElement);
23 }
24
25 var outer = document.getElementById('outer');
26
27 outer.offsetTop;
28 outer.className = 'outer';
29
30 // Style recalc should happen on "inner" and "outer", but not "inner2".
31 // FIXME: change the 3 to a 2 once we have a virtual test setup.
32 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '3');
33
34 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/targeted-class-style-invalidation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698