| Index: Source/core/html/HTMLSourceElement.cpp
|
| diff --git a/Source/core/html/HTMLSourceElement.cpp b/Source/core/html/HTMLSourceElement.cpp
|
| index 6c613b47a50fc021c7edb8c8a910331f38f80fc6..7f7f52e42a26450eb4cbb89180239acb7cf4f901 100644
|
| --- a/Source/core/html/HTMLSourceElement.cpp
|
| +++ b/Source/core/html/HTMLSourceElement.cpp
|
| @@ -29,6 +29,7 @@
|
| #include "HTMLNames.h"
|
| #include "core/events/EventSender.h"
|
| #include "core/html/HTMLMediaElement.h"
|
| +#include "core/html/HTMLPictureElement.h"
|
| #include "platform/Logging.h"
|
|
|
| using namespace std;
|
| @@ -66,6 +67,8 @@ Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode
|
| Element* parent = parentElement();
|
| if (isHTMLMediaElement(parent))
|
| toHTMLMediaElement(parent)->sourceWasAdded(this);
|
| + if (isHTMLPictureElement(parent))
|
| + toHTMLPictureElement(parent)->sourceOrMediaChanged();
|
| return InsertionDone;
|
| }
|
|
|
| @@ -76,6 +79,8 @@ void HTMLSourceElement::removedFrom(ContainerNode* removalRoot)
|
| parent = toElement(removalRoot);
|
| if (isHTMLMediaElement(parent))
|
| toHTMLMediaElement(parent)->sourceWasRemoved(this);
|
| + if (isHTMLPictureElement(parent))
|
| + toHTMLPictureElement(parent)->sourceOrMediaChanged();
|
| HTMLElement::removedFrom(removalRoot);
|
| }
|
|
|
| @@ -118,4 +123,14 @@ bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const
|
| return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute);
|
| }
|
|
|
| +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();
|
| + }
|
| +}
|
| +
|
| }
|
|
|