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

Unified Diff: Source/core/dom/custom/CustomElementRegistrationContext.cpp

Issue 69533003: Upgrade parser-created Custom Elements in creation order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring patch to head. Created 7 years, 1 month 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
« no previous file with comments | « Source/core/dom/custom/CustomElementRegistrationContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/custom/CustomElementRegistrationContext.cpp
diff --git a/Source/core/dom/custom/CustomElementRegistrationContext.cpp b/Source/core/dom/custom/CustomElementRegistrationContext.cpp
index dcd1f6fef9357cf405981f8a2576f290f30bb315..e248ab7cbf1b659f1b0a03dae0ca0b173c0e5057 100644
--- a/Source/core/dom/custom/CustomElementRegistrationContext.cpp
+++ b/Source/core/dom/custom/CustomElementRegistrationContext.cpp
@@ -58,7 +58,7 @@ void CustomElementRegistrationContext::registerElement(Document* document, Custo
didResolveElement(definition, *it);
}
-PassRefPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Document& document, const QualifiedName& tagName, CreationMode mode)
+PassRefPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Document& document, const QualifiedName& tagName)
{
ASSERT(CustomElement::isValidName(tagName.localName()));
@@ -73,7 +73,7 @@ PassRefPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Doc
return Element::create(tagName, &document);
}
- element->setCustomElementState(mode == CreatedByParser ? Element::WaitingForParser : Element::WaitingForUpgrade);
+ element->setCustomElementState(Element::WaitingForUpgrade);
resolve(element.get(), nullAtom);
return element.release();
}
@@ -107,7 +107,7 @@ void CustomElementRegistrationContext::didResolveElement(CustomElementDefinition
void CustomElementRegistrationContext::didCreateUnresolvedElement(const CustomElementDescriptor& descriptor, Element* element)
{
- ASSERT(element->customElementState() == Element::WaitingForParser || element->customElementState() == Element::WaitingForUpgrade);
+ ASSERT(element->customElementState() == Element::WaitingForUpgrade);
m_candidates.add(descriptor, element);
}
@@ -124,7 +124,7 @@ void CustomElementRegistrationContext::setIsAttributeAndTypeExtension(Element* e
setTypeExtension(element, type);
}
-void CustomElementRegistrationContext::setTypeExtension(Element* element, const AtomicString& type, CreationMode mode)
+void CustomElementRegistrationContext::setTypeExtension(Element* element, const AtomicString& type)
{
if (!element->isHTMLElement() && !element->isSVGElement())
return;
@@ -141,7 +141,7 @@ void CustomElementRegistrationContext::setTypeExtension(Element* element, const
// Custom tags take precedence over type extensions
ASSERT(!CustomElement::isValidName(element->localName()));
- element->setCustomElementState(mode == CreatedByParser ? Element::WaitingForParser : Element::WaitingForUpgrade);
+ element->setCustomElementState(Element::WaitingForUpgrade);
if (CustomElementRegistrationContext* context = element->document().registrationContext())
context->didGiveTypeExtension(element, type);
« no previous file with comments | « Source/core/dom/custom/CustomElementRegistrationContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698