| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 typedef WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > ExpressionHeapVecto
r; | 41 typedef WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > ExpressionHeapVecto
r; |
| 42 | 42 |
| 43 class MediaQuery : public NoBaseWillBeGarbageCollectedFinalized<MediaQuery> { | 43 class MediaQuery : public NoBaseWillBeGarbageCollectedFinalized<MediaQuery> { |
| 44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 45 public: | 45 public: |
| 46 enum Restrictor { | 46 enum Restrictor { |
| 47 Only, Not, None | 47 Only, Not, None |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 MediaQuery(Restrictor, const AtomicString& mediaType, PassOwnPtrWillBeRawPtr
<ExpressionHeapVector> exprs); | 50 MediaQuery(Restrictor, const String& mediaType, PassOwnPtrWillBeRawPtr<Expre
ssionHeapVector> exprs); |
| 51 ~MediaQuery(); | 51 ~MediaQuery(); |
| 52 | 52 |
| 53 Restrictor restrictor() const { return m_restrictor; } | 53 Restrictor restrictor() const { return m_restrictor; } |
| 54 const ExpressionHeapVector& expressions() const { return *m_expressions; } | 54 const ExpressionHeapVector& expressions() const { return *m_expressions; } |
| 55 const AtomicString& mediaType() const { return m_mediaType; } | 55 const String& mediaType() const { return m_mediaType; } |
| 56 bool operator==(const MediaQuery& other) const; | 56 bool operator==(const MediaQuery& other) const; |
| 57 String cssText() const; | 57 String cssText() const; |
| 58 | 58 |
| 59 PassOwnPtrWillBeRawPtr<MediaQuery> copy() const { return adoptPtrWillBeNoop(
new MediaQuery(*this)); } | 59 PassOwnPtrWillBeRawPtr<MediaQuery> copy() const { return adoptPtrWillBeNoop(
new MediaQuery(*this)); } |
| 60 | 60 |
| 61 void trace(Visitor*); | 61 void trace(Visitor*); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 MediaQuery(const MediaQuery&); | 64 MediaQuery(const MediaQuery&); |
| 65 | 65 |
| 66 Restrictor m_restrictor; | 66 Restrictor m_restrictor; |
| 67 AtomicString m_mediaType; | 67 String m_mediaType; |
| 68 OwnPtrWillBeMember<ExpressionHeapVector> m_expressions; | 68 OwnPtrWillBeMember<ExpressionHeapVector> m_expressions; |
| 69 String m_serializationCache; | 69 String m_serializationCache; |
| 70 | 70 |
| 71 String serialize() const; | 71 String serialize() const; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 #endif | 76 #endif |
| OLD | NEW |