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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/add-keyframes-in-shadow-recalc.html

Issue 2557533005: Collect active stylesheets and and apply asynchronously. (Closed)
Patch Set: Rebased. Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <div id="host"></div> 4 <div id="host"></div>
5 <div></div> 5 <div></div>
6 <div></div> 6 <div></div>
7 <div></div> 7 <div></div>
8 <div></div> 8 <div></div>
9 <script> 9 <script>
10 test(() => assert_not_equals(window.internals, undefined, "Needs window.inte rnals for testing."), "Check that window.internals is defined"); 10 test(() => assert_not_equals(window.internals, undefined, "Needs window.inte rnals for testing."), "Check that window.internals is defined");
11 11
12 var root = host.attachShadow({mode:"open"}); 12 var root = host.attachShadow({mode:"open"});
13 root.innerHTML = "<div></div><div></div><div></div>"; 13 root.innerHTML = "<div></div><div></div><div></div>";
14 host.offsetTop; 14 host.offsetTop;
15 15
16 test(() => { 16 test(() => {
17 var sheet = document.createElement("style"); 17 var sheet = document.createElement("style");
18 sheet.appendChild(document.createTextNode(` 18 sheet.appendChild(document.createTextNode(`
19 @keyframes unused { 19 @keyframes unused {
20 from { color: pink } 20 from { color: pink }
21 to { color: orange } 21 to { color: orange }
22 }`)); 22 }`));
23 root.appendChild(sheet); 23 root.appendChild(sheet);
24 // TODO(rune@opera.com): This count should be 1 when async stylesheet 24 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1,
25 // update with RuleSet invalidations land. Currently we always do a
26 // subtree recalc for stylesheet mutations in shadow trees.
27 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5,
28 "Recalc for shadow tree, including host and inserted style element." ); 25 "Recalc for shadow tree, including host and inserted style element." );
29 }, "Check that adding @keyframes does not cause a style recalc of the host e lement when no animations are running."); 26 }, "Check that adding @keyframes does not cause a style recalc of the host e lement when no animations are running.");
30 </script> 27 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698