From: dhrname Date: Thu, 9 May 2013 14:42:10 +0000 (+0900) Subject: HTMLの実装を開始 X-Git-Tag: v16beta~300 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=74256607ffbe574c09cbcb81c96319d8689e2bd6;p=sie%2Fsie.git HTMLの実装を開始 --- diff --git a/org/w3c/dom/svg.js b/org/w3c/dom/svg.js index c4b967e..f0fe7f9 100644 --- a/org/w3c/dom/svg.js +++ b/org/w3c/dom/svg.js @@ -6329,7 +6329,7 @@ function SVGForeignObjectElement(_doc) /*: SVGStylable, SVGTransformable, events::EventTarget*/ { - this._tar = _doc.createElement("div"); + this._tar = _doc.createElement("v:group"); SVGElement.apply(this); var sl = SVGAnimatedLength; /*readonly SVGAnimatedLength*/ this.x = new sl(); @@ -6369,9 +6369,13 @@ function SVGForeignObjectElement(_doc) /*: if ((tar.nodeType === /*Node.ELEMENT_NODE*/ 1) && !tar._tar && tar.namespaceURI ==="http://www.w3.org/1999/xhtml") { if ("html|body|head".indexOf(tar.localName) > -1) { - tar._tar = _doc.createElement("div"); + tar._tar = _doc.createElement("v:group"); } else { tar._tar = _doc.createElement(tar.localName); + if (tar.localName === "div") { + /*v:shape要素が入っていないdiv要素はテキスト処理に使うため、v:shape要素を挿入して回避*/ + tar._tar.appendChild(_doc.createElement("v:shape")); + } } } else if ((tar.nodeType === /*Node.TEXT_NODE*/ 3) && !tar._tar) { tar._tar = _doc.createTextNode(tar.data);