Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / carto.net / button.svg
blob8af6c1be69894fbda1419b6107a86ea831213d6d
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
3 <!ATTLIST svg
4 xmlns:a3 CDATA #IMPLIED
5 a3:scriptImplementation CDATA #IMPLIED
7 <!ATTLIST script
8 a3:scriptImplementation CDATA #IMPLIED
11 <?AdobeSVGViewer save="snapshot"?>
12 <svg viewBox="0 0 1024 768" xmlns="http://www.w3.org/2000/svg"
13 xmlns:xlink="http://www.w3.org/1999/xlink"
14 xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtension/3.0/" onload="initialize(evt);"
15 zoomAndPan="disable">
16 <script type="text/ecmascript" xlink:href="resources/helper_functions.js"/>
17 <script type="text/ecmascript" xlink:href="resources/timer.js"/>
18 <script type="text/ecmascript" xlink:href="resources/button.js"/>
19 <script type="text/ecmascript"><![CDATA[
20 var textbutton1;
21 var textbutton2;
22 var textbutton3;
23 var textbutton4;
24 var textbutton5;
25 var textbutton7;
26 var buttonMoveVertex;
27 var ellipseButton;
28 function initialize(evt) {
29 //first a few styles
30 var buttonTextStyles = {"font-family":"Arial,Helvetica","fill":"navy","font-size":12};
31 var buttonStyles = {"fill":"lightsteelblue"};
32 var shadeLightStyles = {"fill":"white"};
33 var shadeDarkStyles = {"fill":"navy"};
34 var buttonRoundStyles = {"fill":"lightsteelblue","rx":10,"ry":10};
35 var shadeLightRoundStyles = {"fill":"white","rx":10,"ry":10};
36 var shadeDarkRoundStyles = {"fill":"navy","rx":10,"ry":10};
37 textbutton1 = new button("textbutton1","textbuttons",buttonPressed,"rect","Click me",undefined,100,100,100,30,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
38 textbutton2 = new button("textbutton2","textbuttons",buttonPressed,"rect","Click me 2",undefined,220,100,100,30,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
39 textbutton3 = new button("textbutton3","textbuttons",buttonPressed,"rect","Deactivate Button 2",undefined,340,100,130,30,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
40 textbutton4 = new switchbutton("textbutton4","textbuttons",switchButtonPressed,"rect","Switch Button on",undefined,490,100,120,30,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
41 textbutton5 = new button("textbutton5","textbuttons",buttonPressed,"rect","Remove Button 1",undefined,630,100,130,30,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
42 textbutton6 = new button("textbutton6","textbuttons",buttonPressed,"rect","Switch Button 4 on",undefined,780,100,130,30,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
43 textbutton7 = new button("textbutton7","textbuttons",buttonPressed,"rect","This is a multiline\ntextbutton with\nround corners",undefined,200,300,150,60,buttonTextStyles,buttonRoundStyles,shadeLightRoundStyles,shadeDarkRoundStyles,1);
44 buttonMoveVertex = new switchbutton("buttonMoveVertex","imagebuttons",imageButtonPressed,"rect",undefined,"moveVertex",300,150,20,20,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
45 ellipseButton = new switchbutton("ellipseButton","imagebuttons",imageButtonPressed,"ellipse",undefined,"moveVertex",350,145,25,25,buttonTextStyles,buttonStyles,shadeLightStyles,shadeDarkStyles,1);
47 function buttonPressed(buttonId,evt,textVal) {
48 statusChange("button with id '"+buttonId+"' and text value of '"+textVal+"' was pressed");
49 if (buttonId == "textbutton3") {
50 if (textbutton2.activated) {
51 textbutton2.deactivate();
52 textbutton3.setTextValue("Activate Button 2");
54 else {
55 textbutton2.activate();
56 textbutton3.setTextValue("Deactivate Button 2");
59 if (buttonId == "textbutton5") {
60 textbutton1.removeButton();
61 textbutton5.deactivate();
63 if (buttonId == "textbutton6") {
64 if (textbutton4.getSwitchValue()) {
65 textbutton4.setSwitchValue(false,true);
67 else {
68 textbutton4.setSwitchValue(true,true);
72 function switchButtonPressed(buttonId,evt,onOrOff,buttonText) {
73 if (buttonId == "textbutton4") {
74 if (onOrOff) {
75 textbutton4.setTextValue("Switch Button off");
76 textbutton6.setTextValue("Switch Button 4 off");
78 else {
79 textbutton4.setTextValue("Switch Button on");
80 textbutton6.setTextValue("Switch Button 4 on");
84 function imageButtonPressed(buttonId,evt,onOrOff) {
85 if (onOrOff) {
86 statusChange("button with id '"+buttonId+"' was turned on, evt.type="+evt.type);
88 else {
89 statusChange("button with id '"+buttonId+"' was turned off, evt.type="+evt.type);
92 ]]></script>
93 <defs>
94 <symbol id="moveVertex" overflow="visible">
95 <g transform="scale(1.25)">
96 <line x1="0" y1="0" x2="3" y2="7" stroke="black" stroke-width="1.75"/>
97 <path fill-rule="evenodd" fill="white" stroke="black" stroke-width="1"
98 d="M-3 -7L-3 3L0 0L4.25 -0.5z"/>
99 </g>
100 </symbol>
101 </defs>
102 <rect x="-1000" y="-1000" width="3000" height="3000" fill="burlywood" stroke="none"/>
103 <g id="textbuttons"/>
104 <g id="imagebuttons" />
105 <text id="statusText" x="100" y="210" xml:space="preserve">StatusText</text>
106 <text onclick="var newWidth = 140+Math.random()*50;var newHeight = 50+Math.random()*50;textbutton7.resize(newWidth,newHeight)" x="430" y="320" xml:space="preserve">Click this text to randomly resize the multiline textbutton (textbutton7)</text>
107 <text onclick="var x = 175+Math.random()*50;var y = 275+Math.random()*50;textbutton7.moveTo(x,y)" x="430" y="340" xml:space="preserve">Click this text to randomly reposition the multiline textbutton (textbutton7)</text>
108 </svg>