Chromium Code Reviews| 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 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef MediaQueryEvaluator_h | 28 #ifndef MediaQueryEvaluator_h |
| 29 #define MediaQueryEvaluator_h | 29 #define MediaQueryEvaluator_h |
| 30 | 30 |
| 31 #include "heap/Handle.h" | |
| 31 #include "wtf/text/WTFString.h" | 32 #include "wtf/text/WTFString.h" |
| 32 | 33 |
| 33 namespace WebCore { | 34 namespace WebCore { |
| 34 class LocalFrame; | 35 class LocalFrame; |
| 35 class MediaQueryExp; | 36 class MediaQueryExp; |
| 36 class MediaQueryResult; | 37 class MediaQueryResult; |
| 37 class MediaQuerySet; | 38 class MediaQuerySet; |
| 38 class RenderStyle; | 39 class RenderStyle; |
| 39 | 40 |
| 40 typedef Vector<RefPtr<MediaQueryResult> > MediaQueryResultList; | 41 typedef WillBePersistentHeapVector<RefPtrWillBeMember<MediaQueryResult> > MediaQ ueryResultList; |
|
zerny-chromium
2014/03/05 06:38:40
Maybe this should be expanded at the use sites. It
wibling-chromium
2014/03/05 08:09:42
Agree. I will fix this is a subsequent change to n
| |
| 41 | 42 |
| 42 /** | 43 /** |
| 43 * Class that evaluates css media queries as defined in | 44 * Class that evaluates css media queries as defined in |
| 44 * CSS3 Module "Media Queries" (http://www.w3.org/TR/css3-mediaqueries/) | 45 * CSS3 Module "Media Queries" (http://www.w3.org/TR/css3-mediaqueries/) |
| 45 * Special constructors are needed, if simple media queries are to be | 46 * Special constructors are needed, if simple media queries are to be |
| 46 * evaluated without knowledge of the medium features. This can happen | 47 * evaluated without knowledge of the medium features. This can happen |
| 47 * for example when parsing UA stylesheets, if evaluation is done | 48 * for example when parsing UA stylesheets, if evaluation is done |
| 48 * right after parsing. | 49 * right after parsing. |
| 49 * | 50 * |
| 50 * the boolean parameter is used to approximate results of evaluation, if | 51 * the boolean parameter is used to approximate results of evaluation, if |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 | 84 |
| 84 private: | 85 private: |
| 85 AtomicString m_mediaType; | 86 AtomicString m_mediaType; |
| 86 LocalFrame* m_frame; // Not owned. | 87 LocalFrame* m_frame; // Not owned. |
| 87 RefPtr<RenderStyle> m_style; | 88 RefPtr<RenderStyle> m_style; |
| 88 bool m_expResult; | 89 bool m_expResult; |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace | 92 } // namespace |
| 92 #endif | 93 #endif |
| OLD | NEW |