| 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 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (isID) | 73 if (isID) |
| 74 return (id == expValue.id); | 74 return (id == expValue.id); |
| 75 if (isValue) | 75 if (isValue) |
| 76 return (value == expValue.value); | 76 return (value == expValue.value); |
| 77 if (isRatio) | 77 if (isRatio) |
| 78 return (numerator == expValue.numerator && denominator == expValue.d
enominator); | 78 return (numerator == expValue.numerator && denominator == expValue.d
enominator); |
| 79 return !expValue.isValid(); | 79 return !expValue.isValid(); |
| 80 } | 80 } |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 class CORE_EXPORT MediaQueryExp : public NoBaseWillBeGarbageCollectedFinalized<
MediaQueryExp> { | 83 class CORE_EXPORT MediaQueryExp : public GarbageCollectedFinalized<MediaQueryEx
p> { |
| 84 USING_FAST_MALLOC_WILL_BE_REMOVED(MediaQueryExp); | |
| 85 public: | 84 public: |
| 86 static PassOwnPtrWillBeRawPtr<MediaQueryExp> createIfValid(const String& med
iaFeature, const Vector<CSSParserToken, 4>&); | 85 static RawPtr<MediaQueryExp> createIfValid(const String& mediaFeature, const
Vector<CSSParserToken, 4>&); |
| 87 ~MediaQueryExp(); | 86 ~MediaQueryExp(); |
| 88 | 87 |
| 89 const String& mediaFeature() const { return m_mediaFeature; } | 88 const String& mediaFeature() const { return m_mediaFeature; } |
| 90 | 89 |
| 91 MediaQueryExpValue expValue() const { return m_expValue; } | 90 MediaQueryExpValue expValue() const { return m_expValue; } |
| 92 | 91 |
| 93 bool operator==(const MediaQueryExp& other) const; | 92 bool operator==(const MediaQueryExp& other) const; |
| 94 | 93 |
| 95 bool isViewportDependent() const; | 94 bool isViewportDependent() const; |
| 96 | 95 |
| 97 bool isDeviceDependent() const; | 96 bool isDeviceDependent() const; |
| 98 | 97 |
| 99 String serialize() const; | 98 String serialize() const; |
| 100 | 99 |
| 101 PassOwnPtrWillBeRawPtr<MediaQueryExp> copy() const { return adoptPtrWillBeNo
op(new MediaQueryExp(*this)); } | 100 RawPtr<MediaQueryExp> copy() const { return new MediaQueryExp(*this); } |
| 102 | 101 |
| 103 MediaQueryExp(const MediaQueryExp& other); | 102 MediaQueryExp(const MediaQueryExp& other); |
| 104 | 103 |
| 105 DEFINE_INLINE_TRACE() { } | 104 DEFINE_INLINE_TRACE() { } |
| 106 | 105 |
| 107 private: | 106 private: |
| 108 MediaQueryExp(const String&, const MediaQueryExpValue&); | 107 MediaQueryExp(const String&, const MediaQueryExpValue&); |
| 109 | 108 |
| 110 String m_mediaFeature; | 109 String m_mediaFeature; |
| 111 MediaQueryExpValue m_expValue; | 110 MediaQueryExpValue m_expValue; |
| 112 }; | 111 }; |
| 113 | 112 |
| 114 } // namespace blink | 113 } // namespace blink |
| 115 | 114 |
| 116 #endif | 115 #endif |
| OLD | NEW |