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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/reattach-with-sibling-invalidation.html

Issue 1533683002: Persist invalidation sets on detach root (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid detaching when in inactive state Created 4 years, 12 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/LayoutTests/fast/css/invalidation/reattach-with-sibling-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 <style>
4 .b { color: red }
5 .a + div .b { color: green }
6 </style>
7 <input type="text"></input>
8 <div>
9 <span class="b">Should be green</span>
10 <span></span>
11 <span></span>
12 <span></span>
13 </div>
14 <script>
15 description("A reattach should not discard a scheduled sibling invalidation. ");
16
17 var input = document.querySelector("input");
18
19 shouldBeEqualToString("getComputedStyle(document.querySelector('.b')).color" , "rgb(255, 0, 0)");
20
21 // Force clean style+layout
22 input.offsetTop;
23
24 // Schedule sibling invalidation set to invalidate span.b
25 input.className = "a";
26
27 // Trigger lazyReattachIfAttached() -> detach().
28 document.querySelector("input").type = "button";
29
30 // The expected count will be 2 when ContainerNode::checkForChildrenAdjacent RuleChanges()
31 // is removed. One for attaching the input, and one for the span.b recalc.
32 if (window.internals)
33 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "6");
34
35 shouldBeEqualToString("getComputedStyle(document.querySelector('.b')).color" , "rgb(0, 128, 0)");
36 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/reattach-with-sibling-invalidation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698