[Sie-announce] SIEコード [2615] SVGColorのsetRGBColorメソッドの整理

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 4月 19日 (火) 21:06:26 JST


Revision: 2615
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2615
Author:   dhrname
Date:     2011-04-19 21:06:26 +0900 (Tue, 19 Apr 2011)

Log Message:
-----------
SVGColorのsetRGBColorメソッドの整理

Modified Paths:
--------------
    branches/07x/076/org/w3c/dom/svg.js

Modified: branches/07x/076/org/w3c/dom/svg.js
===================================================================
--- branches/07x/076/org/w3c/dom/svg.js	2011-04-19 11:59:46 UTC (rev 2614)
+++ branches/07x/076/org/w3c/dom/svg.js	2011-04-19 12:06:26 UTC (rev 2615)
@@ -711,14 +711,11 @@
 /*readonly unsigned short*/ SVGColor.prototype.colorType = /*SVGColor.SVG_COLORTYPE_UNKNOWN*/ 0;
 /*readonly SVGICCColor*/    SVGColor.prototype.iccColor = null;
 /*void*/ SVGColor.prototype.setRGBColor = function(/*DOMString*/ rgbColor ){
-  var tkr = this._keywords[rgbColor],
-      s,
+  var s,
       _parseInt,
       r, g, b,
       c;
-  if (tkr !== void 0) {
-    rgbColor = tkr;
-  }
+  rgbColor = this._keywords[rgbColor] || rgbColor;
   if (rgbColor.indexOf("%", 5) > 0) {      // %を含むrgb形式の場合
     rgbColor = rgbColor.replace(/[\d.]+%/g, function(s) {
       return Math.round((2.55 * parseFloat(s)));
@@ -749,7 +746,7 @@
   this.rgbColor.red.cssText = s[0];
   this.rgbColor.green.cssText = s[1];
   this.rgbColor.blue.cssText = s[2];
-  rgbColor = tkr = s = _parseInt = null;
+  rgbColor = s = _parseInt = null;
 };
 
 //                    raises( SVGException );




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