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

Side by Side Diff: Source/core/css/MediaQueryMatcher.cpp

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 | « Source/core/css/MediaQueryList.cpp ('k') | no next file » | 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 21 matching lines...) Expand all
32 namespace WebCore { 32 namespace WebCore {
33 33
34 MediaQueryMatcher::Listener::Listener(PassRefPtrWillBeRawPtr<MediaQueryListListe ner> listener, PassRefPtrWillBeRawPtr<MediaQueryList> query) 34 MediaQueryMatcher::Listener::Listener(PassRefPtrWillBeRawPtr<MediaQueryListListe ner> listener, PassRefPtrWillBeRawPtr<MediaQueryList> query)
35 : m_listener(listener) 35 : m_listener(listener)
36 , m_query(query) 36 , m_query(query)
37 { 37 {
38 } 38 }
39 39
40 void MediaQueryMatcher::Listener::evaluate(ScriptState* state, MediaQueryEvaluat or* evaluator) 40 void MediaQueryMatcher::Listener::evaluate(ScriptState* state, MediaQueryEvaluat or* evaluator)
41 { 41 {
42 bool notify; 42 if (m_query->evaluate(evaluator))
43 m_query->evaluate(evaluator, notify);
44 if (notify)
45 m_listener->queryChanged(state, m_query.get()); 43 m_listener->queryChanged(state, m_query.get());
46 } 44 }
47 45
48 void MediaQueryMatcher::Listener::trace(Visitor* visitor) 46 void MediaQueryMatcher::Listener::trace(Visitor* visitor)
49 { 47 {
50 visitor->trace(m_listener); 48 visitor->trace(m_listener);
51 visitor->trace(m_query); 49 visitor->trace(m_query);
52 } 50 }
53 51
54 MediaQueryMatcher::MediaQueryMatcher(Document* document) 52 MediaQueryMatcher::MediaQueryMatcher(Document* document)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void MediaQueryMatcher::trace(Visitor* visitor) 154 void MediaQueryMatcher::trace(Visitor* visitor)
157 { 155 {
158 // We don't support tracing of vectors of OwnPtrs (ie. Vector<OwnPtr<Listene r> >). 156 // We don't support tracing of vectors of OwnPtrs (ie. Vector<OwnPtr<Listene r> >).
159 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. 157 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled.
160 #if ENABLE(OILPAN) 158 #if ENABLE(OILPAN)
161 visitor->trace(m_listeners); 159 visitor->trace(m_listeners);
162 #endif 160 #endif
163 } 161 }
164 162
165 } 163 }
OLDNEW
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698