Rename CustomElementsRegistry to CustomElementRegistry
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Aug 2016 19:45:01 +0000 (19:45 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Aug 2016 19:45:01 +0000 (19:45 +0000)
commit0f5292e5311132cb98f3d16b5a046136e4d2250a
tree17d82774b636ae814d7b5ec45d800e13b1cb7ebe
parent10afe83b5721da25dbd9639d46998a743dce81b2
Rename CustomElementsRegistry to CustomElementRegistry
https://bugs.webkit.org/show_bug.cgi?id=161028

Reviewed by Darin Adler.

Source/JavaScriptCore:

Added customElements and CustomElementRegistry to the common identifiers list as they're used on JSDOMWindow
to hide window.customElements and CustomElementRegistry interface behind a runtime flag.

* runtime/CommonIdentifiers.h:

Source/WebCore:

Renamed CustomElementsRegistry to CustomElementRegistry per https://github.com/w3c/webcomponents/issues/548.

Also hide window.customElements and CustomElementRegistry interface behind a runtime enabled.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomElementRegistryCustom.cpp: Renamed from JSCustomElementsRegistryCustom.cpp.
(WebCore::getCustomElementCallback):
(WebCore::JSCustomElementRegistry::define):
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
* dom/CustomElementReactionQueue.cpp:
(WebCore::findInterfaceForCustomElement):
* dom/CustomElementRegistry.cpp: Renamed from CustomElementsRegistry.cpp.
(WebCore::CustomElementRegistry::create):
(WebCore::CustomElementRegistry::CustomElementRegistry):
(WebCore::CustomElementRegistry::~CustomElementRegistry):
(WebCore::CustomElementRegistry::addElementDefinition):
(WebCore::CustomElementRegistry::addUpgradeCandidate):
(WebCore::CustomElementRegistry::findInterface):
(WebCore::CustomElementRegistry::containsConstructor):
* dom/CustomElementRegistry.h: Renamed from CustomElementsRegistry.h.
* dom/CustomElementRegistry.idl: Renamed from CustomElementsRegistry.idl.
* dom/Document.cpp:
(WebCore::createUpgradeCandidateElement):
(WebCore::createHTMLElementWithNameValidation):
(WebCore::createFallbackHTMLElement):
* dom/Element.cpp:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::ensureCustomElementRegistry):
* page/DOMWindow.h:
* page/DOMWindow.idl:

LayoutTests:

Updated the tests and expected results after the rename.

* fast/custom-elements/CustomElementRegistry-expected.txt: Renamed from LayoutTests/fast/custom-elements/CustomElementsRegistry-expected.txt.
* fast/custom-elements/CustomElementRegistry.html: Renamed from LayoutTests/fast/custom-elements/CustomElementsRegistry.html.
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/custom-elements/CustomElementRegistry-expected.txt [moved from LayoutTests/fast/custom-elements/CustomElementsRegistry-expected.txt with 96% similarity]
LayoutTests/fast/custom-elements/CustomElementRegistry.html [moved from LayoutTests/fast/custom-elements/CustomElementsRegistry.html with 97% similarity]
LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp [moved from Source/WebCore/bindings/js/JSCustomElementsRegistryCustom.cpp with 96% similarity]
Source/WebCore/bindings/js/JSHTMLElementCustom.cpp
Source/WebCore/dom/CustomElementReactionQueue.cpp
Source/WebCore/dom/CustomElementRegistry.cpp [moved from Source/WebCore/dom/CustomElementsRegistry.cpp with 78% similarity]
Source/WebCore/dom/CustomElementRegistry.h [moved from Source/WebCore/dom/CustomElementsRegistry.h with 92% similarity]
Source/WebCore/dom/CustomElementRegistry.idl [moved from Source/WebCore/dom/CustomElementsRegistry.idl with 95% similarity]
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindow.idl