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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg

Issue 1454623002: Hit test SVG line boxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup extra debugging code and minor bugs Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="h ttp://www.w3.org/2000/svg">
2 <rect id="background" width="100%" height="100%" fill="blue" />
3 <text id="text" x="10" y="1em" dx="0 50 100">Foo</text>
4 <defs>
5 <style type="text/css">
6 <![CDATA[
7 @font-face {
8 font-family: Ahem;
9 src: url(../../resources/Ahem.ttf);
10 }
11 text {
12 font-family: Ahem;
13 font-size: 40px;
14 }
15 ]]>
16 </style>
17 <script type="text/javascript">
18 <![CDATA[
19 function runTest() {
20 if (window.testRunner)
21 testRunner.dumpAsText();
22
23 // The point at 15,15 is contained within the text's bounding bo x.
24 // The point at 30,15 is contained in between the text's charact er cells
25 // and thus should return the background.
26 var text = document.getElementById("text");
27 var background = document.getElementById("background");
28 if (document.elementFromPoint(15, 15) === text && document.eleme ntFromPoint(35, 15) === background)
29 text.textContent = "PASS";
30 else
31 text.textContent = "FAIL";
32 }
33 ]]>
34 </script>
35 </defs>
36 </svg>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698