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

Unified Diff: Source/core/html/HTMLSourceElement.h

Issue 287163010: Notify <picture> elements when a media query (potentially) changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: forgot to adjust test after moving Created 6 years, 6 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: Source/core/html/HTMLSourceElement.h
diff --git a/Source/core/html/HTMLSourceElement.h b/Source/core/html/HTMLSourceElement.h
index 339c12a99af11064554671698340eb12d8e6fb4a..02f4a0ac551691054ca88d980180581df3b30986 100644
--- a/Source/core/html/HTMLSourceElement.h
+++ b/Source/core/html/HTMLSourceElement.h
@@ -26,6 +26,7 @@
#ifndef HTMLSourceElement_h
#define HTMLSourceElement_h
+#include "core/css/MediaQueryListListener.h"
#include "core/html/HTMLElement.h"
#include "platform/Timer.h"
@@ -36,6 +37,8 @@ typedef EventSender<HTMLSourceElement> SourceEventSender;
class HTMLSourceElement FINAL : public HTMLElement {
public:
+ class Listener;
+
DECLARE_NODE_FACTORY(HTMLSourceElement);
virtual ~HTMLSourceElement();
@@ -48,6 +51,8 @@ public:
void dispatchPendingEvent(SourceEventSender*);
+ bool mediaQueryMatches() const;
+
private:
explicit HTMLSourceElement(Document&);
@@ -55,6 +60,12 @@ private:
virtual void removedFrom(ContainerNode*) OVERRIDE;
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
+
+ void notifyMediaQueryChanged();
+ virtual void trace(Visitor*) OVERRIDE;
+
+ RefPtrWillBeMember<MediaQueryList> m_mediaQueryList;
+ RefPtrWillBeMember<Listener> m_listener;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698