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

Side by Side Diff: LayoutTests/svg/hittest/svg-small-big-path.html

Issue 1300783005: Scale x/y coordinate of svg path separately for hit-test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
(Empty)
1 <style>
pdr. 2015/08/20 21:25:13 <DOCTYPE HTML> please, as this prevents quirky beh
jbroman 2015/08/20 21:28:20 nit: <!DOCTYPE html> is the correct HTML5 doctype
Yufeng Shen (Slow to review) 2015/08/24 20:13:07 Done.
2 svg {
3 margin: 0px;
4 padding: 0px;
5 position: absolute;
6 top: 0px;
7 left: 0px;
8 }
9 </style>
10 <body>
11 <svg x="0" y="0">
12 <svg x="-250000" width="500000" height="500">
13 <path id="path" d="M 250005 104 l 19 0 l 3 3 l -3 3 l -19 0 z"></path>
14 </svg>
15 </svg>
16
17 <script src="../../resources/js-test.js"></script>
18 <script>
19 description("Test that hit-test works for a path whose x/y ranges have diffe rent magnitude.");
20 if (window.testRunner)
21 testRunner.dumpAsText();
22
23 var resultString = "";
24 var pathElement = document.getElementById("path");
25
26 var pointsInPath = [
27 {x: 5, y: 104},
28 {x: 5, y: 107},
29 {x: 5, y: 110}
30 ];
31
32 var pointsNotInPath = [
33 {x: 5, y: 103},
34 {x: 5, y: 111}
35 ];
36
37 pointsInPath.forEach( function(point) {
38 var pass = (pathElement == document.elementFromPoint(point.x, point.y));
39 resultString += ((pass) ? "PASS" : "FAIL") + " path contains point at (" + point.x + ", " + point.y + ")\n";
40 });
41 pointsNotInPath.forEach( function(point) {
42 var pass = (pathElement != document.elementFromPoint(point.x, point.y));
43 resultString += ((pass) ? "PASS" : "FAIL") + " path does not contain poi nt at (" + point.x + ", " + point.y + ")\n";
44 });
45
46 debug(resultString);
47 </script>
48 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/svg/hittest/svg-small-big-path-expected.txt » ('j') | Source/platform/graphics/skia/SkiaUtils.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698