svnno****@sourc*****
svnno****@sourc*****
2011年 11月 12日 (土) 20:21:30 JST
Revision: 3089
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=3089
Author: dhrname
Date: 2011-11-12 20:21:30 +0900 (Sat, 12 Nov 2011)
Log Message:
-----------
opacityプロパティ(属性)に関して、祖先要素に適用できないバグを修正
Modified Paths:
--------------
branches/08x/089/org/w3c/dom/css.js
Modified: branches/08x/089/org/w3c/dom/css.js
===================================================================
--- branches/08x/089/org/w3c/dom/css.js 2011-11-10 14:24:54 UTC (rev 3088)
+++ branches/08x/089/org/w3c/dom/css.js 2011-11-12 11:21:30 UTC (rev 3089)
@@ -703,9 +703,8 @@
};
/*CSSStyleDeclaration*/ ViewCSS.prototype.getComputedStyle = function( /*Element*/ elt, /*string*/ pseudoElt) {
var s = new CSSStyleDeclaration(),
- ct, p, el, eso;
- ct = null
- p = {length:0, _opacity:1, _fontSize:12};
+ el, es,
+ eso = 1;
//クロージャを利用して、カスケーディングを実現する
s.getPropertyCSSValue = (function(elt, td, s){
return function( /*string*/ propertyName) {
@@ -740,15 +739,14 @@
})(elt, this._defaultCSS, s); //_defaultCSSはデフォルト値の設定
el = elt;
while (el) {
- if (!!el.style) {
- eso = el.style._list._opacity || el._attributeStyle._list._opacity;
- } else {
- eso = 1;
+ if (el.style) {
+ es = el.style._list._opacity || el._attributeStyle._list._opacity;
+ eso *= es || 1;
}
+ el = el.parentNode;
}
- s._list._opacity = p._opacity * (eso || 1);
- s._list._fontSize = elt.style && elt.style._list._fontSize;
- pelt = eso = p = void 0;
+ s._list._opacity = eso;
+ el = pelt = eso = es = void 0;
s._document = elt.ownerDocument;
return s;
};