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

Side by Side Diff: LayoutTests/fast/dom/shadow/ancestor-first-child.html

Issue 201573003: Reset SelectorCheckingContext.elementStyle for :ancestor matching. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/ancestor-first-child-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 <script src="resources/shadow-dom.js"></script>
4
5 <div id="test">
6 <div id="first"></div>
7 </div>
8
9 <script>
10 description("Test that :ancestor(:first-child) is re-evaluated when :first-child changes.");
11
12 var test = document.getElementById("test");
13 var first = document.getElementById("first");
14
15 first.appendChild(
16 createDOM("div", {"id": "host"},
17 createShadowRoot(
18 createDOM('style', {},
19 document.createTextNode(":ancestor(#first:first-child) { backgro und-color: red; }")),
20 createDOM('div', {},
21 document.createTextNode("You should see no red.")))));
22
23 document.body.offsetTop; // Force style recalc.
24
25 var red = "rgb(255, 0, 0)";
26
27 shouldBe("getComputedStyle(first.firstChild, null).backgroundColor", "red");
28
29 test.insertBefore(document.createElement("div"), first);
30
31 shouldNotBe("getComputedStyle(first.firstChild, null).backgroundColor", "red");
32 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/ancestor-first-child-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698