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

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

Issue 81153002: Fix hover area for divs with css transforms Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: adding layout test that fails with this approach. 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
« no previous file with comments | « no previous file | LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z.html
diff --git a/LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z.html b/LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z.html
new file mode 100644
index 0000000000000000000000000000000000000000..f6c193f3e2fc8ab2acf60dee9fc67b798ee031ee
--- /dev/null
+++ b/LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z.html
@@ -0,0 +1,42 @@
+<html>
+ <head>
+ <title>Test - Issue #321959: Fix hover area for divs with css transforms</title>
+ <style>
+ #transformed {
+ -webkit-transform: translateY(50px) rotateX(20deg) rotateZ(10deg);
+ border: solid 5px rgba(128,128,128,0.5);
+ padding: 10px;
+ margin: 15px;
+ }
+ #transformed:hover {
+ box-shadow: 0px 0px 0px 10px rgba(0,128,0,0.5);
+ }
+ #parent {
+ outline: dotted 1px #888;
+ }
+ #transformed, #parent {
+ width: 600px;
+ height: 150px;
+ }
+ </style>
+
+ <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' }
+ ];
+
+ window.addEventListener('load', runTest, false);
+ </script>
+ </head>
+ <body id="body">
+ <div id="parent"><div id="transformed">transformed</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>
« no previous file with comments | « no previous file | LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698