| OLD | NEW |
| 1 /* | 1 /* |
| 2 * CSS Media Query Evaluator | 2 * CSS Media Query Evaluator |
| 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) 2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 6 * Copyright (C) 2013 Intel Corporation. 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 , m_frame(frame) | 90 , m_frame(frame) |
| 91 , m_style(style) | 91 , m_style(style) |
| 92 , m_expResult(false) // Doesn't matter when we have m_frame and m_style. | 92 , m_expResult(false) // Doesn't matter when we have m_frame and m_style. |
| 93 { | 93 { |
| 94 } | 94 } |
| 95 | 95 |
| 96 MediaQueryEvaluator::~MediaQueryEvaluator() | 96 MediaQueryEvaluator::~MediaQueryEvaluator() |
| 97 { | 97 { |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool MediaQueryEvaluator::mediaTypeMatch(const AtomicString& mediaTypeToMatch) c
onst | 100 bool MediaQueryEvaluator::mediaTypeMatch(const String& mediaTypeToMatch) const |
| 101 { | 101 { |
| 102 return mediaTypeToMatch.isEmpty() | 102 return mediaTypeToMatch.isEmpty() |
| 103 || equalIgnoringCase(mediaTypeToMatch, "all") | 103 || equalIgnoringCase(mediaTypeToMatch, "all") |
| 104 || equalIgnoringCase(mediaTypeToMatch, m_mediaType); | 104 || equalIgnoringCase(mediaTypeToMatch, m_mediaType); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool MediaQueryEvaluator::mediaTypeMatchSpecific(const char* mediaTypeToMatch) c
onst | 107 bool MediaQueryEvaluator::mediaTypeMatchSpecific(const char* mediaTypeToMatch) c
onst |
| 108 { | 108 { |
| 109 // Like mediaTypeMatch, but without the special cases for "" and "all". | 109 // Like mediaTypeMatch, but without the special cases for "" and "all". |
| 110 ASSERT(mediaTypeToMatch); | 110 ASSERT(mediaTypeToMatch); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 // Call the media feature evaluation function. Assume no prefix and let | 687 // Call the media feature evaluation function. Assume no prefix and let |
| 688 // trampoline functions override the prefix if prefix is used. | 688 // trampoline functions override the prefix if prefix is used. |
| 689 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); | 689 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); |
| 690 if (func) | 690 if (func) |
| 691 return func(expr->value(), m_style.get(), m_frame, NoPrefix); | 691 return func(expr->value(), m_style.get(), m_frame, NoPrefix); |
| 692 | 692 |
| 693 return false; | 693 return false; |
| 694 } | 694 } |
| 695 | 695 |
| 696 } // namespace | 696 } // namespace |
| OLD | NEW |