OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
Julien - ping for review
2013/11/25 03:40:17
OH! Missing the doctype!
| |
2 <head> | |
3 <title>Test - Issue #321959: Fix hover area for divs with css transforms</title > | |
Julien - ping for review
2013/11/25 03:40:17
I advise people not to use title as it is not dump
| |
4 <style> | |
5 #transformed { | |
6 -webkit-transform: translateY(50px) rotateX(20deg) rotateZ(10deg); | |
7 /*-webkit-transform-style: preserve-3d;*/ | |
Julien - ping for review
2013/11/25 03:40:17
Let's remove this comment.
| |
8 border: solid 5px rgba(128,128,128,0.5); | |
9 padding: 10px; | |
10 margin: 15px; | |
11 } | |
12 #parent:hover, #transformed:hover, #child1:hover, #child2:hover { | |
13 box-shadow: 0px 0px 0px 10px rgba(0,128,0,0.5); | |
14 } | |
15 #parent { | |
16 outline: dotted 1px #888; | |
17 } | |
18 #transformed, #parent { | |
19 width: 600px; | |
20 height: 150px; | |
21 xbackground-color: Yellow; | |
Julien - ping for review
2013/11/25 03:40:17
xbackground-color is not a valid property :)
| |
22 } | |
23 #child1 { | |
24 -webkit-transform: rotateX(45deg) rotateZ(45deg) translateZ(-500px) translateX( -300px) translateY(-180px); | |
25 border: solid 5px rgba(128,128,128,0.5); | |
26 background-color: Lime; | |
27 } | |
28 #child2 { | |
29 -webkit-transform: translateZ(-500px) rotateX(-45deg) rotateZ(-45deg) translate X(50px) translateY(-130px); | |
30 border: solid 5px rgba(128,128,128,0.5); | |
31 background-color: Cyan; | |
32 } | |
33 html { | |
34 font-size: 16px; | |
35 line-height: 16px; | |
36 } | |
37 </style> | |
Julien - ping for review
2013/11/25 03:40:17
I really think we should simplify this style as mu
| |
38 | |
39 <script src="resources/hit-test-utils.js"></script> | |
40 <script> | |
41 const hitTestData = [ | |
42 { 'point': [70, 70], 'target' : 'transformed' }, | |
43 { 'point': [630, 130], 'target' : 'transformed' }, | |
44 { 'point': [40, 130], 'target' : 'transformed' }, | |
45 { 'point': [620, 270], 'target' : 'transformed' }, | |
46 { 'point': [130, 100], 'target' : 'child1' }, | |
47 { 'point': [200, 110], 'target' : 'child2' } | |
48 ]; | |
49 | |
50 window.addEventListener('load', runTest, false); | |
51 </script> | |
52 </head> | |
53 <body id="body"> | |
54 <div id="parent"> | |
55 <div id="transformed">transformed | |
56 <div id="child1">child 1</div> | |
57 <div id="nonTransformedChild">non transformed child</div> | |
58 <div id="child2">child 2</div> | |
59 </div> | |
60 </div> | |
61 | |
62 <p>Test passes if the hover state of a transformed div is activated on the enti re surface of the div.</p> | |
63 | |
64 <div id="results"></div> | |
65 </body> | |
66 </html> | |
OLD | NEW |