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

Side by Side Diff: Source/core/css/MediaQueryList.h

Issue 221663002: MediaQueryList::evaluate should return a bool (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/MediaQueryList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 29 matching lines...) Expand all
40 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollected<MediaQueryL ist> { 40 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollected<MediaQueryL ist> {
41 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryList); 41 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryList);
42 public: 42 public:
43 static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr< MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>, bool); 43 static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr< MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>, bool);
44 String media() const; 44 String media() const;
45 bool matches(); 45 bool matches();
46 46
47 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); 47 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
48 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); 48 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
49 49
50 void evaluate(MediaQueryEvaluator*, bool& notificationNeeded); 50 bool evaluate(MediaQueryEvaluator*);
51 51
52 void trace(Visitor*); 52 void trace(Visitor*);
53 53
54 private: 54 private:
55 MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRa wPtr<MediaQuerySet>, bool matches); 55 MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRa wPtr<MediaQuerySet>, bool matches);
56 void setMatches(bool); 56 void setMatches(bool);
57 57
58 RefPtrWillBeMember<MediaQueryMatcher> m_matcher; 58 RefPtrWillBeMember<MediaQueryMatcher> m_matcher;
59 RefPtrWillBeMember<MediaQuerySet> m_media; 59 RefPtrWillBeMember<MediaQuerySet> m_media;
60 unsigned m_evaluationRound; // Indicates if the query has been evaluated aft er the last style selector change. 60 unsigned m_evaluationRound; // Indicates if the query has been evaluated aft er the last style selector change.
61 unsigned m_changeRound; // Used to know if the query has changed in the last style selector change. 61 unsigned m_changeRound; // Used to know if the query has changed in the last style selector change.
62 bool m_matches; 62 bool m_matches;
63 }; 63 };
64 64
65 } 65 }
66 66
67 #endif // MediaQueryList_h 67 #endif // MediaQueryList_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/MediaQueryList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698