svnno****@sourc*****
svnno****@sourc*****
2011年 4月 26日 (火) 20:25:26 JST
Revision: 2627
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2627
Author: dhrname
Date: 2011-04-26 20:25:25 +0900 (Tue, 26 Apr 2011)
Log Message:
-----------
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-24 12:57:28 UTC (rev 2626)
+++ branches/07x/076/org/w3c/dom/svg.js 2011-04-26 11:25:25 UTC (rev 2627)
@@ -718,6 +718,9 @@
_parseInt,
r, g, b,
c;
+ if (!rgbColor) {
+ throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR);
+ }
rgbColor = this._keywords[rgbColor] || rgbColor;
if (rgbColor.indexOf("%", 5) > 0) { // %を含むrgb形式の場合
rgbColor = rgbColor.replace(this._regDP, function(s) {
@@ -743,7 +746,7 @@
s = rgbColor.match(this._regD);
if (!!!s) { //数値が含まれていなければ強制的に終了
rgbColor = null;
- return;
+ throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR);
}
}
this.rgbColor.red.cssText = s[0];