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

Side by Side Diff: LayoutTests/fast/dynamic/hover-sibling-reattach.html

Issue 304183009: Reset RestyleFlags when Element is removed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 #outer {
5 position: absolute;
6 left: 0;
7 top: 0
8 }
9
10 #outer div {
11 width: 100px;
12 height: 100px
13 }
14
15 #hover:hover + #test {
16 background-color: black
17 }
18 </style>
19 <div id="outer">
20 <div id="hover"></div>
21 <div id="test"></div>
22 </div>
23 <script>
24 description("Check that childrenAffectedByHover is intact after a re-attach.");
25
26 function mouseOver(x, y) {
27 if (window.eventSender)
28 eventSender.mouseMoveTo(x, y);
29 document.body.offsetTop; // force style recalc
30 }
31
32 var black = "rgb(0, 0, 0)";
33 var transparent = "rgba(0, 0, 0, 0)";
34
35 var test = document.getElementById('test');
36
37 shouldBe("getComputedStyle(test, '').backgroundColor", "transparent");
38
39 // Hover #hover
40 mouseOver(50, 50);
41 shouldBe("getComputedStyle(test, '').backgroundColor", "black");
42
43 // Hover body
44 mouseOver(0, 200);
45 shouldBe("getComputedStyle(test, '').backgroundColor", "transparent");
46
47 // Force re-attach
48 document.getElementById("hover").style.display = "inline-block";
49
50 // Hover #hover
51 mouseOver(50, 50);
52 shouldBe("getComputedStyle(test, '').backgroundColor", "black");
53 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dynamic/hover-sibling-reattach-expected.txt » ('j') | Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698