| Index: Source/core/css/MediaQueryListEvent.h
|
| diff --git a/Source/core/css/MediaQueryListEvent.h b/Source/core/css/MediaQueryListEvent.h
|
| index f5786bf246142f13e0829633ac2c0f5f610d83cd..ed185059cf95d5d8af7aee734f5cc48e08f3e5b8 100644
|
| --- a/Source/core/css/MediaQueryListEvent.h
|
| +++ b/Source/core/css/MediaQueryListEvent.h
|
| @@ -6,17 +6,11 @@
|
| #define MediaQueryListEvent_h
|
|
|
| #include "core/css/MediaQueryList.h"
|
| +#include "core/css/MediaQueryListEventInit.h"
|
| #include "core/events/Event.h"
|
|
|
| namespace blink {
|
|
|
| -struct MediaQueryListEventInit : public EventInit {
|
| - MediaQueryListEventInit() : matches(false) { }
|
| -
|
| - String media;
|
| - bool matches;
|
| -};
|
| -
|
| class MediaQueryListEvent final : public Event {
|
| DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| @@ -67,8 +61,13 @@ private:
|
|
|
| MediaQueryListEvent(const AtomicString& eventType, const MediaQueryListEventInit& initializer)
|
| : Event(eventType, initializer)
|
| - , m_media(initializer.media)
|
| - , m_matches(initializer.matches) { }
|
| + , m_matches(false)
|
| + {
|
| + if (initializer.hasMedia())
|
| + m_media = initializer.media();
|
| + if (initializer.hasMatches())
|
| + m_matches = initializer.matches();
|
| + }
|
|
|
| // We have m_media/m_matches for JS-created events; we use m_mediaQueryList
|
| // for events that blink generates.
|
|
|