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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSourceElement.cpp

Issue 1511523002: Align HTMLImageElement relevant mutations to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix removal issue when a text node is between <source> and <img> Created 5 years 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
Index: third_party/WebKit/Source/core/html/HTMLSourceElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp b/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp
index 36f820d299f1073d8edcbd0bb8af45f89efc27ff..8e5b1eff884fd288affd495ea7532307a657bbe7 100644
--- a/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp
@@ -108,20 +108,20 @@ Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode
if (isHTMLMediaElement(parent))
toHTMLMediaElement(parent)->sourceWasAdded(this);
if (isHTMLPictureElement(parent))
- toHTMLPictureElement(parent)->sourceOrMediaChanged();
+ toHTMLPictureElement(parent)->sourceOrMediaChanged(this);
return InsertionDone;
}
-void HTMLSourceElement::removedFrom(ContainerNode* removalRoot)
+void HTMLSourceElement::removedFrom(ContainerNode* insertionPoint, Node* next)
{
Element* parent = parentElement();
- if (!parent && removalRoot->isElementNode())
- parent = toElement(removalRoot);
+ if (!parent && insertionPoint->isElementNode())
+ parent = toElement(insertionPoint);
if (isHTMLMediaElement(parent))
toHTMLMediaElement(parent)->sourceWasRemoved(this);
if (isHTMLPictureElement(parent))
- toHTMLPictureElement(parent)->sourceOrMediaChanged();
- HTMLElement::removedFrom(removalRoot);
+ toHTMLPictureElement(parent)->sourceOrMediaChanged(this, next);
+ HTMLElement::removedFrom(insertionPoint, next);
}
void HTMLSourceElement::setSrc(const String& url)
@@ -179,7 +179,7 @@ void HTMLSourceElement::parseAttribute(const QualifiedName& name, const AtomicSt
if (name == srcsetAttr || name == sizesAttr || name == mediaAttr || name == typeAttr) {
Element* parent = parentElement();
if (isHTMLPictureElement(parent))
- toHTMLPictureElement(parent)->sourceOrMediaChanged();
+ toHTMLPictureElement(parent)->sourceOrMediaChanged(this);
}
}
@@ -187,7 +187,7 @@ void HTMLSourceElement::notifyMediaQueryChanged()
{
Element* parent = parentElement();
if (isHTMLPictureElement(parent))
- toHTMLPictureElement(parent)->sourceOrMediaChanged();
+ toHTMLPictureElement(parent)->sourceOrMediaChanged(this);
}
DEFINE_TRACE(HTMLSourceElement)

Powered by Google App Engine
This is Rietveld 408576698