[Sie-announce] SIEコード [2857] 0. 82beta修正バージョン

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2011年 8月 9日 (火) 21:23:16 JST


Revision: 2857
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2857
Author:   dhrname
Date:     2011-08-09 21:23:16 +0900 (Tue, 09 Aug 2011)

Log Message:
-----------
0.82beta修正バージョン

Modified Paths:
--------------
    branches/08x/sie.js

Modified: branches/08x/sie.js
===================================================================
--- branches/08x/sie.js	2011-08-09 12:20:44 UTC (rev 2856)
+++ branches/08x/sie.js	2011-08-09 12:23:16 UTC (rev 2857)
@@ -3983,11 +3983,16 @@
     /*responseXMLを使うと、時々、空のデータを返すことがあるため(原因は不明)、
      *ここでは、responseTextを用いる
      */
-    var ifr = this._tar.previousSibling;
-    ifr.contentWindow.screen.updateInterval = 999;
-    var _doc = ifr.contentWindow.document;
-    _doc.write("");
-    _doc.close(); // これがないと document.body は null になる
+    var ifr = this._tar.previousSibling,
+        _doc;
+    if (ifr.contentWindow) {
+      ifr.contentWindow.screen.updateInterval = 999;
+      _doc = ifr.contentWindow.document;
+      _doc.write("");
+      _doc.close(); // これがないと document.body は null になる
+    } else {        //インラインSVGの場合
+      _doc = document;
+    }
     if (("namespaces" in _doc) && !_doc.namespaces["v"]) {
       _doc.namespaces.add("v","urn:schemas-microsoft-com:vml");
       _doc.namespaces.add("o","urn:schemas-microsoft-com:office:office");
@@ -4016,7 +4021,10 @@
           oba = _doc.createElement("div"); //obaはradialGradient要素で使う
     oba.setAttribute("id","_NAIBU_outline");
     _doc.body.appendChild(oba);
-    _doc.body.style.backgroundColor = objei.parentNode.currentStyle.backgroundColor;
+    sp.style.margin = "-2px,-0px,0px,-2px"
+    if (ifr.contentWindow) {
+       _doc.body.style.backgroundColor = objei.parentNode.currentStyle.backgroundColor;
+    }
     s._document_ = _doc; //_document_プロパティはradialGradient要素やNAIBU._setPaintなどで使う
     ndoc.async = false;
     /*下記のプロパティについては、Microsoftのサイトを参照
@@ -4078,7 +4086,11 @@
     dcp.style.height = tview.height+ "px";
     dcp.coordsize = tview.width+ " " +tview.height;
     sp.appendChild(dcp);
-    _doc.body.appendChild(sp);
+    if (ifr.contentWindow) {
+      _doc.body.appendChild(sp);
+    } else {
+      this._tar.parentNode.insertBefore(sp, this._tar);
+    }
     dcp.appendChild(sdt);
     while (fi) { //子ノードを検索して、子供がいれば、importNodeメソッドを再帰的に実行する
       n = s.importNode(fi, true);
@@ -4164,7 +4176,7 @@
     /*IEのメモリリーク対策として、空関数を入力*/
     this.xmlhttp.onreadystatechange = NAIBU.emptyFunction;
     if (this._next) {
-      ifr.contentWindow.screen.updateInterval = 0;
+      ifr.contentWindow && (ifr.contentWindow.screen.updateInterval = 0);
       ifr = s = null;
       this._next._init();
     } else {
@@ -6494,7 +6506,7 @@
             sty.top = p.y + "px";
             sty.width = "0px";
             sty.height = "0px";
-            sty.marginTop = tar._isYokogaki ? -n-10+ "px" : "-10px";
+            sty.marginTop = tar._isYokogaki ? -n-5+ "px" : "-5px";
             sty.lineHeight = n+10+ "px";
             ttp.appendChild(ti._tars[ij]);
             sty = p = null;
@@ -6523,26 +6535,27 @@
       var color = style.getPropertyValue("fill"),
           cursor = style.getPropertyCSSValue("cursor"),
           vis = style.getPropertyCSSValue("visibility"),
-          disp = style.getPropertyCSSValue("display");
+          disp = style.getPropertyCSSValue("display"),
+          tts = tar._tar.style;
       if (color === "none"){
-        tar._tar.style.color = "transparent";
+        tts.color = "transparent";
       } else if (color.indexOf("url") === -1) {
-        tar._tar.style.color = color;
+        tts.color = color;
       } else {
-        tar._tar.style.color = "black";
+        tts.color = "black";
       }
       if (cursor && !cursor._isDefault) { //初期値でないならば
         var tc = cursor.cssText;
-        el.style.cursor = tc.substring(tc.indexOf(":")+1, tc.length);
+        tts.cursor = tc.substring(tc.indexOf(":")+1, tc.length);
         tc = null;
       }
       if (vis && !vis._isDefault) {
-        el.style.visibility = vis.cssText.substring(vis.cssText.indexOf(":")+1, vis.cssText.length);
+        tts.visibility = vis.cssText.substring(vis.cssText.indexOf(":")+1, vis.cssText.length);
       }
        if (disp && !disp._isDefault && (disp.cssText.indexOf("none") > -1)) {
-        el.style.display = "none";
+        tts.display = "none";
             } else if (disp && !disp._isDefault) {
-        el.style.display = "block";
+        tts.display = "block";
       }
       var isRect = true;
       if (ttp.lastChild) {




Sie-announce メーリングリストの案内
アーカイブの一覧に戻る