Re: SVG BUGS with Chrome 48.0
| Newsgroups | gmane.text.xml.svg.devel |
|---|---|
| Message-ID | <1586297157.28984070.1453964308017.JavaMail.root@zimbra59-e10.priv.proxad.net> |
Hi Joseph, I don't know for the first one, but for the second you can read this and re= solve it : https://github.com/progers/pathseg Yannick ----- Mail original ----- De: "[email protected] [svg-developers]" <[email protected]= m> =C3=80: [email protected] Envoy=C3=A9: Mercredi 27 Janvier 2016 22:43:16 Objet: [svg-developers] SVG BUGS with Chrome 48.0 Hi,=20 The latest version of Chromium I have (Chrome Version 48.0.2564.82 Ubuntu 1= 4.04) on Ubuntu is very unstable with SVG.=20 I found two major bugs in the SVG :=20 1) The getTransformToElement SVGLocatable function is undefined.=20 2) The pathSegList PathElement attribute is null.=20 The last bug is unavoidable.=20 I bring two SVG files that detect these bugs.=20 Green indicates the abscence of the bug.=20 The red color highlights the bug.=20 Did you meet those two bugs ?=20 First one :=20 <svg xmlns=3D"http://www.w3.org/2000/svg" xmlns:xlink=3D"http://www.w3.org/= 1999/xlink" width=3D"840px" height=3D"450px" viewBox=3D"0 0 840 450" preser= veAspectRatio=3D"xMidYMid meet" onload=3D"init(evt);">=20 <g id=3D"e3_group">=20 <rect x=3D"171" y=3D"129" stroke=3D"black" id=3D"e1_rectangle" style=3D"str= oke-width: 1px; vector-effect: non-scaling-stroke;" width=3D"239" height=3D= "102" fill=3D"khaki"/>=20 <text fill=3D"black" x=3D"175" y=3D"255" id=3D"e2_texte" style=3D"font-fami= ly: Arial; font-size: 20px;">?</text>=20 </g>=20 <script type=3D"text/ecmascript"><![CDATA[=20 function init(evt) {=20 try {=20 var r1 =3D document.getElementById("e1_rectangle");=20 var t2 =3D document.getElementById("e2_texte");=20 var g3 =3D document.getElementById("e3_group");=20 // transform matrix from r1 to g3=20 t2.firstChild.data=3Dr1.getTransformToElement(g3);=20 r1.style.setProperty("fill","green");=20 } catch(ex) {=20 // Chrome Version 48.0.2564.82 Ubuntu 14.04=20 // chrome : TypeError: r1.getTransformToElement is not a function=20 t2.firstChild.data=3D"Exception "+ex;=20 r1.style.setProperty("fill","red");=20 }=20 }=20 ]]></script>=20 </svg>=20 Second one :=20 <svg xmlns=3D"http://www.w3.org/2000/svg" xmlns:xlink=3D"http://www.w3.org/= 1999/xlink" width=3D"840px" height=3D"450px" viewBox=3D"0 0 840 450" preser= veAspectRatio=3D"xMidYMid meet" onload=3D"init(evt);&q uot;>=20 <path id=3D"e1_path" d=3D"M100,100h600v100z" />=20 <text fill=3D"black" x=3D"175" y=3D"255" id=3D"e2_texte" style=3D"font-fami= ly: Arial; font-size: 20px;">?</text>=20 <script type=3D"text/ecmascript"><![CDATA[=20 function init(evt) {=20 try {=20 var p1 =3D document.getElementById("e1_path");=20 var t2 =3D document.getElementById("e2_texte");=20 var l =3D p1.pathSegList;=20 t2.firstChild.data=3D"path.pathSegList.numberOfIt ems=3D"+l.numberOfItems;= =20 p1.style.setProperty("fill","green");=20 } catch(ex) {=20 // Chrome Version 48.0.2564.82 Ubuntu 14.04=20 // chrome : TypeError: r1.getTransformToElement is not a function=20 t2.firstChild.data=3D"Exception "+ex;=20 p1.style.setProperty("fill","red");=20 }=20 }=20 ]]></script>=20 </svg>=20 Regards,=20 Joseph=20 ------------------------------------ Posted by: [email protected] ------------------------------------ ----- To unsubscribe send a message to: [email protected]= m -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membe= rship" ----