From b22a4452543744b316167725d9eda40dc8d34ff5 Mon Sep 17 00:00:00 2001 From: Kent Tamura Date: Tue, 30 Jan 2018 01:47:51 -0800 Subject: [PATCH] custom-elements: document.createElementNS() should set prefixes to custom elements. We had a bug that createElementNS() ignored prefixes. New behavior matches to the specification and Firefox. * Document-createElementNS.html: Fix a copypasta error. * ScriptCustomElementDefinition::CreateElementSync: Implement Step 6.1.10. * Document::createElementNS: Fix an argument of definition lookup. * CustomElement::CreateUndefinedElement: Use Document::CreateRawElement(), which sets prefixes correctly, instead of HTMLElementFactory::createHTMLElement(). * ustomElementDefinition::CreateElementAsync: Use Document::CreateRawElement(), which sets prefixes correctly, instead of HTMLElementFactory::createRawHTMLElement(). Bug: 806639 Change-Id: I74b431d4475d7cf84f65ab0ff1b24773cbc64079 Reviewed-on: https://chromium-review.googlesource.com/892802 Reviewed-by: Yoshifumi Inoue Commit-Queue: Kent Tamura Cr-Commit-Position: refs/heads/master@{#532821} --- custom-elements/Document-createElementNS.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-elements/Document-createElementNS.html b/custom-elements/Document-createElementNS.html index b82611af57415e..5711a469129091 100644 --- a/custom-elements/Document-createElementNS.html +++ b/custom-elements/Document-createElementNS.html @@ -28,7 +28,7 @@ customElements.define('my-builtin', MyBuiltinElement, { extends: 'address' }); let element = document.createElementNS('http://www.w3.org/1999/xhtml', 'p:address', { is: 'my-builtin'}); - assert_true(element instanceof MyElement); + assert_true(element instanceof MyBuiltinElement); assert_equals(element.prefix, 'p'); }, 'builtin: document.createElementNS should create custom elements with prefixes.');