void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint) { resetFormOwner(); if (!insertionPoint->inDocument()) return; HTMLElement* element = toHTMLElement(this); if (element->fastHasAttribute(formAttr)) resetFormAttributeTargetObserver(); }
void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint) { if (!m_formWasSetByParser || insertionPoint->highestAncestor() != m_form->highestAncestor()) resetFormOwner(); if (!insertionPoint->inDocument()) return; HTMLElement* element = toHTMLElement(this); if (element->fastHasAttribute(formAttr)) resetFormAttributeTargetObserver(); }
void FormAssociatedElement::formAttributeChanged() { HTMLElement* element = toHTMLElement(this); if (!element->fastHasAttribute(formAttr)) { // The form attribute removed. We need to reset form owner here. setForm(element->findFormAncestor()); m_formAttributeTargetObserver = nullptr; } else { resetFormOwner(); resetFormAttributeTargetObserver(); } }
void FormAssociatedElement::formAttributeChanged() { HTMLElement* element = toHTMLElement(this); if (!element->fastHasAttribute(formAttr)) { // The form attribute removed. We need to reset form owner here. HTMLFormElement* originalForm = m_form; setForm(element->findFormAncestor()); HTMLElement* element = toHTMLElement(this); if (m_form && m_form != originalForm && m_form->inDocument()) element->document()->didAssociateFormControl(element); m_formAttributeTargetObserver = nullptr; } else { resetFormOwner(); resetFormAttributeTargetObserver(); } }
void FormAssociatedElement::formAttributeChanged() { resetFormOwner(); resetFormAttributeTargetObserver(); }