void HTMLSourceElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { HTMLElement::parseAttribute(name, value); if (name == srcsetAttr || name == sizesAttr || name == mediaAttr || name == typeAttr) { Element* parent = parentElement(); if (isHTMLPictureElement(parent)) toHTMLPictureElement(parent)->sourceOrMediaChanged(); } }
Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode* insertionPoint) { HTMLElement::insertedInto(insertionPoint); Element* parent = parentElement(); if (isHTMLMediaElement(parent)) toHTMLMediaElement(parent)->sourceWasAdded(this); if (isHTMLPictureElement(parent)) toHTMLPictureElement(parent)->sourceOrMediaChanged(); return InsertionDone; }
void HTMLSourceElement::removedFrom(ContainerNode* removalRoot) { Element* parent = parentElement(); if (!parent && removalRoot->isElementNode()) parent = toElement(removalRoot); if (isHTMLMediaElement(parent)) toHTMLMediaElement(parent)->sourceWasRemoved(this); if (isHTMLPictureElement(parent)) toHTMLPictureElement(parent)->sourceOrMediaChanged(); HTMLElement::removedFrom(removalRoot); }
void HTMLSourceElement::notifyMediaQueryChanged() { Element* parent = parentElement(); if (isHTMLPictureElement(parent)) toHTMLPictureElement(parent)->sourceOrMediaChanged(); }