From 3d96c2337fc1c68b97f56e96f4f08843fec399b5 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Thu, 11 Feb 2016 13:39:02 -0800 Subject: [PATCH] Revert "feat(svg): Provide support for SVG foreignObject by adding xhtml namespace" This reverts commit eb688f2c8e352558b50d9fdb22ea639dc622d09f. --- .../schema/dom_element_schema_registry.ts | 7 ++---- .../angular2/src/platform/dom/dom_renderer.ts | 7 ++---- .../test/core/linker/integration_spec.ts | 24 ------------------- 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/modules/angular2/src/compiler/schema/dom_element_schema_registry.ts b/modules/angular2/src/compiler/schema/dom_element_schema_registry.ts index 07e5ad9c90..84a9230fe3 100644 --- a/modules/angular2/src/compiler/schema/dom_element_schema_registry.ts +++ b/modules/angular2/src/compiler/schema/dom_element_schema_registry.ts @@ -6,11 +6,8 @@ import {splitNsName} from 'angular2/src/compiler/html_tags'; import {ElementSchemaRegistry} from './element_schema_registry'; -const NAMESPACE_URIS = CONST_EXPR({ - 'xlink': 'http://www.w3.org/1999/xlink', - 'svg': 'http://www.w3.org/2000/svg', - 'xhtml': 'http://www.w3.org/1999/xhtml' -}); +const NAMESPACE_URIS = + CONST_EXPR({'xlink': 'http://www.w3.org/1999/xlink', 'svg': 'http://www.w3.org/2000/svg'}); @Injectable() export class DomElementSchemaRegistry extends ElementSchemaRegistry { diff --git a/modules/angular2/src/platform/dom/dom_renderer.ts b/modules/angular2/src/platform/dom/dom_renderer.ts index b37be36443..d64ce1094e 100644 --- a/modules/angular2/src/platform/dom/dom_renderer.ts +++ b/modules/angular2/src/platform/dom/dom_renderer.ts @@ -28,11 +28,8 @@ import {ViewEncapsulation} from 'angular2/src/core/metadata'; import {DOM} from 'angular2/src/platform/dom/dom_adapter'; import {camelCaseToDashCase} from './util'; -const NAMESPACE_URIS = CONST_EXPR({ - 'xlink': 'http://www.w3.org/1999/xlink', - 'svg': 'http://www.w3.org/2000/svg', - 'xhtml': 'http://www.w3.org/1999/xhtml' -}); +const NAMESPACE_URIS = + CONST_EXPR({'xlink': 'http://www.w3.org/1999/xlink', 'svg': 'http://www.w3.org/2000/svg'}); const TEMPLATE_COMMENT_TEXT = 'template bindings={}'; var TEMPLATE_BINDINGS_EXP = /^template bindings=(.*)$/g; diff --git a/modules/angular2/test/core/linker/integration_spec.ts b/modules/angular2/test/core/linker/integration_spec.ts index d77bc9d1a6..8318aea3a5 100644 --- a/modules/angular2/test/core/linker/integration_spec.ts +++ b/modules/angular2/test/core/linker/integration_spec.ts @@ -1859,30 +1859,6 @@ function declareTests() { }); })); - it('should support foreignObjects', - inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, - async) => { - tcb.overrideView( - MyComp, new ViewMetadata({ - template: - '

Test

' - })) - .createAsync(MyComp) - .then((fixture) => { - var el = fixture.debugElement.nativeElement; - var svg = DOM.childNodes(el)[0]; - var foreignObject = DOM.childNodes(svg)[0]; - var p = DOM.childNodes(foreignObject)[0]; - expect(DOM.getProperty(svg, 'namespaceURI')) - .toEqual('http://www.w3.org/2000/svg'); - expect(DOM.getProperty(foreignObject, 'namespaceURI')) - .toEqual('http://www.w3.org/2000/svg'); - expect(DOM.getProperty(p, 'namespaceURI')) - .toEqual('http://www.w3.org/1999/xhtml'); - - async.done(); - }); - })); }); describe('attributes', () => {