| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2010, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2010, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 text.appendLiteral(", "); | 155 text.appendLiteral(", "); |
| 156 else | 156 else |
| 157 first = false; | 157 first = false; |
| 158 text.append(m_queries[i]->cssText()); | 158 text.append(m_queries[i]->cssText()); |
| 159 } | 159 } |
| 160 return text.toString(); | 160 return text.toString(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 DEFINE_TRACE(MediaQuerySet) | 163 DEFINE_TRACE(MediaQuerySet) |
| 164 { | 164 { |
| 165 // We don't support tracing of vectors of OwnPtrs (ie. OwnPtr<Vector<OwnPtr<
MediaQuery> > >). | 165 // We don't support tracing of vectors of OwnPtrs (ie. OwnPtr<Vector<OwnPtr<
MediaQuery>>>). |
| 166 // Since this is a transitional object we are just ifdef'ing it out when oil
pan is not enabled. | 166 // Since this is a transitional object we are just ifdef'ing it out when oil
pan is not enabled. |
| 167 #if ENABLE(OILPAN) | 167 #if ENABLE(OILPAN) |
| 168 visitor->trace(m_queries); | 168 visitor->trace(m_queries); |
| 169 #endif | 169 #endif |
| 170 } | 170 } |
| 171 | 171 |
| 172 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet) | 172 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet) |
| 173 : m_mediaQueries(mediaQueries) | 173 : m_mediaQueries(mediaQueries) |
| 174 , m_parentStyleSheet(parentSheet) | 174 , m_parentStyleSheet(parentSheet) |
| 175 , m_parentRule(nullptr) | 175 , m_parentRule(nullptr) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 190 CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule); | 190 CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule); |
| 191 | 191 |
| 192 m_mediaQueries->set(value); | 192 m_mediaQueries->set(value); |
| 193 | 193 |
| 194 if (m_parentStyleSheet) | 194 if (m_parentStyleSheet) |
| 195 m_parentStyleSheet->didMutate(); | 195 m_parentStyleSheet->didMutate(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 String MediaList::item(unsigned index) const | 198 String MediaList::item(unsigned index) const |
| 199 { | 199 { |
| 200 const WillBeHeapVector<OwnPtrWillBeMember<MediaQuery> >& queries = m_mediaQu
eries->queryVector(); | 200 const WillBeHeapVector<OwnPtrWillBeMember<MediaQuery>>& queries = m_mediaQue
ries->queryVector(); |
| 201 if (index < queries.size()) | 201 if (index < queries.size()) |
| 202 return queries[index]->cssText(); | 202 return queries[index]->cssText(); |
| 203 return String(); | 203 return String(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void MediaList::deleteMedium(const String& medium, ExceptionState& exceptionStat
e) | 206 void MediaList::deleteMedium(const String& medium, ExceptionState& exceptionStat
e) |
| 207 { | 207 { |
| 208 CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule); | 208 CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule); |
| 209 | 209 |
| 210 bool success = m_mediaQueries->remove(medium); | 210 bool success = m_mediaQueries->remove(medium); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 DEFINE_TRACE(MediaList) | 239 DEFINE_TRACE(MediaList) |
| 240 { | 240 { |
| 241 visitor->trace(m_mediaQueries); | 241 visitor->trace(m_mediaQueries); |
| 242 visitor->trace(m_parentStyleSheet); | 242 visitor->trace(m_parentStyleSheet); |
| 243 visitor->trace(m_parentRule); | 243 visitor->trace(m_parentRule); |
| 244 } | 244 } |
| 245 | 245 |
| 246 } | 246 } |
| OLD | NEW |