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

Side by Side Diff: LayoutTests/svg/text/selection-doubleclick.svg

Issue 18503004: Have SVGTextContentElement inherit SVGGraphicsElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really remove SVGLocatable IDL interface Created 7 years, 5 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 <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" vi ewBox="0 0 160 120"> 1 <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" vi ewBox="0 0 160 120">
2 <text id="line1" x="14" y="10" font-family="Arial" font-size="10" fill="blac k">foo bar baz</text> 2 <text id="line1" x="14" y="10" font-family="Arial" font-size="10" fill="blac k">foo bar baz</text>
3 <text id="line2" x="14" y="20" font-family="Arial" font-size="10" fill="blac k">next line</text> 3 <text id="line2" x="14" y="20" font-family="Arial" font-size="10" fill="blac k">next line</text>
4 <script> 4 <script>
5 var line1 = document.getElementById("line1"); 5 var line1 = document.getElementById("line1");
6 var center = document.rootElement.createSVGPoint(); 6 var center = document.rootElement.createSVGPoint();
7 var matrix = document.rootElement.getTransformToElement(line1); 7 var matrix = line1.getScreenCTM();
8 var bbox = line1.getBBox(); 8 var bbox = line1.getBBox();
9 9
10 center.x = bbox.x + bbox.width/2; 10 center.x = bbox.x + bbox.width/2;
11 center.y = bbox.y + bbox.height/2; 11 center.y = bbox.y + bbox.height/2;
12 center = center.matrixTransform(matrix); 12 center = center.matrixTransform(matrix);
13 13
14 if (eventSender) { 14 if (eventSender) {
15 eventSender.mouseMoveTo(center.x, center.y); 15 eventSender.mouseMoveTo(center.x, center.y);
16 eventSender.mouseDown(); 16 eventSender.mouseDown();
17 eventSender.mouseUp(); 17 eventSender.mouseUp();
18 eventSender.mouseDown(); 18 eventSender.mouseDown();
19 eventSender.mouseUp(); 19 eventSender.mouseUp();
20 } 20 }
21 21
22 if (window.testRunner) 22 if (window.testRunner)
23 window.testRunner.dumpSelectionRect(); 23 window.testRunner.dumpSelectionRect();
24 </script> 24 </script>
25 </svg> 25 </svg>
OLDNEW
« no previous file with comments | « LayoutTests/svg/text/resources/SelectionTestCase.js ('k') | Source/core/svg/SVGAnimateMotionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698