svnno****@sourc*****
svnno****@sourc*****
2011年 1月 3日 (月) 18:44:09 JST
Revision: 2271
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2271
Author: dhrname
Date: 2011-01-03 18:44:09 +0900 (Mon, 03 Jan 2011)
Log Message:
-----------
a要素の対応に関して、SVGTextElementやSVGTextContentElementの修正
Modified Paths:
--------------
branches/06x/067/org/w3c/dom/svg.js
Modified: branches/06x/067/org/w3c/dom/svg.js
===================================================================
--- branches/06x/067/org/w3c/dom/svg.js 2011-01-02 14:14:03 UTC (rev 2270)
+++ branches/06x/067/org/w3c/dom/svg.js 2011-01-03 09:44:09 UTC (rev 2271)
@@ -3451,9 +3451,9 @@
/*Bubblingフェーズの時にはもう、div要素をDOMツリーに挿入しておく必要があるため、
*あらかじめ、Capturingフェーズで処理しておく
*/
- if (tar.localName === "a") {
+ if ((tar.localName === "a") && (tar.namespaceURI === "http://www.w3.org/2000/svg") && tar.firstChild) {
/*a要素の場合はtarをすりかえておく*/
- tar = tar.firstChild ? tar.firstChild : tar;
+ tar = tar.firstChild;
}
if ((evt.eventPhase === Event.CAPTURING_PHASE) && (tar.nodeType === Node.TEXT_NODE) && !!!tar._tars) {
/*Textノードにdiv要素を格納したリストをプロパティとして蓄えておく*/
@@ -3852,6 +3852,10 @@
j = j + ti.getNumberOfChars();
ti = ti.nextSibling;
}
+ } else if ((ti.localName === "a") && (ti.namespaceURI === "http://www.w3.org/2000/svg") && ti.firstChild) {
+ ti = ti.firstChild;
+ } else if (ti.parentNode.localName === "a") {
+ ti = ti.parentNode.nextSibling;
}
}
}