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 30 matching lines...) Expand all Loading... |
41 class MediaQueryExp; | 41 class MediaQueryExp; |
42 | 42 |
43 using ExpressionHeapVector = HeapVector<Member<MediaQueryExp>>; | 43 using ExpressionHeapVector = HeapVector<Member<MediaQueryExp>>; |
44 | 44 |
45 class CORE_EXPORT MediaQuery : public GarbageCollectedFinalized<MediaQuery> { | 45 class CORE_EXPORT MediaQuery : public GarbageCollectedFinalized<MediaQuery> { |
46 public: | 46 public: |
47 enum RestrictorType { | 47 enum RestrictorType { |
48 Only, Not, None | 48 Only, Not, None |
49 }; | 49 }; |
50 | 50 |
51 static RawPtr<MediaQuery> create(RestrictorType, String mediaType, Expressio
nHeapVector); | 51 static MediaQuery* create(RestrictorType, String mediaType, ExpressionHeapVe
ctor); |
52 static RawPtr<MediaQuery> createNotAll(); | 52 static MediaQuery* createNotAll(); |
53 | 53 |
54 ~MediaQuery(); | 54 ~MediaQuery(); |
55 | 55 |
56 RestrictorType restrictor() const { return m_restrictor; } | 56 RestrictorType restrictor() const { return m_restrictor; } |
57 const ExpressionHeapVector& expressions() const { return m_expressions; } | 57 const ExpressionHeapVector& expressions() const { return m_expressions; } |
58 const String& mediaType() const { return m_mediaType; } | 58 const String& mediaType() const { return m_mediaType; } |
59 bool operator==(const MediaQuery& other) const; | 59 bool operator==(const MediaQuery& other) const; |
60 String cssText() const; | 60 String cssText() const; |
61 | 61 |
62 RawPtr<MediaQuery> copy() const { return new MediaQuery(*this); } | 62 MediaQuery* copy() const { return new MediaQuery(*this); } |
63 | 63 |
64 DECLARE_TRACE(); | 64 DECLARE_TRACE(); |
65 | 65 |
66 private: | 66 private: |
67 MediaQuery(RestrictorType, String mediaType, ExpressionHeapVector); | 67 MediaQuery(RestrictorType, String mediaType, ExpressionHeapVector); |
68 MediaQuery(const MediaQuery&); | 68 MediaQuery(const MediaQuery&); |
69 | 69 |
70 MediaQuery& operator=(const MediaQuery&) = delete; | 70 MediaQuery& operator=(const MediaQuery&) = delete; |
71 | 71 |
72 RestrictorType m_restrictor; | 72 RestrictorType m_restrictor; |
73 String m_mediaType; | 73 String m_mediaType; |
74 ExpressionHeapVector m_expressions; | 74 ExpressionHeapVector m_expressions; |
75 String m_serializationCache; | 75 String m_serializationCache; |
76 | 76 |
77 String serialize() const; | 77 String serialize() const; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace blink | 80 } // namespace blink |
81 | 81 |
82 #endif | 82 #endif |
OLD | NEW |