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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 MediaQuerySet::MediaQuerySet(const MediaQuerySet& o) | 60 MediaQuerySet::MediaQuerySet(const MediaQuerySet& o) |
61 : m_queries(o.m_queries.size()) | 61 : m_queries(o.m_queries.size()) |
62 { | 62 { |
63 for (unsigned i = 0; i < m_queries.size(); ++i) | 63 for (unsigned i = 0; i < m_queries.size(); ++i) |
64 m_queries[i] = o.m_queries[i]->copy(); | 64 m_queries[i] = o.m_queries[i]->copy(); |
65 } | 65 } |
66 | 66 |
67 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQuerySet) | 67 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQuerySet); |
68 | 68 |
69 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::create(const String& mediaS
tring) | 69 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::create(const String& mediaS
tring) |
70 { | 70 { |
71 if (mediaString.isEmpty()) | 71 if (mediaString.isEmpty()) |
72 return MediaQuerySet::create(); | 72 return MediaQuerySet::create(); |
73 | 73 |
74 return MediaQueryParser::parseMediaQuerySet(mediaString); | 74 return MediaQueryParser::parseMediaQuerySet(mediaString); |
75 } | 75 } |
76 | 76 |
77 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::createOffMainThread(const S
tring& mediaString) | 77 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::createOffMainThread(const S
tring& mediaString) |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 { | 180 { |
181 } | 181 } |
182 | 182 |
183 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSRule* parentRule) | 183 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSRule* parentRule) |
184 : m_mediaQueries(mediaQueries) | 184 : m_mediaQueries(mediaQueries) |
185 , m_parentStyleSheet(nullptr) | 185 , m_parentStyleSheet(nullptr) |
186 , m_parentRule(parentRule) | 186 , m_parentRule(parentRule) |
187 { | 187 { |
188 } | 188 } |
189 | 189 |
190 MediaList::~MediaList() | 190 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaList); |
191 { | |
192 } | |
193 | 191 |
194 void MediaList::setMediaText(const String& value) | 192 void MediaList::setMediaText(const String& value) |
195 { | 193 { |
196 CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule); | 194 CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule); |
197 | 195 |
198 m_mediaQueries->set(value); | 196 m_mediaQueries->set(value); |
199 | 197 |
200 if (m_parentStyleSheet) | 198 if (m_parentStyleSheet) |
201 m_parentStyleSheet->didMutate(); | 199 m_parentStyleSheet->didMutate(); |
202 } | 200 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 } | 308 } |
311 } | 309 } |
312 } | 310 } |
313 } | 311 } |
314 | 312 |
315 if (suspiciousType && !dotsPerPixelUsed) | 313 if (suspiciousType && !dotsPerPixelUsed) |
316 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(
), suspiciousType); | 314 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(
), suspiciousType); |
317 } | 315 } |
318 | 316 |
319 } | 317 } |
OLD | NEW |