| Index: Source/core/css/MediaQueryListListener.h
|
| diff --git a/Source/core/css/MediaQueryListListener.h b/Source/core/css/MediaQueryListListener.h
|
| index 259aaeaa575b33525df773366249d9708b7e71ae..d9299b0b3d650dd345c4febcb4dc8022ea23a282 100644
|
| --- a/Source/core/css/MediaQueryListListener.h
|
| +++ b/Source/core/css/MediaQueryListListener.h
|
| @@ -39,17 +39,23 @@ public:
|
| return nullptr;
|
| return adoptRefWillBeNoop(new MediaQueryListListener(scriptState, value));
|
| }
|
| - void queryChanged(MediaQueryList*);
|
| + void call();
|
| +
|
| + // Used to keep the MediaQueryList alive and registered with the MediaQueryMatcher
|
| + // as long as the listener exists.
|
| + void setMediaQueryList(MediaQueryList* query) { m_query = query; }
|
| + void clearMediaQueryList() { m_query = nullptr; }
|
|
|
| bool operator==(const MediaQueryListListener& other) const { return m_function == other.m_function; }
|
|
|
| - void trace(Visitor*) { }
|
| + void trace(Visitor* visitor) { visitor->trace(m_query); }
|
|
|
| private:
|
| MediaQueryListListener(ScriptState*, const ScriptValue&);
|
|
|
| RefPtr<ScriptState> m_scriptState;
|
| ScriptValue m_function;
|
| + RefPtrWillBeMember<MediaQueryList> m_query;
|
| };
|
|
|
| }
|
|
|