| Index: Source/core/css/MediaQueryList.h
|
| diff --git a/Source/core/css/MediaQueryList.h b/Source/core/css/MediaQueryList.h
|
| index ba04100cc723e42cb75d7e957d579b52408ff66d..4b1d8f0807143f130194bd5ce1cc45c2fbdfa564 100644
|
| --- a/Source/core/css/MediaQueryList.h
|
| +++ b/Source/core/css/MediaQueryList.h
|
| @@ -38,27 +38,32 @@ class MediaQuerySet;
|
| // will be called whenever the value of the query changes.
|
|
|
| class MediaQueryList FINAL : public RefCountedWillBeGarbageCollected<MediaQueryList> {
|
| - DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryList);
|
| public:
|
| - static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>, bool);
|
| + static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
|
| + virtual ~MediaQueryList();
|
| +
|
| String media() const;
|
| bool matches();
|
|
|
| void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
|
| void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
|
|
|
| - bool evaluate(MediaQueryEvaluator*);
|
| + void mediaChanged(WillBeHeapVector<RefPtrWillBeMember<MediaQueryListListener> >* toNotify);
|
|
|
| void trace(Visitor*);
|
|
|
| + void documentDetached();
|
| +
|
| private:
|
| - MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>, bool matches);
|
| - void setMatches(bool);
|
| + MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
|
| +
|
| + bool updateMatches();
|
|
|
| RefPtrWillBeMember<MediaQueryMatcher> m_matcher;
|
| RefPtrWillBeMember<MediaQuerySet> m_media;
|
| - unsigned m_evaluationRound; // Indicates if the query has been evaluated after the last style selector change.
|
| - unsigned m_changeRound; // Used to know if the query has changed in the last style selector change.
|
| + typedef HeapListHashSet<RefPtrWillBePersistent<MediaQueryListListener> > ListenerList;
|
| + ListenerList m_listeners;
|
| + bool m_matchesDirty;
|
| bool m_matches;
|
| };
|
|
|
|
|