From svnnotify @ sourceforge.jp Tue Jun 1 22:51:00 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 01 Jun 2010 22:51:00 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODY4XSAgYXBwbHnjg6E=?= =?utf-8?b?44K944OD44OJ44KEY2FsbOODoeOCveODg+ODieOBruW8leaVsOOCkuecgQ==?= =?utf-8?b?55Wl44GZ44KL44GT44Go44Gn44CB6Lu96YeP5YyW44KS5Zuz44Gj44Gf?= Message-ID: <1275400260.945133.27622.nullmailer@users.sourceforge.jp> Revision: 1868 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1868 Author: dhrname Date: 2010-06-01 22:51:00 +0900 (Tue, 01 Jun 2010) Log Message: ----------- applyメソッドやcallメソッドの引数を省略することで、軽量化を図った Modified Paths: -------------- branches/06x/061/org/w3c/core.js branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/core.js =================================================================== --- branches/06x/061/org/w3c/core.js 2010-05-31 14:51:15 UTC (rev 1867) +++ branches/06x/061/org/w3c/core.js 2010-06-01 13:51:00 UTC (rev 1868) @@ -471,7 +471,7 @@ *文字データ。Textノードなどの元となる。削除不可。 */ function CharacterData(){ - Node.apply(this, arguments); + Node.apply(this); this.length = 0; }; CharacterData.prototype = new Node(); //ノードのプロトタイプチェーンを作って、継承 @@ -521,8 +521,9 @@ *属性ノード。削除不可。 */ function Attr() { - Node.apply(this, arguments); + Node.apply(this); this.nodeType = Node.ATTRIBUTE_NODE; + delete this._capter; return this; }; Attr.prototype = new Node(); //ノードのプロトタイプチェーンを作って、継承 @@ -532,7 +533,7 @@ *要素ノード。削除不可。 */ function Element() { - Node.apply(this, arguments); + Node.apply(this); this.nodeType = Node.ELEMENT_NODE; this.nodeValue = null; this.attributes = new NamedNodeMap(); //属性を収納 Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-05-31 14:51:15 UTC (rev 1867) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-01 13:51:00 UTC (rev 1868) @@ -130,7 +130,7 @@ *すべてのSVG関連要素の雛形となるオブジェクト */ function SVGElement() { - Element.call(this, arguments); + Element.call(this); /*String*/ this.id = null; //id属性の値 /*String*/ this.xmlbase = null; //xml:base属性の値 /*SVGSVGElement*/ this.ownerSVGElement; //ルート要素であるsvg要素 @@ -1940,7 +1940,7 @@ }; function SVGPathElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); //interface SVGAnimatedPathData /*readonly SVGPathSegList*/ this.animatedPathSegList = this.pathSegList = new SVGPathSegList(); @@ -2409,7 +2409,7 @@ }; function SVGRectElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); /*readonly SVGAnimatedLength*/ this.x = new SVGAnimatedLength(); /*readonly SVGAnimatedLength*/ this.y = new SVGAnimatedLength(); @@ -2481,7 +2481,7 @@ SVGRectElement.prototype = new SVGElement(); function SVGCircleElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); /*readonly SVGAnimatedLength*/ this.cx = new SVGAnimatedLength(); /*readonly SVGAnimatedLength*/ this.cy = new SVGAnimatedLength(); @@ -2532,7 +2532,7 @@ SVGCircleElement.prototype = new SVGElement(); function SVGEllipseElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); /*readonly SVGAnimatedLength*/ this.cx = new SVGAnimatedLength(); /*readonly SVGAnimatedLength*/ this.cy = new SVGAnimatedLength(); @@ -2584,7 +2584,7 @@ SVGEllipseElement.prototype = new SVGElement(); function SVGLineElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); /*readonly SVGAnimatedLength*/ this.x1 = new SVGAnimatedLength(); /*readonly SVGAnimatedLength*/ this.y1 = new SVGAnimatedLength(); @@ -2633,7 +2633,7 @@ SVGLineElement.prototype = new SVGElement(); function SVGPolylineElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); //interface SVGAnimatedPoints /*readonly SVGPointList*/ this.animatedPoints = this.points = new SVGPointList(); @@ -2690,7 +2690,7 @@ SVGPolylineElement.prototype = new SVGElement(); function SVGPolygonElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); this._tar = document.createElement("v:shape"); //interface SVGAnimatedPoints /*readonly SVGPointList*/ this.animatedPoints = this.points = new SVGPointList(); @@ -2747,7 +2747,7 @@ SVGPolygonElement.prototype = new SVGElement(); function SVGTextContentElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); /*readonly SVGAnimatedLength*/ this.textLength = new SVGAnimatedLength(); /*readonly SVGAnimatedEnumeration*/ this.lengthAdjust = new SVGAnimatedEnumeration(SVGTextContentElement.LENGTHADJUST_UNKNOWN); this.addEventListener("DOMNodeInserted", function(evt){ @@ -2934,7 +2934,7 @@ }; function SVGTextPositioningElement() { - SVGTextContentElement.apply(this, arguments); + SVGTextContentElement.apply(this); /*readonly SVGAnimatedLengthList*/ this.x = new SVGAnimatedLengthList(); /*readonly SVGAnimatedLengthList*/ this.y = new SVGAnimatedLengthList(); /*readonly SVGAnimatedLengthList*/ this.dx = new SVGAnimatedLengthList(); @@ -2990,7 +2990,7 @@ SVGTextPositioningElement.prototype = new SVGTextContentElement(); function SVGTextElement() { - SVGTextPositioningElement.apply(this, arguments); + SVGTextPositioningElement.apply(this); this._tar = document.createElement("v:group"); this.addEventListener("DOMNodeInserted", function(evt){ if (evt.eventPhase === Event.BUBBLING_PHASE) { From svnnotify @ sourceforge.jp Tue Jun 1 23:18:53 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 01 Jun 2010 23:18:53 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODY5XQ==?= Message-ID: <1275401933.508654.1655.nullmailer@users.sourceforge.jp> Revision: 1869 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1869 Author: dhrname Date: 2010-06-01 23:18:53 +0900 (Tue, 01 Jun 2010) Log Message: ----------- Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-01 13:51:00 UTC (rev 1868) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-01 14:18:53 UTC (rev 1869) @@ -286,7 +286,13 @@ if (tar.parentNode) { var evtt = tar.ownerDocument.createEvent("MutationEvents"); evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null); - tar.dispatchEvent(evtt); //描画を開始するために、dispatchEventメソッドを使う + evtt.target = tar; + var tce = tar._capter; //tceは登録しておいたリスナーのリスト + for (var j=0,tcli=tce.length;j Revision: 1870 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1870 Author: dhrname Date: 2010-06-01 23:40:05 +0900 (Tue, 01 Jun 2010) Log Message: ----------- 正規表現をfunctionの外に置いて、オブジェクトの効率化を図った Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-01 14:18:53 UTC (rev 1869) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-01 14:40:05 UTC (rev 1870) @@ -1953,6 +1953,7 @@ /*readonly SVGPathSegList*/ this.animatedNormalizedPathSegList = this.normalizedPathSegList = new SVGPathSegList(); /*readonly SVGAnimatedNumber*/ this.pathLength = new SVGAnimatedNumber(); //以下は、d属性に変更があった場合の処理 + var ra = /\-/g, rb = /,/g, rc = /([a-yA-Y])/g, rd = /([zZ])/g, re = /,/, sgs = /\S+/g; this.addEventListener("DOMAttrModified", function(evt){ var tar = evt.target; if (evt.attrName === "d" && evt.newValue !== ""){ @@ -1966,14 +1967,14 @@ *D = [["M", 20, 30], ["L", 20 40]] */ var dd = evt.newValue - .replace(/\-/g, " -") - .replace(/,/g, " ") - .replace(/([a-yA-Y])/g, ",$1 ") - .replace(/([zZ])/g, ",$1 1") - .replace(/,/, "") + .replace(ra, " -") + .replace(rb, " ") + .replace(rc, ",$1 ") + .replace(rd, ",$1 1") + .replace(re, "") .split(","); for (var i=0, dli=dd.length;i Revision: 1871 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1871 Author: dhrname Date: 2010-06-01 23:40:22 +0900 (Tue, 01 Jun 2010) Log Message: ----------- Modified Paths: -------------- branches/06x/061/org/w3c/dom/events.js Modified: branches/06x/061/org/w3c/dom/events.js =================================================================== --- branches/06x/061/org/w3c/dom/events.js 2010-06-01 14:40:05 UTC (rev 1870) +++ branches/06x/061/org/w3c/dom/events.js 2010-06-01 14:40:22 UTC (rev 1871) @@ -139,7 +139,7 @@ /*最初に捕獲フェーズでDOMツリーを下っていき、イベントのターゲットについたら、 *そこで、浮上フェーズとして折り返すように、反復処理をおこなう */ - for (var i=0, n=1, sli = s.length;i Revision: 1872 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1872 Author: dhrname Date: 2010-06-02 19:48:31 +0900 (Wed, 02 Jun 2010) Log Message: ----------- getPropertyCSSValueメソッドの効率化 Modified Paths: -------------- branches/06x/061/org/w3c/dom/css.js Modified: branches/06x/061/org/w3c/dom/css.js =================================================================== --- branches/06x/061/org/w3c/dom/css.js 2010-06-01 14:40:22 UTC (rev 1871) +++ branches/06x/061/org/w3c/dom/css.js 2010-06-02 10:48:31 UTC (rev 1872) @@ -269,7 +269,12 @@ *プロパティを宣言内で、明示的に設定。継承は無視する */ /*void*/ setProperty : function( /*string*/ propertyName, /*string*/ value, /*string*/ priority) { - var tg = this.getPropertyCSSValue(propertyName), cssText = ""; + var cssText = ""; + if (!!this[propertyName]) { + var tg = this.getPropertyCSSValue(propertyName); + } else { + var tg = null; + } cssText += propertyName; cssText += ":"; cssText += value; @@ -283,6 +288,7 @@ //_numプロパティはremovePropertyメソッドで利用する ti._num = this._list.length; this._list[ti._num] = ti; + this[propertyName] = 1; ++this.length; } cssText = null; From svnnotify @ sourceforge.jp Wed Jun 2 20:03:48 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 02 Jun 2010 20:03:48 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODczXSAgR2V0U1ZHRG9j?= =?utf-8?b?dW1lbnTjga5YTUzjg5Hjg7zjgrXjga7nlJ/miJDjgpLlirnnjofljJY=?= Message-ID: <1275476628.943165.9961.nullmailer@users.sourceforge.jp> Revision: 1873 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1873 Author: dhrname Date: 2010-06-02 20:03:48 +0900 (Wed, 02 Jun 2010) Log Message: ----------- GetSVGDocumentのXMLパーサの生成を効率化 Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-02 10:48:31 UTC (rev 1872) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-02 11:03:48 UTC (rev 1873) @@ -1302,10 +1302,9 @@ /*responseXMLを使うと、時々、空のデータを返すことがあるため(原因は不明)、 *ここでは、responseTextを用いる */ - var doc = new ActiveXObject("MSXML2.DomDocument"); var dew = new Date(); str = xmlhttp.responseText.replace(/!DOCTYPE/,"!--").replace(/(dtd">|\]>)/,"-->"); - doc.loadXML(str); + NAIBU.doc.loadXML(str); var s = DOMImplementation.createDocument("http://www.w3.org/2000/svg", "svg"); var tar = s.documentElement; tar.viewport.top = 0; @@ -1321,14 +1320,14 @@ tar.setAttributeNS(null, "height", objh); tar.viewport.height = tar.height.baseVal.value; } - var fi = doc.documentElement.firstChild, n; - var attr = doc.documentElement.attributes, att; + var fi = NAIBU.doc.documentElement.firstChild, n; + var attr = NAIBU.doc.documentElement.attributes, att; /*ルート要素のNamedNodeMapを検索する*/ for (var i=0,atli=attr.length;i Revision: 1874 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1874 Author: dhrname Date: 2010-06-02 21:47:29 +0900 (Wed, 02 Jun 2010) Log Message: ----------- 0.60統合 Modified Paths: -------------- trunk/sie.js Property Changed: ---------------- trunk/sie.js Modified: trunk/sie.js =================================================================== --- trunk/sie.js 2010-06-02 11:03:48 UTC (rev 1873) +++ trunk/sie.js 2010-06-02 12:47:29 UTC (rev 1874) @@ -45,7 +45,7 @@ //これを頭に付けたら、内部処理用 var NAIBU = {}; SIE = { - version : 0.58 + version : 0.60 }; //documentを速くするために /*@cc_on _d=document;eval('var document=_d')@*/ @@ -490,7 +490,7 @@ tts.height = "0px"; this.paint.fset(w,h,ttm); //以下は、テキストの幅であるtextLengthを算出する - var arr = this.tspan, textLength = 0, fontSize = this.paint.fontSize, atfontSize = 0, fij = /[fijlt.,:;1]/g; //fontSizeは親要素の文字サイズ。atfontSizeは各span要素のサイズ。 + var arr = this.tspan, textLength = 0, fontSize = this.paint.fontSize, atfontSize = 0, fij = /[fijlt.,:;1\-]/g; //fontSizeは親要素の文字サイズ。atfontSizeは各span要素のサイズ。 for (var i=0,s={dx:0,dy:0},arri=arr.length;i 3) { //MoveToが複数の座標ならば、2番目以降の座標ペアをLineToとして処理 F.splice(3, 0, "l"); } - rx = ry = null; + Fli = rx = ry = null; } dat += F.join(" "); com = F = null; @@ -761,7 +761,7 @@ ele.path = dat + " e"; ele.coordsize = w + " " + h; this.paint.set(w, h, ttm); - ele = dat = this.paint = ttm = this.transformable = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = w = h = null; //解放 + i = dli = dili = j = ele = dat = this.paint = ttm = this.transformable = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = w = h = null; //解放 }; })(); //QからCに変換 @@ -769,7 +769,7 @@ F[0] = "c"; for (var i = 1; i < F.length; i += 6) { var x1 = F[i], y1 = F[i+1], x2 = F[i+2], y2 = F[i+3]; - F.splice(i, 2, (x + 2 * x1) / 3, (y + 2 * y1) / 3, (2 * x1 + x2) / 3, (2 * y1 + y2) / 3); + F.splice(i, 2, (x + 2*x1) / 3, (y + 2*y1) / 3, (2*x1 + x2) / 3, (2*y1 + y2) / 3); x = x2; y = y2; } return F; @@ -1182,7 +1182,7 @@ fillElement.setAttribute("color", this.color(this.fill)); var fillOpacity = this.fillopacity * this.opacity; //opacityを掛け合わせる if (fillOpacity < 1) { - fillElement.setAttribute("opacity", fillOpacity); + fillElement.setAttribute("opacity", fillOpacity+""); } } } catch(e) {stlog.add(e,682); fillElement.on = "true"; @@ -1418,8 +1418,8 @@ ele.setAttribute("color2", color[length-1]); ele.setAttribute("colors", colors.join(",")); // When colors attribute is used, the meanings of opacity and o:opacity2 are reversed. - ele.setAttribute("opacity", opacity[length-1]); - ele.setAttribute("o:opacity2", opacity[0]); + ele.setAttribute("opacity", opacity[length-1]+ ""); + ele.setAttribute("o:opacity2", opacity[0]+ ""); var type = grad.getAttribute("type"), toNumber = this.toNumber; if (type === "gradient") { try { @@ -1536,13 +1536,15 @@ for (var i in this) { var ti = this[i]; if ((typeof ti) === "string") { //string型以外は除く - var sname = i.replace(/\-([a-z])/, "-").replace(/\-/,RegExp.$1.toUpperCase()); + var sname = i.replace(/\-([a-z])/, "-"), s =RegExp.$1.toUpperCase(); + sname = sname.replace(/\-/, s); if (ti === "lr") { ti = "lr-tb"; } else if (ti === "tb") { ti = "tb-rl"; } tst.style[sname] = ti; + sname = s = ti = null; } } } catch(e) {stlog.add(e,1396); return "";} @@ -1978,11 +1980,8 @@ var egbase = ele.getAttribute("xml:base"); if (!egbase) { var ep = ele.parentNode, b = null; - while(!b && ep.tagName === "group") { + while (!b && ep.tagName === "group") { b = ep.getAttribute("xml:base"); - if (b) { - break; - } ep = ep.parentNode; } base = b; @@ -1990,16 +1989,16 @@ if (href.indexOf("#") !== 0) { //href属性において#が一番につかない場合 var lh = location.href; base = lh.replace(/\/[^\/]+?$/,"/"); //URIの最後尾にあるファイル名は消す。例: /n/sie.js -> /n/ - } else{ + } else { base = location.href; } } - } else{ - base = egbase; + } else { + base = egbase; } if (href.indexOf(":") === -1) { this.base = base; - } else{ + } else { this.base =""; } this.href = href; @@ -2034,7 +2033,7 @@ } if (this.title) { var node = this.tar.firstChild; - while(node) { + while (node) { if (node.nodeType === 1) { node.setAttribute("title", this.title); } Property changes on: trunk/sie.js ___________________________________________________________________ Modified: svn:mergeinfo - /branches/04x/040/sie.js:812-829 /branches/04x/041/sie.js:891-923 /branches/04x/042/sie.js:927-967 /branches/04x/043/sie.js:969-1013 /branches/04x/044/sie.js:1015-1067 /branches/04x/045/sie.js:1069-1078 /branches/04x/046/sie.js:1080-1129 /branches/04x/047/sie.js:1131-1164 /branches/04x/048/sie.js:1166-1180 /branches/04x/sie.js:830-1181 /branches/05x/050/sie.js:1183-1201 /branches/05x/051/sie.js:1207-1323 /branches/05x/052/sie.js:1325-1352 /branches/05x/053/sie.js:1354-1400 /branches/05x/054/sie.js:1403-1422 /branches/05x/055/sie.js:1424-1454 /branches/05x/056/sie.js:1456-1491 /branches/05x/057/sie.js:1496-1523 /branches/05x/058/sie.js:1526-1590 /branches/05x/sie.js:1183-1594 + /branches/04x/040/sie.js:812-829 /branches/04x/041/sie.js:891-923 /branches/04x/042/sie.js:927-967 /branches/04x/043/sie.js:969-1013 /branches/04x/044/sie.js:1015-1067 /branches/04x/045/sie.js:1069-1078 /branches/04x/046/sie.js:1080-1129 /branches/04x/047/sie.js:1131-1164 /branches/04x/048/sie.js:1166-1180 /branches/04x/sie.js:830-1181 /branches/05x/050/sie.js:1183-1201 /branches/05x/051/sie.js:1207-1323 /branches/05x/052/sie.js:1325-1352 /branches/05x/053/sie.js:1354-1400 /branches/05x/054/sie.js:1403-1422 /branches/05x/055/sie.js:1424-1454 /branches/05x/056/sie.js:1456-1491 /branches/05x/057/sie.js:1496-1523 /branches/05x/058/sie.js:1526-1590 /branches/05x/sie.js:1183-1594 /branches/06x/060/sie.js:1603-1850 /branches/06x/sie.js:1599-1873 From svnnotify @ sourceforge.jp Wed Jun 2 23:40:02 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 02 Jun 2010 23:40:02 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODc1XQ==?= Message-ID: <1275489602.290745.4239.nullmailer@users.sourceforge.jp> Revision: 1875 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1875 Author: dhrname Date: 2010-06-02 23:40:02 +0900 (Wed, 02 Jun 2010) Log Message: ----------- Modified Paths: -------------- branches/06x/061/org/w3c/core.js Modified: branches/06x/061/org/w3c/core.js =================================================================== --- branches/06x/061/org/w3c/core.js 2010-06-02 12:47:29 UTC (rev 1874) +++ branches/06x/061/org/w3c/core.js 2010-06-02 14:40:02 UTC (rev 1875) @@ -797,7 +797,7 @@ */ /*Comment*/ Document.prototype.createComment = function( /*string*/ data) { var s = new Comment(); - s.nodeValue = data; + s.data = s.nodeValue = data; s.ownerDocument = this; return s; }; @@ -806,7 +806,7 @@ */ /*CDATASection*/ Document.prototype.createCDATASection = function( /*string*/ data) { var s = new CDATASection(); - s.nodeValue = data; + s.data = s.nodeValue = data; s.ownerDocument = this; return s; }; From svnnotify @ sourceforge.jp Wed Jun 2 23:40:23 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 02 Jun 2010 23:40:23 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODc2XSAgU1ZHU2NyaXB0?= =?utf-8?b?RWxlbWVudOOBruWun+ijhemWi+Wniw==?= Message-ID: <1275489623.862678.4655.nullmailer@users.sourceforge.jp> Revision: 1876 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1876 Author: dhrname Date: 2010-06-02 23:40:23 +0900 (Wed, 02 Jun 2010) Log Message: ----------- SVGScriptElementの実装開始 Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-02 14:40:02 UTC (rev 1875) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-02 14:40:23 UTC (rev 1876) @@ -869,23 +869,31 @@ /*responseXMLを使うと、時々、空のデータを返すことがあるため(原因は不明)、 *ここでは、responseTextを用いる */ - var doc = new ActiveXObject("MSXML2.DomDocument"); - str = xmlhttp.responseText.replace(/!DOCTYPE/,"!--").replace(/(dtd">|\]>)/,"-->"); - doc.loadXML(str); - if (id) { - var ele = doc.getElementById(id); - } else { - var ele = doc.documentElement; - } - tar._instance = tar.ownerDocument.importNode(ele); - var ev = tar.ownerDocument.createEvent("SVGEvents"); - ev.initEvent("SVGLoad", false, false); - ev.target = tar; - tar.dispacthEvent(ev); - ev = null; + /*script要素とstyle要素は、 + *_textプロパティに読み込んだテキストを格納しておく + *それら以外は、_instanceプロパティにDOMツリーを格納しておく + */ + if (tar.localName !== "script" && tar.localName !== "style") { + var doc = new ActiveXObject("MSXML2.DomDocument"); + str = xmlhttp.responseText.replace(/!DOCTYPE/,"!--").replace(/(dtd">|\]>)/,"-->"); + doc.loadXML(str); + if (id) { + var ele = doc.getElementById(id); + } else { + var ele = doc.documentElement; + } + tar._instance = tar.ownerDocument.importNode(ele); + } else { + tar._text = xmlhttp.responseText; + } } else { tar._tar.src = uri; } + var ev = tar.ownerDocument.createEvent("SVGEvents"); + ev.initEvent("SVGLoad", false, false); + ev.target = tar; + tar.dispacthEvent(ev); + ev = null; } } } @@ -3567,9 +3575,39 @@ SVGViewElement.prototype = new SVGElement(); function SVGScriptElement() { - SVGElement.apply(this, arguments); + SVGElement.apply(this); /*DOMString*/ this.type; SVGURIReference.apply(this, arguments); + this.addEventListener("DOMAttrModified", function(evt){ + if (evt.attrName === "type") { + evt.target.type = evt.newValue; + } + }, false); + this.addEventListener("SVGLoad", function(evt){ + var tar = evt.target; + var evtt = this.ownerDocument.createEvent("MutationEvents"); + evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null); + tar.dispatchEvent(evt); + }, false); + this.addEventListener("DOMNodeInserted", function(evt){ + var tar = evt.target; + if (evt.eventPhase === Event.BUBBLING_PHASE) { + if (tar.nodeType === Node.CDATA_SECTION_NODE) { + evt.currentTarget._text = tar.nodeValue; + } + return; + } + tar.addEventListener("DOMNodeInsertedIntoDocument", function(evt){ + var tar = evt.target, script = tar._text; + script = "(function(window, document){" +script; + script += "})(Document.prototype.defaultView, window._document)"; + /*_documentに該当する文書ノードをグローバル変数に入れておいて、後で渡しておく*/ + window._document = tar.ownerDocument; + eval(script); + tar = evt = script = null; + }, false); + tar = evt = null; + }, false); return this; }; SVGScriptElement.constructor = SVGElement; From svnnotify @ sourceforge.jp Thu Jun 3 22:57:17 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 03 Jun 2010 22:57:17 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODc3XSAgU1ZHUHJlc2Vy?= =?utf-8?b?dmVBc3BlY3RSYXRpb+OBruODl+ODreODkeODhuOCo+OBq+OBiuOBhOOBpg==?= =?utf-8?b?44CB6KaP5a6a5YCk44GM44CMdW5rbm93buOAjeOBoOOBo+OBn+OBruOCkg==?= =?utf-8?b?44CBU1ZHMSAuIDHjga7ku5Xmp5jjgavjgYLjgo/jgZvjgovjgojjgYbkv64=?= =?utf-8?b?5q2j?= Message-ID: <1275573437.666304.1493.nullmailer@users.sourceforge.jp> Revision: 1877 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1877 Author: dhrname Date: 2010-06-03 22:57:17 +0900 (Thu, 03 Jun 2010) Log Message: ----------- SVGPreserveAspectRatioのプロパティにおいて、規定値が「unknown」だったのを、SVG1.1の仕様にあわせるよう修正 Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-02 14:40:23 UTC (rev 1876) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-03 13:57:17 UTC (rev 1877) @@ -1637,8 +1637,8 @@ return this; }; function SVGPreserveAspectRatio() { - /*unsigned short*/ this.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN; - /*unsigned short*/ this.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN; + /*unsigned short*/ this.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID; + /*unsigned short*/ this.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET; return this; }; // Alignment Types From svnnotify @ sourceforge.jp Thu Jun 3 23:18:59 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 03 Jun 2010 23:18:59 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODc4XSAgU1ZHVGV4dENv?= =?utf-8?b?bnRlbnRFbGVtZW5044GuZ2V0U3RhcnRQb3NpdGlvbk9mQ2hhcuODoeOCvQ==?= =?utf-8?b?44OD44OJ44Gu44OQ44Kw44KS5L+u5q2j?= Message-ID: <1275574739.775022.32337.nullmailer@users.sourceforge.jp> Revision: 1878 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1878 Author: dhrname Date: 2010-06-03 23:18:59 +0900 (Thu, 03 Jun 2010) Log Message: ----------- SVGTextContentElementのgetStartPositionOfCharメソッドのバグを修正 Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-03 13:57:17 UTC (rev 1877) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-03 14:18:59 UTC (rev 1878) @@ -2916,7 +2916,7 @@ var s = this.ownerDocument.documentElement.createSVGPoint(); s.x = this._list[charnum*3]; s.y = this._list[charnum*3 + 1]; - s.matrixTransform(this.getScreenCTM()); + s = s.matrixTransform(this.getScreenCTM()); return s; } }; From svnnotify @ sourceforge.jp Thu Jun 3 23:33:44 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 03 Jun 2010 23:33:44 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODc5XQ==?= Message-ID: <1275575624.530958.19000.nullmailer@users.sourceforge.jp> Revision: 1879 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1879 Author: dhrname Date: 2010-06-03 23:33:44 +0900 (Thu, 03 Jun 2010) Log Message: ----------- Modified Paths: -------------- branches/06x/061/sie.js Modified: branches/06x/061/sie.js =================================================================== --- branches/06x/061/sie.js 2010-06-03 14:18:59 UTC (rev 1878) +++ branches/06x/061/sie.js 2010-06-03 14:33:44 UTC (rev 1879) @@ -45,7 +45,7 @@ //これを頭に付けたら、内部処理用 var NAIBU = {}; SIE = { - version : 0.60 + version : 0.61 }; //documentを速くするために /*@cc_on _d=document;eval('var document=_d')@*/ From svnnotify @ sourceforge.jp Thu Jun 3 23:50:02 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 03 Jun 2010 23:50:02 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODgwXQ==?= Message-ID: <1275576602.442074.10930.nullmailer@users.sourceforge.jp> Revision: 1880 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1880 Author: dhrname Date: 2010-06-03 23:50:02 +0900 (Thu, 03 Jun 2010) Log Message: ----------- Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js branches/06x/061/sie.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-06-03 14:33:44 UTC (rev 1879) +++ branches/06x/061/org/w3c/dom/svg.js 2010-06-03 14:50:02 UTC (rev 1880) @@ -2806,9 +2806,9 @@ } var kern = "fijlt.,I:;1'-", akern = "a bcdeghknopqsuvxyz"; if (isYokogaki) { - y += fontSize * 0.25; + y += fontSize * 0.2; } else { - x += fontSize * 0.5; + x -= fontSize * 0.5; } while (ti) { if (ti.nodeType === Node.TEXT_NODE) { @@ -2817,23 +2817,23 @@ if (n < ptx.numberOfItems) { x = ptx.getItem(n).value; if (!isYokogaki) { - x += fontSize * 0.5; + x -= fontSize * 0.5; } } else if (n < tx.numberOfItems) { x = tx.getItem(n).value; if (!isYokogaki) { - x += fontSize * 0.5; + x -= fontSize * 0.5; } } if (n < pty.numberOfItems) { y = ptx.getItem(n).value; if (isYokogaki) { - y += fontSize * 0.45; + y += fontSize * 0.2; } } else if (n < ty.numberOfItems) { y = ty.getItem(n).value; if (isYokogaki) { - y += fontSize * 0.45; + y += fontSize * 0.2; } } if (n < ptdx.numberOfItems) { @@ -3048,8 +3048,8 @@ var p = tar.getStartPositionOfChar(i-j); if (!!ti._tar) { var style = ti._tar[i].style; - style.left = parseInt(p.x, 10) - tx + "px"; - style.top = parseInt(p.y, 10) - ty + "px"; + style.left = p.x - tx + "px"; + style.top = p.y - ty + "px"; style.width = "0px"; style.height = "0px"; style.marginTop = tar._isYokogaki ? -n+ "px" : "0px"; Modified: branches/06x/061/sie.js =================================================================== --- branches/06x/061/sie.js 2010-06-03 14:33:44 UTC (rev 1879) +++ branches/06x/061/sie.js 2010-06-03 14:50:02 UTC (rev 1880) @@ -57,7 +57,7 @@ //IEだったらtrueを返す var isMSIE = /*@cc_on!@*/false; //引数にtrueがあれば、例外処理のログを作動させる - stlog = new STLog(false); + stlog = new STLog(true); var ary = document.getElementsByTagName("script"); //全script要素をチェックして、type属性がimage/svg+xmlならば、中身をSVGとして処理する for (var i=0; i < ary.length; i++) { From svnnotify @ sourceforge.jp Mon Jun 7 22:37:02 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Mon, 07 Jun 2010 22:37:02 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODgxXSAwLiA2MOOBrg==?= =?utf-8?b?6KiY6L+w44KS6L+95Yqg?= Message-ID: <1275917822.134801.6366.nullmailer@users.sourceforge.jp> Revision: 1881 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1881 Author: dhrname Date: 2010-06-07 22:37:02 +0900 (Mon, 07 Jun 2010) Log Message: ----------- 0.60の記述を追加 Modified Paths: -------------- trunk/ChangeLog.txt Modified: trunk/ChangeLog.txt =================================================================== --- trunk/ChangeLog.txt 2010-06-03 14:50:02 UTC (rev 1880) +++ trunk/ChangeLog.txt 2010-06-07 13:37:02 UTC (rev 1881) @@ -1,18 +1,25 @@ -?2010-1-26 version 0.58 +?2010-6-8 version 0.60 +ver. 0.58からの変更点 +1, NAIBU.FontStyleオブジェクトのestStyleメソッドを最適化 +2, カーニング対象に「-」の文字を付け加えた +3, fill-opacityに関するバグの修正 +4, NAIBU.XLinkオブジェクトのxml:base属性に関する修正 + +2010-1-26 version 0.58 ver. 0.57からの変更点 -1,SVG FontにおけるSafariの安定化 -2,STObjectオブジェクトを再利用 -3,STPathオブジェクトの高速化 -4,colorメソッドの修正 -5,NAIBU.FontStyleオブジェクトや、NAIBU.PaintColorオブジェクトのコードの整理 -6,try構文を削除するなど見直して高速化 -7,チケット #20295 「SVGFontを使ったとき、text要素の属性が反映されない」を修正 -8,関数NAIBU.transformToCTMの整理 -9,関数_noie_svgfontの代わりに、機能をobjectembedsのreadSvgFontメソッドに集約させる -10,変数documentをページが閉じたときに解放させるようにした +1, SVG FontにおけるSafariの安定化 +2, STObjectオブジェクトを再利用 +3, STPathオブジェクトの高速化 +4, colorメソッドの修正 +5, NAIBU.FontStyleオブジェクトや、NAIBU.PaintColorオブジェクトのコードの整理 +6, try構文を削除するなど見直して高速化 +7, チケット #20295 「SVGFontを使ったとき、text要素の属性が反映されない」を修正 +8, 関数NAIBU.transformToCTMの整理 +9, 関数_noie_svgfontの代わりに、機能をobjectembedsのreadSvgFontメソッドに集約させる +10, 変数documentをページが閉じたときに解放させるようにした 11, SVG Fontにおいて、IEの例外処理に対する対処を追加 -12,変数のブール値変換を行うようにした -13,path要素のd属性のパーサをJSON方式から正規表現方式に切り替えて、高速化した +12, 変数のブール値変換を行うようにした +13, path要素のd属性のパーサをJSON方式から正規表現方式に切り替えて、高速化した 2010-1-9 version 0.57 ver. 0.56からの変更点 From svnnotify @ sourceforge.jp Mon Jun 7 22:37:32 2010 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Mon, 07 Jun 2010 22:37:32 +0900 Subject: [Sie-announce] =?utf-8?b?U0lF44Kz44O844OJIFsxODgyXQ==?= Message-ID: <1275917852.706103.7505.nullmailer@users.sourceforge.jp> Revision: 1882 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1882 Author: dhrname Date: 2010-06-07 22:37:32 +0900 (Mon, 07 Jun 2010) Log Message: ----------- Modified Paths: -------------- trunk/demo.html Modified: trunk/demo.html =================================================================== --- trunk/demo.html 2010-06-07 13:37:02 UTC (rev 1881) +++ trunk/demo.html 2010-06-07 13:37:32 UTC (rev 1882) @@ -1,8 +1,8 @@ ? デモ - SIE - - + + @@ -44,7 +44,7 @@

<html><svg/></html>のような形でSVGを直接HTMLに埋め込みたい方は、「SVG in HTML(not XHTML, plug-in-less) - SIE」のページをご覧下さい。

ホームに戻る

最後に、SourceForge.jpさんに謝意を述べたいと思います。

-
© Copyright 2003 dhr(Eメールでdhrname @ mail.goo.ne.jpSIE 公式WIKI SIE 公式メーリングリスト ブログ(dhrnameの開発日誌))コードの著作権の許諾に関しては、次の文章に書かれています。(英文LICENCE.txt)。このページの許諾に関しても、同様のライセンスが適用されるものとします。
+
© Copyright 2003 dhr(Eメールでsie-developers @ lists.sourceforge.jpSIE 公式WIKI SIE 公式メーリングリスト ブログ(dhrnameの開発日誌))コードの著作権の許諾に関しては、次の文章に書かれています。(英文LICENCE.txt)。このページの許諾に関しても、同様のライセンスが適用されるものとします。