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

Unified Diff: third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg
diff --git a/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg b/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8d5f0b27c0287f731490e71dcd9a68bb93cdc3d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg
@@ -0,0 +1,32 @@
+<svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg">
+ <text id="text" dominant-baseline="hanging" x="10" y="10">Foo</text>
+ <defs>
+ <style type="text/css">
+ <![CDATA[
+ @font-face {
+ font-family: Ahem;
fs 2015/11/17 09:47:49 I guess we should use the ahem.js helper or there
pdr. 2015/11/17 21:51:23 Done
+ src: url(../../resources/Ahem.ttf);
+ }
+ text {
+ font-family: Ahem;
+ font-size: 40px;
+ }
+ ]]>
+ </style>
+ <script type="text/javascript">
+ <![CDATA[
+ function runTest() {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ // The point at 15,15 is contained within the text's bounding box.
fs 2015/11/17 09:47:49 This goes for the comments in all tests pretty muc
pdr. 2015/11/17 21:51:23 Done
+ var text = document.getElementById("text");
+ if (document.elementFromPoint(15, 15) === text)
+ text.textContent = "PASS";
+ else
+ text.textContent = "FAIL";
+ }
+ ]]>
+ </script>
+ </defs>
+</svg>

Powered by Google App Engine
This is Rietveld 408576698