[Sie-announce] SIEコード [2839] textとtspan要素のdisplay、visibility、cursorプロパティに関連したバグを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 7月 31日 (日) 23:15:59 JST


Revision: 2839
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2839
Author:   dhrname
Date:     2011-07-31 23:15:59 +0900 (Sun, 31 Jul 2011)

Log Message:
-----------
textとtspan要素のdisplay、visibility、cursorプロパティに関連したバグを修正

Modified Paths:
--------------
    branches/08x/082/org/w3c/dom/svg.js

Modified: branches/08x/082/org/w3c/dom/svg.js
===================================================================
--- branches/08x/082/org/w3c/dom/svg.js	2011-07-15 11:43:48 UTC (rev 2838)
+++ branches/08x/082/org/w3c/dom/svg.js	2011-07-31 14:15:59 UTC (rev 2839)
@@ -4228,7 +4228,10 @@
           }
         }
       }
-      var color = style.getPropertyValue("fill");
+      var color = style.getPropertyValue("fill"),
+          cursor = style.getPropertyCSSValue("cursor"),
+          vis = style.getPropertyCSSValue("visibility"),
+          disp = style.getPropertyCSSValue("display");
       if (color === "none"){
         tar._tar.style.color = "transparent";
       } else if (color.indexOf("url") === -1) {
@@ -4236,14 +4239,19 @@
       } else {
         tar._tar.style.color = "black";
       }
-      var cursor = style.getPropertyValue("cursor");
-      if (cursor !== "auto" && cursor !== "") {
-        tar._tar.style.cursor = cursor;
+      if (cursor && !cursor._isDefault) { //初期値でないならば
+        var tc = cursor.cssText;
+        el.style.cursor = tc.substring(tc.indexOf(":")+1, tc.length);
+        tc = null;
       }
-      var vis = style.getPropertyValue("visibility");
-      if (vis !== "visiblee") {
-        tar._tar.style.visibility = vis;
+      if (vis && !vis._isDefault) {
+        el.style.visibility = vis.cssText.substring(vis.cssText.indexOf(":")+1, vis.cssText.length);
       }
+       if (disp && !disp._isDefault && (disp.cssText.indexOf("none") > -1)) {
+        el.style.display = "none";
+            } else if (disp && !disp._isDefault) {
+        el.style.display = "block";
+      }
       var isRect = true;
       if (ttp.lastChild) {
         if (ttp.lastChild.nodeName !== "rect") {
@@ -4265,7 +4273,7 @@
       }
       delete tar._cacheMatrix;
       delete tar._currentStyle;
-      isRect = evt = tar = style = tpp = ttpc = null;
+      isRect = evt = tar = style = tpp = ttpc = style = color = cursor = disp = vis = null;
     }, false);
     evt = tar = null;
   },false);




Sie-announce メーリングリストの案内
Back to archive index