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

Unified Diff: LayoutTests/transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html

Issue 79943002: Only not take zOffset into account during hit-testing when child layers are in the same 3d renderin… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html
diff --git a/LayoutTests/transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html b/LayoutTests/transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html
new file mode 100644
index 0000000000000000000000000000000000000000..2b42d1efcef1e6752bfe22bdfa84fd0a1e02a67e
--- /dev/null
+++ b/LayoutTests/transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html
@@ -0,0 +1,66 @@
+<html>
Julien - ping for review 2013/11/25 03:40:17 OH! Missing the doctype!
+ <head>
+ <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
+ <style>
+ #transformed {
+ -webkit-transform: translateY(50px) rotateX(20deg) rotateZ(10deg);
+ /*-webkit-transform-style: preserve-3d;*/
Julien - ping for review 2013/11/25 03:40:17 Let's remove this comment.
+ border: solid 5px rgba(128,128,128,0.5);
+ padding: 10px;
+ margin: 15px;
+ }
+ #parent:hover, #transformed:hover, #child1:hover, #child2:hover {
+ box-shadow: 0px 0px 0px 10px rgba(0,128,0,0.5);
+ }
+ #parent {
+ outline: dotted 1px #888;
+ }
+ #transformed, #parent {
+ width: 600px;
+ height: 150px;
+ xbackground-color: Yellow;
Julien - ping for review 2013/11/25 03:40:17 xbackground-color is not a valid property :)
+ }
+ #child1 {
+ -webkit-transform: rotateX(45deg) rotateZ(45deg) translateZ(-500px) translateX(-300px) translateY(-180px);
+ border: solid 5px rgba(128,128,128,0.5);
+ background-color: Lime;
+ }
+ #child2 {
+ -webkit-transform: translateZ(-500px) rotateX(-45deg) rotateZ(-45deg) translateX(50px) translateY(-130px);
+ border: solid 5px rgba(128,128,128,0.5);
+ background-color: Cyan;
+ }
+ html {
+ font-size: 16px;
+ line-height: 16px;
+ }
+ </style>
Julien - ping for review 2013/11/25 03:40:17 I really think we should simplify this style as mu
+
+ <script src="resources/hit-test-utils.js"></script>
+ <script>
+ const hitTestData = [
+ { 'point': [70, 70], 'target' : 'transformed' },
+ { 'point': [630, 130], 'target' : 'transformed' },
+ { 'point': [40, 130], 'target' : 'transformed' },
+ { 'point': [620, 270], 'target' : 'transformed' },
+ { 'point': [130, 100], 'target' : 'child1' },
+ { 'point': [200, 110], 'target' : 'child2' }
+ ];
+
+ window.addEventListener('load', runTest, false);
+ </script>
+ </head>
+ <body id="body">
+ <div id="parent">
+ <div id="transformed">transformed
+ <div id="child1">child 1</div>
+ <div id="nonTransformedChild">non transformed child</div>
+ <div id="child2">child 2</div>
+ </div>
+ </div>
+
+ <p>Test passes if the hover state of a transformed div is activated on the entire surface of the div.</p>
+
+ <div id="results"></div>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698