Chromium Code Reviews| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 for (size_t i = 0; i < m_queries.size(); ++i) { | 157 for (size_t i = 0; i < m_queries.size(); ++i) { |
| 158 if (!first) | 158 if (!first) |
| 159 text.appendLiteral(", "); | 159 text.appendLiteral(", "); |
| 160 else | 160 else |
| 161 first = false; | 161 first = false; |
| 162 text.append(m_queries[i]->cssText()); | 162 text.append(m_queries[i]->cssText()); |
| 163 } | 163 } |
| 164 return text.toString(); | 164 return text.toString(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void MediaQuerySet::trace(Visitor* visitor) | 167 DEFINE_TRACE(MediaQuerySet) |
| 168 { | 168 { |
| 169 // We don't support tracing of vectors of OwnPtrs (ie. OwnPtr<Vector<OwnPtr< MediaQuery> > >). | 169 // We don't support tracing of vectors of OwnPtrs (ie. OwnPtr<Vector<OwnPtr< MediaQuery> > >). |
|
haraken
2015/02/24 09:08:52
Remove the comment.
| |
| 170 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. | 170 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. |
| 171 #if ENABLE(OILPAN) | 171 #if ENABLE(OILPAN) |
| 172 visitor->trace(m_queries); | 172 visitor->trace(m_queries); |
| 173 #endif | 173 #endif |
| 174 } | 174 } |
| 175 | 175 |
| 176 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet) | 176 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet) |
| 177 : m_mediaQueries(mediaQueries) | 177 : m_mediaQueries(mediaQueries) |
| 178 , m_parentStyleSheet(parentSheet) | 178 , m_parentStyleSheet(parentSheet) |
| 179 , m_parentRule(nullptr) | 179 , m_parentRule(nullptr) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 233 if (m_parentStyleSheet) | 233 if (m_parentStyleSheet) |
| 234 m_parentStyleSheet->didMutate(); | 234 m_parentStyleSheet->didMutate(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void MediaList::reattach(MediaQuerySet* mediaQueries) | 237 void MediaList::reattach(MediaQuerySet* mediaQueries) |
| 238 { | 238 { |
| 239 ASSERT(mediaQueries); | 239 ASSERT(mediaQueries); |
| 240 m_mediaQueries = mediaQueries; | 240 m_mediaQueries = mediaQueries; |
| 241 } | 241 } |
| 242 | 242 |
| 243 void MediaList::trace(Visitor* visitor) | 243 DEFINE_TRACE(MediaList) |
| 244 { | 244 { |
| 245 visitor->trace(m_mediaQueries); | 245 visitor->trace(m_mediaQueries); |
| 246 visitor->trace(m_parentStyleSheet); | 246 visitor->trace(m_parentStyleSheet); |
| 247 visitor->trace(m_parentRule); | 247 visitor->trace(m_parentRule); |
| 248 } | 248 } |
| 249 | 249 |
| 250 static void addResolutionWarningMessageToConsole(Document* document, const Strin g& serializedExpression, CSSPrimitiveValue::UnitType type) | 250 static void addResolutionWarningMessageToConsole(Document* document, const Strin g& serializedExpression, CSSPrimitiveValue::UnitType type) |
| 251 { | 251 { |
| 252 ASSERT(document); | 252 ASSERT(document); |
| 253 | 253 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 | 312 |
| 313 if (suspiciousType && !dotsPerPixelUsed) | 313 if (suspiciousType && !dotsPerPixelUsed) |
| 314 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText( ), suspiciousType); | 314 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText( ), suspiciousType); |
| 315 } | 315 } |
| 316 | 316 |
| 317 } | 317 } |
| OLD | NEW |