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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 } | 197 } |
198 return false; | 198 return false; |
199 } | 199 } |
200 | 200 |
201 void MediaQuerySet::addMediaQuery(PassOwnPtr<MediaQuery> mediaQuery) | 201 void MediaQuerySet::addMediaQuery(PassOwnPtr<MediaQuery> mediaQuery) |
202 { | 202 { |
203 m_queries.append(mediaQuery); | 203 m_queries.append(mediaQuery); |
204 } | 204 } |
205 | 205 |
| 206 void MediaQuerySet::replaceLastMediaQuery(PassOwnPtr<MediaQuery> mediaQuery) |
| 207 { |
| 208 m_queries.removeLast(); |
| 209 m_queries.append(mediaQuery); |
| 210 } |
| 211 |
206 String MediaQuerySet::mediaText() const | 212 String MediaQuerySet::mediaText() const |
207 { | 213 { |
208 StringBuilder text; | 214 StringBuilder text; |
209 | 215 |
210 bool first = true; | 216 bool first = true; |
211 for (size_t i = 0; i < m_queries.size(); ++i) { | 217 for (size_t i = 0; i < m_queries.size(); ++i) { |
212 if (!first) | 218 if (!first) |
213 text.appendLiteral(", "); | 219 text.appendLiteral(", "); |
214 else | 220 else |
215 first = false; | 221 first = false; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 addResolutionWarningMessageToConsole(document, media
QuerySet->mediaText(), primitiveValue); | 361 addResolutionWarningMessageToConsole(document, media
QuerySet->mediaText(), primitiveValue); |
356 } | 362 } |
357 } | 363 } |
358 } | 364 } |
359 } | 365 } |
360 } | 366 } |
361 } | 367 } |
362 #endif | 368 #endif |
363 | 369 |
364 } | 370 } |
OLD | NEW |