| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 class CSSRule; | 33 class CSSRule; |
| 34 class CSSStyleSheet; | 34 class CSSStyleSheet; |
| 35 class Document; | 35 class Document; |
| 36 class MediaList; | 36 class MediaList; |
| 37 class MediaQuery; | 37 class MediaQuery; |
| 38 | 38 |
| 39 enum MediaQueryParserMode { | 39 enum MediaQueryParserMode { |
| 40 MediaQueryNormalMode, | 40 MediaQueryNormalMode, |
| 41 MediaQueryForwardCompatibleSyntaxMode, | |
| 42 MediaQueryStrictMode, | 41 MediaQueryStrictMode, |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 class MediaQuerySet : public RefCounted<MediaQuerySet> { | 44 class MediaQuerySet : public RefCounted<MediaQuerySet> { |
| 46 public: | 45 public: |
| 47 static PassRefPtr<MediaQuerySet> create() | 46 static PassRefPtr<MediaQuerySet> create() |
| 48 { | 47 { |
| 49 return adoptRef(new MediaQuerySet()); | 48 return adoptRef(new MediaQuerySet()); |
| 50 } | 49 } |
| 51 static PassRefPtr<MediaQuerySet> create(const String& mediaString) | 50 static PassRefPtr<MediaQuerySet> create(const String& mediaString) |
| 52 { | 51 { |
| 53 return adoptRef(new MediaQuerySet(mediaString, MediaQueryNormalMode)); | 52 return adoptRef(new MediaQuerySet(mediaString, MediaQueryNormalMode)); |
| 54 } | 53 } |
| 55 static PassRefPtr<MediaQuerySet> createAllowingDescriptionSyntax(const Strin
g& mediaString) | |
| 56 { | |
| 57 return adoptRef(new MediaQuerySet(mediaString, MediaQueryForwardCompatib
leSyntaxMode)); | |
| 58 } | |
| 59 ~MediaQuerySet(); | 54 ~MediaQuerySet(); |
| 60 | 55 |
| 61 bool set(const String&); | 56 bool set(const String&); |
| 62 bool add(const String&); | 57 bool add(const String&); |
| 63 bool remove(const String&); | 58 bool remove(const String&); |
| 64 | 59 |
| 65 void addMediaQuery(PassOwnPtr<MediaQuery>); | 60 void addMediaQuery(PassOwnPtr<MediaQuery>); |
| 66 | 61 |
| 67 const Vector<OwnPtr<MediaQuery> >& queryVector() const { return m_queries; } | 62 const Vector<OwnPtr<MediaQuery> >& queryVector() const { return m_queries; } |
| 68 | 63 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 CSSStyleSheet* m_parentStyleSheet; | 126 CSSStyleSheet* m_parentStyleSheet; |
| 132 CSSRule* m_parentRule; | 127 CSSRule* m_parentRule; |
| 133 }; | 128 }; |
| 134 | 129 |
| 135 // Adds message to inspector console whenever dpi or dpcm values are used for "s
creen" media. | 130 // Adds message to inspector console whenever dpi or dpcm values are used for "s
creen" media. |
| 136 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); | 131 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); |
| 137 | 132 |
| 138 } // namespace | 133 } // namespace |
| 139 | 134 |
| 140 #endif | 135 #endif |
| OLD | NEW |