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 22 matching lines...) Expand all Loading... |
33 #include "core/css/CSSValue.h" | 33 #include "core/css/CSSValue.h" |
34 #include "wtf/PassOwnPtr.h" | 34 #include "wtf/PassOwnPtr.h" |
35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 class CSSParserValueList; | 38 class CSSParserValueList; |
39 | 39 |
40 class MediaQueryExp : public NoBaseWillBeGarbageCollectedFinalized<MediaQueryExp
> { | 40 class MediaQueryExp : public NoBaseWillBeGarbageCollectedFinalized<MediaQueryExp
> { |
41 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 41 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
42 public: | 42 public: |
43 static PassOwnPtrWillBeRawPtr<MediaQueryExp> create(const String& mediaFeatu
re, CSSParserValueList*); | 43 static PassOwnPtrWillBeRawPtr<MediaQueryExp> createIfValid(const String& med
iaFeature, CSSParserValueList*); |
44 ~MediaQueryExp(); | 44 ~MediaQueryExp(); |
45 | 45 |
46 const String& mediaFeature() const { return m_mediaFeature; } | 46 const String& mediaFeature() const { return m_mediaFeature; } |
47 | 47 |
48 CSSValue* value() const { return m_value.get(); } | 48 CSSValue* value() const { return m_value.get(); } |
49 | 49 |
50 bool operator==(const MediaQueryExp& other) const | 50 bool operator==(const MediaQueryExp& other) const |
51 { | 51 { |
52 return (other.m_mediaFeature == m_mediaFeature) | 52 return (other.m_mediaFeature == m_mediaFeature) |
53 && ((!other.m_value && !m_value) | 53 && ((!other.m_value && !m_value) |
(...skipping 13 matching lines...) Expand all Loading... |
67 private: | 67 private: |
68 MediaQueryExp(const String&, PassRefPtrWillBeRawPtr<CSSValue>); | 68 MediaQueryExp(const String&, PassRefPtrWillBeRawPtr<CSSValue>); |
69 | 69 |
70 String m_mediaFeature; | 70 String m_mediaFeature; |
71 RefPtrWillBeMember<CSSValue> m_value; | 71 RefPtrWillBeMember<CSSValue> m_value; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace | 74 } // namespace |
75 | 75 |
76 #endif | 76 #endif |
OLD | NEW |