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

Side by Side Diff: LayoutTests/fast/events/script-tests/page-scaled-mouse-click-iframe.js

Issue 15508003: Revert "Don't force layout for mouse event hit tests" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
1 description("This tests that page scaling and CSS transforms do not affect mouse event pageX and pageY coordinates for " + 1 description("This tests that page scaling and CSS transforms do not affect mouse event pageX and pageY coordinates for " +
2 "content embedded in an iframe."); 2 "content embedded in an iframe.");
3 3
4 var html = document.documentElement; 4 var html = document.documentElement;
5 5
6 var iframe = document.createElement("iframe"); 6 var iframe = document.createElement("iframe");
7 iframe.style.border = "none"; 7 iframe.style.border = "none";
8 iframe.style.width = "200px"; 8 iframe.style.width = "200px";
9 iframe.style.height = "200px"; 9 iframe.style.height = "200px";
10 iframe.style.background = "green"; 10 iframe.style.background = "green";
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 html.style["-webkit-transform-origin"] = "0 0"; 68 html.style["-webkit-transform-origin"] = "0 0";
69 testEvents(0, "CSS scale(0.5, 2.0)", "click(20, 5)"); 69 testEvents(0, "CSS scale(0.5, 2.0)", "click(20, 5)");
70 70
71 window.internals.setPageScaleFactor(0.5, 0, 0); 71 window.internals.setPageScaleFactor(0.5, 0, 0);
72 testEvents(0, "setPageScale(0.5), CSS scale(0.5, 2.0)", "click(40, 10)"); 72 testEvents(0, "setPageScale(0.5), CSS scale(0.5, 2.0)", "click(40, 10)");
73 } 73 }
74 74
75 finishJSTest(); 75 finishJSTest();
76 } 76 }
77 77
78 // Mouse events only work after an initial layout
79 document.body.offsetLeft;
80
78 // Add the iframe to the document. 81 // Add the iframe to the document.
79 iframe.src = "resources/page-scaled-mouse-click-iframe-inner.html"; 82 iframe.src = "resources/page-scaled-mouse-click-iframe-inner.html";
80 document.body.insertBefore(iframe, document.body.firstChild); 83 document.body.insertBefore(iframe, document.body.firstChild);
81 84
82 window.jsTestIsAsync = true; 85 window.jsTestIsAsync = true;
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/script-tests/page-scaled-mouse-click.js ('k') | LayoutTests/fast/events/scrollbar-double-click.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698