svnno****@sourc*****
svnno****@sourc*****
2011年 5月 24日 (火) 20:33:24 JST
Revision: 2701
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2701
Author: dhrname
Date: 2011-05-24 20:33:24 +0900 (Tue, 24 May 2011)
Log Message:
-----------
NAIBU._setPaint関数において、CSSのデフォルト値かどうかをチェックする方法を、擬似的な匿名プロパティの方式に切り替えた
Modified Paths:
--------------
branches/07x/078/org/w3c/dom/css.js
branches/07x/078/org/w3c/dom/svg.js
Modified: branches/07x/078/org/w3c/dom/css.js
===================================================================
--- branches/07x/078/org/w3c/dom/css.js 2011-05-24 11:19:24 UTC (rev 2700)
+++ branches/07x/078/org/w3c/dom/css.js 2011-05-24 11:33:24 UTC (rev 2701)
@@ -379,7 +379,8 @@
CSSValue.CSS_CUSTOM = 3;
CSSValue.prototype = {
cssText : "",
- cssValueType : CSSValue.CSS_CUSTOM
+ cssValueType : CSSValue.CSS_CUSTOM,
+ _isDefault : 0 //デフォルトであるかどうか(独自のプロパティ)
};
function CSSPrimitiveValue() {
Modified: branches/07x/078/org/w3c/dom/svg.js
===================================================================
--- branches/07x/078/org/w3c/dom/svg.js 2011-05-24 11:19:24 UTC (rev 2700)
+++ branches/07x/078/org/w3c/dom/svg.js 2011-05-24 11:33:24 UTC (rev 2701)
@@ -2582,18 +2582,18 @@
} else {
el.stroked = "false";
}
- cursor = style.getPropertyValue("cursor");
- if (cursor !== "auto" && cursor !== "") {
+ cursor = style.getPropertyCSSValue("cursor");
+ if (cursor && !cursor._isDefault) { //初期値でないならば
el.style.cursor = cursor;
}
- vis = style.getPropertyValue("visibility");
- if (vis !== "visiblee") { //初期値でないならば
+ vis = style.getPropertyCSSValue("visibility");
+ if (vis && !vis._isDefault) {
el.style.visibility = vis;
}
- disp = style.getPropertyValue("display");
- if (disp === "none") {
+ disp = style.getPropertyCSSValue("display");
+ if (disp && !disp._isDefault && (disp === "none")) {
el.style.display = "none";
- } else if (disp !== "inline-block") {
+ } else if (disp && !disp._isDefault && (disp !== "inline-block")) {
el.style.display = "inline-block";
}
tod = el = fill = stroke = sp = fp = style = cursor = tar = matrix = vis = disp = num = null;
@@ -5968,6 +5968,7 @@
t = t.replace(regm, u);
s.setProperty(t, CSS2Properties[i]);
slis[t] = slis[n]; //この処理はCSSモジュールのgetComputedStyleメソッドのため
+ slis[n]._isDefault = 1;
++n;
i = t = u = null;
}