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 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::create(const String& mediaS
tring) | 70 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::create(const String& mediaS
tring) |
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 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::createOffMainThread(const S
tring& mediaString) | 78 PassRefPtrWillBeRawPtr<MediaQuerySet> MediaQuerySet::createOffMainThread(const S
tring& mediaString) |
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 } | 311 } |
316 } | 312 } |
317 } | 313 } |
318 } | 314 } |
319 | 315 |
320 if (suspiciousType && !dotsPerPixelUsed) | 316 if (suspiciousType && !dotsPerPixelUsed) |
321 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(
), suspiciousType); | 317 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(
), suspiciousType); |
322 } | 318 } |
323 | 319 |
324 } | 320 } |
OLD | NEW |