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

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

Issue 2361733004: Adding @keyframes rules only affects TreeScope plus host. (Closed)
Patch Set: Moved scope check to CSSAnimations Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/Animation.h » ('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/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <div id="host"></div>
5 <div></div>
6 <div></div>
7 <div></div>
8 <div></div>
9 <script>
10 test(() => assert_not_equals(window.internals, undefined, "Needs window.inte rnals for testing."), "Check that window.internals is defined");
11
12 var root = host.attachShadow({mode:"open"});
13 root.innerHTML = "<div></div><div></div><div></div>";
14 host.offsetTop;
15
16 test(() => {
17 var sheet = document.createElement("style");
18 sheet.appendChild(document.createTextNode(`
19 @keyframes unused {
20 from { color: pink }
21 to { color: orange }
22 }`));
23 root.appendChild(sheet);
24 // TODO(rune@opera.com): This count should be 1 when async stylesheet
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." );
29 }, "Check that adding @keyframes does not cause a style recalc of the host e lement when no animations are running.");
30 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/Animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698