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

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

Issue 331283004: Oilpan: Trace MediaQueryMacher::m_document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 , m_evaluationRound(1) 54 , m_evaluationRound(1)
55 { 55 {
56 ASSERT(m_document); 56 ASSERT(m_document);
57 } 57 }
58 58
59 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryMatcher) 59 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryMatcher)
60 60
61 void MediaQueryMatcher::documentDestroyed() 61 void MediaQueryMatcher::documentDestroyed()
62 { 62 {
63 m_listeners.clear(); 63 m_listeners.clear();
64 m_document = 0; 64 m_document = nullptr;
65 } 65 }
66 66
67 AtomicString MediaQueryMatcher::mediaType() const 67 AtomicString MediaQueryMatcher::mediaType() const
68 { 68 {
69 if (!m_document || !m_document->frame() || !m_document->frame()->view()) 69 if (!m_document || !m_document->frame() || !m_document->frame()->view())
70 return nullAtom; 70 return nullAtom;
71 71
72 return m_document->frame()->view()->mediaType(); 72 return m_document->frame()->view()->mediaType();
73 } 73 }
74 74
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 OwnPtr<MediaQueryEvaluator> evaluator = prepareEvaluator(); 135 OwnPtr<MediaQueryEvaluator> evaluator = prepareEvaluator();
136 if (!evaluator) 136 if (!evaluator)
137 return; 137 return;
138 138
139 for (size_t i = 0; i < m_listeners.size(); ++i) 139 for (size_t i = 0; i < m_listeners.size(); ++i)
140 m_listeners[i]->evaluate(evaluator.get()); 140 m_listeners[i]->evaluate(evaluator.get());
141 } 141 }
142 142
143 void MediaQueryMatcher::trace(Visitor* visitor) 143 void MediaQueryMatcher::trace(Visitor* visitor)
144 { 144 {
145 visitor->trace(m_document);
145 // We don't support tracing of vectors of OwnPtrs (ie. Vector<OwnPtr<Listene r> >). 146 // We don't support tracing of vectors of OwnPtrs (ie. Vector<OwnPtr<Listene r> >).
146 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. 147 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled.
147 #if ENABLE(OILPAN) 148 #if ENABLE(OILPAN)
148 visitor->trace(m_listeners); 149 visitor->trace(m_listeners);
149 #endif 150 #endif
150 } 151 }
151 152
152 } 153 }
OLDNEW
« Source/core/css/MediaQueryMatcher.h ('K') | « Source/core/css/MediaQueryMatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698