svnno****@sourc*****
svnno****@sourc*****
2010年 9月 10日 (金) 21:25:00 JST
Revision: 1997 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1997 Author: dhrname Date: 2010-09-10 21:25:00 +0900 (Fri, 10 Sep 2010) Log Message: ----------- SVGSetElementオブジェクトの修正によるset要素の実装 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-09-09 13:14:52 UTC (rev 1996) +++ branches/06x/061/org/w3c/dom/svg.js 2010-09-10 12:25:00 UTC (rev 1997) @@ -289,6 +289,7 @@ var evtt = tar.ownerDocument.createEvent("MutationEvents"); evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null); evtt.target = tar; + evtt.eventPhase = Event.AT_TARGET; var tce = tar._capter; //tceは登録しておいたリスナーのリスト for (var j=0,tcli=tce.length;j<tcli;++j){ if (tce[j]) { @@ -1235,6 +1236,9 @@ } tnext = tpar = null; evt.target.addEventListener("DOMAttrModified", function(evt){ + if (evt.eventPhase === Event.BUBBLING_PHASE) { + return; //強制終了させる + } var tar = evt.target; var s = tar.getElementsByTagNameNS("http://www.w3.org/2000/svg", "*"); if (s) { @@ -4240,7 +4244,6 @@ if (nci._end) { if (nci._end <= s && nci.getCurrentTime() !== 0) { nci.endElement(); - nci._currentFrame = 0; nci._end = null; } } @@ -4297,6 +4300,7 @@ var tta = tar.targetElement[attrName]; if (!!tta) { var base = tta.baseVal; + tta.baseVal = tar.ownerDocument.documentElement.createSVGLength(); tar.targetElement.setAttributeNS(null, attrName, tar._to); /*変化値はanimValプロパティに収納しておき、 *変化する前の、元の値はbaseValプロパティに再び収納しておく @@ -4313,10 +4317,10 @@ }, false); this.addEventListener("endEvent", function(evt) { var tar = evt.target, attrName = tar.getAttributeNS(null, "attributeName"), style = tar.ownerDocument.defaultView.getComputedStyle(tar.targetElement, ""); - tar.style.setProperty(attrName, style.getPropertyValue(attrName), null); + tar.targetElement.style.setProperty(attrName, style.getPropertyValue(attrName), null); var evtt = tar.ownerDocument.createEvent("MutationEvents"); evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null); - tar.dispatchEvent(evtt); + tar.targetElement.dispatchEvent(evtt); evtt = null; }, false); this.addEventListener("repeatEvent", function(evt) {