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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/hover-display-contents.html

Issue 2790133002: Allow display:contents elements in hover chain. (Closed)
Patch Set: Fixed nits. Created 3 years, 8 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/dom/ContainerNode.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>
5 .contents {
6 display: contents;
7 border: 1px solid red;
8 }
9 .contents:hover {
10 color: green;
11 }
12 </style>
13 <div id="container1">
14 <div id="target1" class="contents">Hovering this text should make it go green.
15 There should be no red border at any time.</div>
16 </div>
17 <div id="container2">
18 <div class="contents">
19 <div id="target2">Hovering this text should make it go green.
20 There should be no red border at any time.</div>
21 </div>
22 </div>
23 <script>
24 function hoverElement(element) {
25 eventSender.mouseMoveTo(element.offsetLeft + 1, element.offsetTop + 1);
26 }
27
28 test(() => {
29 assert_true(!!window.eventSender, "Check for window.eventSender");
30 }, "Tests require window.eventSender for hovering.");
31
32 test(() => {
33 hoverElement(container1);
34 assert_equals(getComputedStyle(target1).color, "rgb(0, 128, 0)",
35 "Color should be green.");
36 }, "Hover text with :hover style on display:contents parent.");
37
38 test(() => {
39 hoverElement(container2);
40 assert_equals(getComputedStyle(target2).color, "rgb(0, 128, 0)",
41 "Color should be green.");
42 }, "Hover text with :hover style on display:contents ancestor.");
43 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698