Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp

Issue 1914923002: Rename all existing custom element classes as V0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CustomElementV0 -> V0CustomElement Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp b/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
similarity index 63%
rename from third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
rename to third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
index 869ea67f04ee52bc0ee0fcaef8059ce39c1f8475..a4b05bedf52ee1a992eb1f26cc9da6f8f32aa5dc 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
@@ -28,33 +28,33 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "core/dom/custom/CustomElementRegistry.h"
+#include "core/dom/custom/V0CustomElementRegistry.h"
-#include "bindings/core/v8/CustomElementConstructorBuilder.h"
+#include "bindings/core/v8/V0CustomElementConstructorBuilder.h"
#include "core/HTMLNames.h"
#include "core/SVGNames.h"
#include "core/dom/DocumentLifecycleObserver.h"
-#include "core/dom/custom/CustomElementException.h"
-#include "core/dom/custom/CustomElementRegistrationContext.h"
+#include "core/dom/custom/V0CustomElementException.h"
+#include "core/dom/custom/V0CustomElementRegistrationContext.h"
namespace blink {
-CustomElementDefinition* CustomElementRegistry::registerElement(Document* document, CustomElementConstructorBuilder* constructorBuilder, const AtomicString& userSuppliedName, CustomElement::NameSet validNames, ExceptionState& exceptionState)
+V0CustomElementDefinition* V0CustomElementRegistry::registerElement(Document* document, V0CustomElementConstructorBuilder* constructorBuilder, const AtomicString& userSuppliedName, V0CustomElement::NameSet validNames, ExceptionState& exceptionState)
{
AtomicString type = userSuppliedName.lower();
if (!constructorBuilder->isFeatureAllowed()) {
- CustomElementException::throwException(CustomElementException::CannotRegisterFromExtension, type, exceptionState);
+ V0CustomElementException::throwException(V0CustomElementException::CannotRegisterFromExtension, type, exceptionState);
return 0;
}
- if (!CustomElement::isValidName(type, validNames)) {
- CustomElementException::throwException(CustomElementException::InvalidName, type, exceptionState);
+ if (!V0CustomElement::isValidName(type, validNames)) {
+ V0CustomElementException::throwException(V0CustomElementException::InvalidName, type, exceptionState);
return 0;
}
if (m_registeredTypeNames.contains(type)) {
- CustomElementException::throwException(CustomElementException::TypeAlreadyRegistered, type, exceptionState);
+ V0CustomElementException::throwException(V0CustomElementException::TypeAlreadyRegistered, type, exceptionState);
return 0;
}
@@ -66,17 +66,17 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
DCHECK(!m_documentWasDetached);
- CustomElementLifecycleCallbacks* lifecycleCallbacks = constructorBuilder->createCallbacks();
+ V0CustomElementLifecycleCallbacks* lifecycleCallbacks = constructorBuilder->createCallbacks();
// Consulting the constructor builder could execute script and
// kill the document.
if (m_documentWasDetached) {
- CustomElementException::throwException(CustomElementException::ContextDestroyedCreatingCallbacks, type, exceptionState);
+ V0CustomElementException::throwException(V0CustomElementException::ContextDestroyedCreatingCallbacks, type, exceptionState);
return 0;
}
- const CustomElementDescriptor descriptor(type, tagName.namespaceURI(), tagName.localName());
- CustomElementDefinition* definition = CustomElementDefinition::create(descriptor, lifecycleCallbacks);
+ const V0CustomElementDescriptor descriptor(type, tagName.namespaceURI(), tagName.localName());
+ V0CustomElementDefinition* definition = V0CustomElementDefinition::create(descriptor, lifecycleCallbacks);
if (!constructorBuilder->createConstructor(document, definition, exceptionState))
return 0;
@@ -85,19 +85,19 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
m_registeredTypeNames.add(descriptor.type());
if (!constructorBuilder->didRegisterDefinition()) {
- CustomElementException::throwException(CustomElementException::ContextDestroyedRegisteringDefinition, type, exceptionState);
+ V0CustomElementException::throwException(V0CustomElementException::ContextDestroyedRegisteringDefinition, type, exceptionState);
return 0;
}
return definition;
}
-CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescriptor& descriptor) const
+V0CustomElementDefinition* V0CustomElementRegistry::find(const V0CustomElementDescriptor& descriptor) const
{
return m_definitions.get(descriptor);
}
-DEFINE_TRACE(CustomElementRegistry)
+DEFINE_TRACE(V0CustomElementRegistry)
{
visitor->trace(m_definitions);
}

Powered by Google App Engine
This is Rietveld 408576698