OLD | NEW |
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 void MediaQueryList::stop() | 99 void MediaQueryList::stop() |
100 { | 100 { |
101 // m_listeners.clear() can drop the last ref to this MediaQueryList. | 101 // m_listeners.clear() can drop the last ref to this MediaQueryList. |
102 RefPtrWillBeRawPtr<MediaQueryList> protect(this); | 102 RefPtrWillBeRawPtr<MediaQueryList> protect(this); |
103 m_listeners.clear(); | 103 m_listeners.clear(); |
104 removeAllEventListeners(); | 104 removeAllEventListeners(); |
105 } | 105 } |
106 | 106 |
107 bool MediaQueryList::mediaFeaturesChanged(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener> >* listenersToNotify) | 107 bool MediaQueryList::mediaFeaturesChanged(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener>>* listenersToNotify) |
108 { | 108 { |
109 m_matchesDirty = true; | 109 m_matchesDirty = true; |
110 if (!updateMatches()) | 110 if (!updateMatches()) |
111 return false; | 111 return false; |
112 for (const auto& listener : m_listeners) { | 112 for (const auto& listener : m_listeners) { |
113 listenersToNotify->append(listener); | 113 listenersToNotify->append(listener); |
114 } | 114 } |
115 return hasEventListeners(EventTypeNames::change); | 115 return hasEventListeners(EventTypeNames::change); |
116 } | 116 } |
117 | 117 |
(...skipping 28 matching lines...) Expand all Loading... |
146 { | 146 { |
147 return EventTargetNames::MediaQueryList; | 147 return EventTargetNames::MediaQueryList; |
148 } | 148 } |
149 | 149 |
150 ExecutionContext* MediaQueryList::executionContext() const | 150 ExecutionContext* MediaQueryList::executionContext() const |
151 { | 151 { |
152 return ActiveDOMObject::executionContext(); | 152 return ActiveDOMObject::executionContext(); |
153 } | 153 } |
154 | 154 |
155 } | 155 } |
OLD | NEW |