| Index: third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
|
| similarity index 70%
|
| rename from third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
|
| rename to third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
|
| index 18ead46060037b4559baebc7b482634cabd70d15..3f4683062d9459793f2bc9c6b5c44232e751014a 100644
|
| --- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
|
| @@ -28,36 +28,36 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#include "core/dom/custom/CustomElement.h"
|
| +#include "core/dom/custom/V0CustomElement.h"
|
|
|
| #include "core/HTMLNames.h"
|
| #include "core/MathMLNames.h"
|
| #include "core/SVGNames.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/Element.h"
|
| -#include "core/dom/custom/CustomElementMicrotaskRunQueue.h"
|
| -#include "core/dom/custom/CustomElementObserver.h"
|
| -#include "core/dom/custom/CustomElementScheduler.h"
|
| +#include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h"
|
| +#include "core/dom/custom/V0CustomElementObserver.h"
|
| +#include "core/dom/custom/V0CustomElementScheduler.h"
|
|
|
| namespace blink {
|
|
|
| -CustomElementMicrotaskImportStep* CustomElement::didCreateImport(HTMLImportChild* import)
|
| +V0CustomElementMicrotaskImportStep* V0CustomElement::didCreateImport(HTMLImportChild* import)
|
| {
|
| - return CustomElementScheduler::scheduleImport(import);
|
| + return V0CustomElementScheduler::scheduleImport(import);
|
| }
|
|
|
| -void CustomElement::didFinishLoadingImport(Document& master)
|
| +void V0CustomElement::didFinishLoadingImport(Document& master)
|
| {
|
| master.customElementMicrotaskRunQueue()->requestDispatchIfNeeded();
|
| }
|
|
|
| -Vector<AtomicString>& CustomElement::embedderCustomElementNames()
|
| +Vector<AtomicString>& V0CustomElement::embedderCustomElementNames()
|
| {
|
| DEFINE_STATIC_LOCAL(Vector<AtomicString>, names, ());
|
| return names;
|
| }
|
|
|
| -void CustomElement::addEmbedderCustomElementName(const AtomicString& name)
|
| +void V0CustomElement::addEmbedderCustomElementName(const AtomicString& name)
|
| {
|
| AtomicString lower = name.lower();
|
| if (isValidName(lower, EmbedderNames))
|
| @@ -83,7 +83,7 @@ static inline bool isValidNCName(const AtomicString& name)
|
| return Document::isValidName(name.getString());
|
| }
|
|
|
| -bool CustomElement::isValidName(const AtomicString& name, NameSet validNames)
|
| +bool V0CustomElement::isValidName(const AtomicString& name, NameSet validNames)
|
| {
|
| if ((validNames & EmbedderNames) && kNotFound != embedderCustomElementNames().find(name))
|
| return Document::isValidName(name);
|
| @@ -102,7 +102,7 @@ bool CustomElement::isValidName(const AtomicString& name, NameSet validNames)
|
| return false;
|
| }
|
|
|
| -void CustomElement::define(Element* element, CustomElementDefinition* definition)
|
| +void V0CustomElement::define(Element* element, V0CustomElementDefinition* definition)
|
| {
|
| switch (element->getCustomElementState()) {
|
| case Element::NotCustomElement:
|
| @@ -112,34 +112,34 @@ void CustomElement::define(Element* element, CustomElementDefinition* definition
|
|
|
| case Element::WaitingForUpgrade:
|
| element->setCustomElementDefinition(definition);
|
| - CustomElementScheduler::scheduleCallback(definition->callbacks(), element, CustomElementLifecycleCallbacks::CreatedCallback);
|
| + V0CustomElementScheduler::scheduleCallback(definition->callbacks(), element, V0CustomElementLifecycleCallbacks::CreatedCallback);
|
| break;
|
| }
|
| }
|
|
|
| -void CustomElement::attributeDidChange(Element* element, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue)
|
| +void V0CustomElement::attributeDidChange(Element* element, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue)
|
| {
|
| DCHECK_EQ(element->getCustomElementState(), Element::Upgraded);
|
| - CustomElementScheduler::scheduleAttributeChangedCallback(element->customElementDefinition()->callbacks(), element, name, oldValue, newValue);
|
| + V0CustomElementScheduler::scheduleAttributeChangedCallback(element->customElementDefinition()->callbacks(), element, name, oldValue, newValue);
|
| }
|
|
|
| -void CustomElement::didAttach(Element* element, const Document& document)
|
| +void V0CustomElement::didAttach(Element* element, const Document& document)
|
| {
|
| DCHECK_EQ(element->getCustomElementState(), Element::Upgraded);
|
| if (!document.domWindow())
|
| return;
|
| - CustomElementScheduler::scheduleCallback(element->customElementDefinition()->callbacks(), element, CustomElementLifecycleCallbacks::AttachedCallback);
|
| + V0CustomElementScheduler::scheduleCallback(element->customElementDefinition()->callbacks(), element, V0CustomElementLifecycleCallbacks::AttachedCallback);
|
| }
|
|
|
| -void CustomElement::didDetach(Element* element, const Document& document)
|
| +void V0CustomElement::didDetach(Element* element, const Document& document)
|
| {
|
| DCHECK_EQ(element->getCustomElementState(), Element::Upgraded);
|
| if (!document.domWindow())
|
| return;
|
| - CustomElementScheduler::scheduleCallback(element->customElementDefinition()->callbacks(), element, CustomElementLifecycleCallbacks::DetachedCallback);
|
| + V0CustomElementScheduler::scheduleCallback(element->customElementDefinition()->callbacks(), element, V0CustomElementLifecycleCallbacks::DetachedCallback);
|
| }
|
|
|
| -void CustomElement::wasDestroyed(Element* element)
|
| +void V0CustomElement::wasDestroyed(Element* element)
|
| {
|
| switch (element->getCustomElementState()) {
|
| case Element::NotCustomElement:
|
| @@ -148,7 +148,7 @@ void CustomElement::wasDestroyed(Element* element)
|
|
|
| case Element::WaitingForUpgrade:
|
| case Element::Upgraded:
|
| - CustomElementObserver::notifyElementWasDestroyed(element);
|
| + V0CustomElementObserver::notifyElementWasDestroyed(element);
|
| break;
|
| }
|
| }
|
|
|