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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/boundary-crossing-scopes-null-resolver-crash.html

Issue 2450353002: Clear m_treeBoundaryCrossingScopes when reconstructing StyleResolver. (Closed)
Patch Set: Created 4 years, 1 month 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/dom/StyleEngine.cpp » ('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 <style>.green { color: green }</style>
5 <div id="host">
6 <div id="inner">Green, should not crash.</div>
7 </div>
8 <script>
9 var root = host.createShadowRoot();
10
11 test(() => {
12 root.innerHTML = "<style>:host ::content * { color:red }</style><content >";
13 document.body.offsetTop;
14 assert_equals(getComputedStyle(inner).color, "rgb(255, 0, 0)", "#inner i s initially red.");
15 }, "Check that #inner is initially red.");
16
17 test(() => {
18 // Inserting a document stylesheet before another one causes a
19 // StyleResolver Reconstruct.
20 var newSheet = document.createElement("style");
21 newSheet.innerText = "#nomatch { color: red }";
22 document.head.insertBefore(newSheet, document.querySelector("style"));
23 // Removing the shadow stylesheet will cause the ScopedStyleResolver
24 // to be nuked.
25 root.innerHTML = "<content>";
26 inner.className = "green";
27 assert_equals(getComputedStyle(inner).color, "rgb(0, 128, 0)", "Check th at #inner is green after the class is set.");
28 }, "Reconstructing StyleResolver should not leave any treeBoundaryCrossingSc opes with null ScopedStyleResolvers in StyleEngine.");
29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698