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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/hittest/text-small-font-size-and-viewbox.html

Issue 1780673002: Simplify CullRect computation in LineBoxList::hitTest; fixing off-by-one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@svg-text-hittest-no-floor
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/hittest/text-small-font-size-and-viewbox-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Hit-test of text with fractional (&lt; 1) font-size and small (high scale factor) viewBox</title> 2 <title>Hit-test of text with fractional (&lt; 1) font-size and small (high scale factor) viewBox</title>
3 <script src="../../resources/ahem.js"></script> 3 <script src="../../resources/ahem.js"></script>
4 <script src="../../resources/testharness.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <style> 6 <style>
7 svg { 7 svg {
8 margin: 0px; 8 margin: 0px;
9 padding: 0px; 9 padding: 0px;
10 position: absolute; 10 position: absolute;
11 top: 0px; 11 top: 0px;
12 left: 0px; 12 left: 0px;
13 width: 800px; 13 width: 800px;
14 } 14 }
15 </style> 15 </style>
16 <svg viewBox="0 0 22 28"> 16 <svg viewBox="0 0 22 28" font-family="Ahem" font-size="0.125" fill="blue">
17 <text font-family="Ahem" font-size="0.125" fill="blue" y="2.438"><a xlink:href ="#">ABCDEFGH</a></text> 17 <text y="2.438"><a xlink:href="#">ABCDEFGH</a></text>
18 <text y="4.698" x="7.571"><a xlink:href="#">ABCDEFGH</a></text>
18 </svg> 19 </svg>
19 <script> 20 <script>
20 test(function() { 21 test(function() {
21 var referenceElement = document.querySelector('a'); 22 var links = document.querySelectorAll('a');
23
22 [ 24 [
23 { x: 2, y: 85 }, 25 { x: 2, y: 85 },
24 { x: 4, y: 87 }, 26 { x: 4, y: 87 },
25 { x: 2, y: 89 }, 27 { x: 2, y: 89 },
26 { x: 6, y: 85 }, 28 { x: 6, y: 85 },
27 { x: 4, y: 87 }, 29 { x: 4, y: 87 },
28 { x: 6, y: 89 }, 30 { x: 6, y: 89 },
29 { x: 10, y: 87 }, 31 { x: 10, y: 87 },
30 { x: 14, y: 87 }, 32 { x: 14, y: 87 },
31 { x: 18, y: 87 }, 33 { x: 18, y: 87 },
32 { x: 22, y: 87 }, 34 { x: 22, y: 87 },
33 { x: 26, y: 87 }, 35 { x: 26, y: 87 },
34 ].forEach(function(point) { 36 ].forEach(function(point) {
35 assert_equals(document.elementFromPoint(point.x, point.y), referenceElement, point.x + ',' + point.y); 37 assert_equals(document.elementFromPoint(point.x, point.y), links[0], point.x + ',' + point.y);
38 });
39
40 [
41 { x: 278, y: 169 },
42 { x: 276, y: 171 },
43 { x: 278, y: 169 },
44 { x: 280, y: 171 },
45 { x: 284, y: 169 },
46 { x: 288, y: 169 },
47 { x: 292, y: 169 },
48 { x: 296, y: 169 },
49 { x: 300, y: 169 },
50 ].forEach(function(point) {
51 assert_equals(document.elementFromPoint(point.x, point.y), links[1], point.x + ',' + point.y);
36 }); 52 });
37 }); 53 });
38 </script> 54 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/hittest/text-small-font-size-and-viewbox-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698