From 74256607ffbe574c09cbcb81c96319d8689e2bd6 Mon Sep 17 00:00:00 2001 From: dhrname Date: Thu, 9 May 2013 23:42:10 +0900 Subject: [PATCH] =?utf8?q?HTML=E3=81=AE=E5=AE=9F=E8=A3=85=E3=82=92?= =?utf8?q?=E9=96=8B=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- org/w3c/dom/svg.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 2.11.0