| OLD | NEW |
| 1 /* | 1 /* |
| 2 * CSS Media Query | 2 * CSS Media Query |
| 3 * | 3 * |
| 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. | 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. |
| 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 6 * Copyright (C) 2013 Apple Inc. All rights reserved. | 6 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 , m_expValue(other.expValue()) | 196 , m_expValue(other.expValue()) |
| 197 { | 197 { |
| 198 } | 198 } |
| 199 | 199 |
| 200 MediaQueryExp::MediaQueryExp(const String& mediaFeature, const MediaQueryExpValu
e& expValue) | 200 MediaQueryExp::MediaQueryExp(const String& mediaFeature, const MediaQueryExpValu
e& expValue) |
| 201 : m_mediaFeature(mediaFeature) | 201 : m_mediaFeature(mediaFeature) |
| 202 , m_expValue(expValue) | 202 , m_expValue(expValue) |
| 203 { | 203 { |
| 204 } | 204 } |
| 205 | 205 |
| 206 RawPtr<MediaQueryExp> MediaQueryExp::createIfValid(const String& mediaFeature, c
onst Vector<CSSParserToken, 4>& tokenList) | 206 MediaQueryExp* MediaQueryExp::createIfValid(const String& mediaFeature, const Ve
ctor<CSSParserToken, 4>& tokenList) |
| 207 { | 207 { |
| 208 ASSERT(!mediaFeature.isNull()); | 208 ASSERT(!mediaFeature.isNull()); |
| 209 | 209 |
| 210 MediaQueryExpValue expValue; | 210 MediaQueryExpValue expValue; |
| 211 String lowerMediaFeature = attemptStaticStringCreation(mediaFeature.lower())
; | 211 String lowerMediaFeature = attemptStaticStringCreation(mediaFeature.lower())
; |
| 212 | 212 |
| 213 // Create value for media query expression that must have 1 or more values. | 213 // Create value for media query expression that must have 1 or more values. |
| 214 if (tokenList.size() == 0 && featureWithoutValue(lowerMediaFeature)) { | 214 if (tokenList.size() == 0 && featureWithoutValue(lowerMediaFeature)) { |
| 215 // Valid, creates a MediaQueryExp with an 'invalid' MediaQueryExpValue | 215 // Valid, creates a MediaQueryExp with an 'invalid' MediaQueryExpValue |
| 216 } else if (tokenList.size() == 1) { | 216 } else if (tokenList.size() == 1) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 output.append('/'); | 311 output.append('/'); |
| 312 output.append(printNumber(denominator)); | 312 output.append(printNumber(denominator)); |
| 313 } else if (isID) { | 313 } else if (isID) { |
| 314 output.append(getValueName(id)); | 314 output.append(getValueName(id)); |
| 315 } | 315 } |
| 316 | 316 |
| 317 return output.toString(); | 317 return output.toString(); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace blink | 320 } // namespace blink |
| OLD | NEW |