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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-3.html

Issue 1541083002: Fix invalid selection produced when dragging mouse outside the SVG text element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 <!DOCTYPE html>
2 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3 .org/1999/xlink" width="400" height="400" viewBox="0 0 350 350" style="border: 1 px solid black;">
3 <g>
4 <text id="line1" x="10" y="70" font-family="Arial" font-size="10" fill="blac k">Hello World. Hello, SVG.</text>
5 </g>
6 <g transform="translate(100, 50)">
7 <g transform="rotate(20) scale(2)">
8 <text x="10" y="70" font-family="Arial" font-size="10" fill="black">Hell o World. Hello, SVG.</text>
9 <text id="line2" x="10" y="80" font-family="Arial" font-size="10" fill=" black">Hello World. Hello, SVG.</text>
10 </g>
11 </g>
12 </svg>
13 <script src="../../resources/js-test.js"></script>
14 <script src="resources/SelectionTestCase.js"></script>
15 <script type="text/javascript">
16 var element = document.getElementById('line1');
17 var endPos = element.getEndPositionOfChar(10);
18 endPos.y += (element.getBBox().height * 1.5);
19 var absEndPos = toAbsoluteCoordinates(endPos, element);
20 selectTextFromCharToPoint({ id: 'line1', offset: 0 }, absEndPos, { start: "0", e nd: "11" });
21
22 var endPos = element.getEndPositionOfChar(10);
23 endPos.y += (element.getBBox().height * 1.5);
24 var absEndPos = toAbsoluteCoordinates(endPos, element);
25 selectTextFromCharToPoint({ id: 'line1', offset: 6 }, absEndPos, { start: "6", e nd: "11" });
26
27 var endPos = element.getEndPositionOfChar(23);
28 endPos.y += (element.getBBox().height * 1.5);
29 var absEndPos = toAbsoluteCoordinates(endPos, element);
30 selectTextFromCharToPoint({ id: 'line1', offset: 12 }, absEndPos, { start: "12", end: "24" });
31
32 element = document.getElementById('line2');
33 var endPos = element.getEndPositionOfChar(10);
34 endPos.y += (element.getBBox().height * 1.5);
35 var absEndPos = toAbsoluteCoordinates(endPos, element);
36 selectTextFromCharToPoint({ id: 'line2', offset: 0 }, absEndPos, { start: "0", e nd: "11" });
37
38 var endPos = element.getEndPositionOfChar(10);
39 endPos.y += (element.getBBox().height * 1.5);
40 var absEndPos = toAbsoluteCoordinates(endPos, element);
41 selectTextFromCharToPoint({ id: 'line2', offset: 6 }, absEndPos, { start: "6", e nd: "11" });
42
43 var endPos = element.getEndPositionOfChar(23);
44 endPos.y += (element.getBBox().height * 1.5);
45 var absEndPos = toAbsoluteCoordinates(endPos, element);
46 selectTextFromCharToPoint({ id: 'line2', offset: 12 }, absEndPos, { start: "12", end: "24" });
47 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698