| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 m_queries[i] = o.m_queries[i]->copy(); | 65 m_queries[i] = o.m_queries[i]->copy(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQuerySet) | 68 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQuerySet) |
| 69 | 69 |
| 70 PassRefPtr<MediaQuerySet> MediaQuerySet::create(const String& mediaString) | 70 PassRefPtr<MediaQuerySet> MediaQuerySet::create(const String& mediaString) |
| 71 { | 71 { |
| 72 if (mediaString.isEmpty()) | 72 if (mediaString.isEmpty()) |
| 73 return MediaQuerySet::create(); | 73 return MediaQuerySet::create(); |
| 74 | 74 |
| 75 if (RuntimeEnabledFeatures::mediaQueryParserEnabled()) | 75 return MediaQueryParser::parseMediaQuerySet(mediaString); |
| 76 return MediaQueryParser::parseMediaQuerySet(mediaString); | |
| 77 | |
| 78 BisonCSSParser parser(strictCSSParserContext()); | |
| 79 return parser.parseMediaQueryList(mediaString); | |
| 80 } | 76 } |
| 81 | 77 |
| 82 PassRefPtr<MediaQuerySet> MediaQuerySet::createOffMainThread(const String& media
String) | 78 PassRefPtr<MediaQuerySet> MediaQuerySet::createOffMainThread(const String& media
String) |
| 83 { | 79 { |
| 84 if (mediaString.isEmpty()) | 80 if (mediaString.isEmpty()) |
| 85 return MediaQuerySet::create(); | 81 return MediaQuerySet::create(); |
| 86 | 82 |
| 87 return MediaQueryParser::parseMediaQuerySet(mediaString); | 83 return MediaQueryParser::parseMediaQuerySet(mediaString); |
| 88 } | 84 } |
| 89 | 85 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 236 } |
| 241 } | 237 } |
| 242 } | 238 } |
| 243 } | 239 } |
| 244 | 240 |
| 245 if (suspiciousType && !dotsPerPixelUsed) | 241 if (suspiciousType && !dotsPerPixelUsed) |
| 246 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(
), suspiciousType); | 242 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(
), suspiciousType); |
| 247 } | 243 } |
| 248 | 244 |
| 249 } | 245 } |
| OLD | NEW |