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

Side by Side Diff: LayoutTests/fast/css/invalidation/content-attr.html

Issue 609813002: Use LocalStyleChange for content:attr() changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added invalidation tests Created 6 years, 2 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 #before::before, #after::after { content: attr(my-value); }
5 </style>
6 <div id="before">
7 <div></div>
8 <div>
9 <div></div>
10 </div>
11 </div>
12 <div id="after">
13 <div></div>
14 <div>
15 <div></div>
16 </div>
17 </div>
18 <script>
19 description("No subtree recalc when changing attribute used in generated content .");
20
21 document.body.offsetTop; // force layout
22
23 // Setting attribute neither used in attribute selectors nor content should not
24 // cause a recalc.
25
26 before.setAttribute("attr-unused", "unused");
27 if (window.internals)
28 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
29
30 document.body.offsetTop; // force layout
31
32 before.setAttribute("my-value", "before");
33 if (window.internals)
34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
35
36 document.body.offsetTop; // force layout
37
38 after.setAttribute("my-value", "after");
39 if (window.internals)
40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698