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

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

Issue 2256533002: Remove MediaQueryList listener from removed HTMLSourceElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 3 months 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/HTMLPictureElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp b/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp
index 4eb8f6b945adcde8bc540b071267a5b193571a76..d8df9ff8923463e19fb425c6006d0494f03af606 100644
--- a/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp
@@ -8,6 +8,7 @@
#include "core/dom/ElementTraversal.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLImageElement.h"
+#include "core/html/HTMLSourceElement.h"
#include "core/loader/ImageLoader.h"
namespace blink {
@@ -28,6 +29,21 @@ void HTMLPictureElement::sourceOrMediaChanged()
}
}
+void HTMLPictureElement::removeListenerFromSourceChildren()
+{
+ for (HTMLSourceElement* sourceElement = Traversal<HTMLSourceElement>::firstChild(*this); sourceElement; sourceElement = Traversal<HTMLSourceElement>::nextSibling(*sourceElement)) {
+ sourceElement->removeMediaQueryListListener();
+ }
+}
+
+void HTMLPictureElement::addListenerToSourceChildren()
+{
+ for (HTMLSourceElement* sourceElement = Traversal<HTMLSourceElement>::firstChild(*this); sourceElement; sourceElement = Traversal<HTMLSourceElement>::nextSibling(*sourceElement)) {
+ sourceElement->addMediaQueryListListener();
+ }
+}
+
+
Node::InsertionNotificationRequest HTMLPictureElement::insertedInto(ContainerNode* insertionPoint)
{
UseCounter::count(document(), UseCounter::Picture);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPictureElement.h ('k') | third_party/WebKit/Source/core/html/HTMLSourceElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698