| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ~MediaQuerySet(); | 46 ~MediaQuerySet(); |
| 47 | 47 |
| 48 bool set(const String&); | 48 bool set(const String&); |
| 49 bool add(const String&); | 49 bool add(const String&); |
| 50 bool remove(const String&); | 50 bool remove(const String&); |
| 51 | 51 |
| 52 void addMediaQuery(PassOwnPtr<MediaQuery>); | 52 void addMediaQuery(PassOwnPtr<MediaQuery>); |
| 53 | 53 |
| 54 const Vector<OwnPtr<MediaQuery> >& queryVector() const { return m_queries; } | 54 const Vector<OwnPtr<MediaQuery> >& queryVector() const { return m_queries; } |
| 55 | 55 |
| 56 int lastLine() const { return m_lastLine; } | |
| 57 void setLastLine(int lastLine) { m_lastLine = lastLine; } | |
| 58 | |
| 59 String mediaText() const; | 56 String mediaText() const; |
| 60 | 57 |
| 61 PassRefPtr<MediaQuerySet> copy() const { return adoptRef(new MediaQuerySet(*
this)); } | 58 PassRefPtr<MediaQuerySet> copy() const { return adoptRef(new MediaQuerySet(*
this)); } |
| 62 | 59 |
| 63 void reportMemoryUsage(MemoryObjectInfo*) const; | 60 void reportMemoryUsage(MemoryObjectInfo*) const; |
| 64 | 61 |
| 65 private: | 62 private: |
| 66 MediaQuerySet(); | 63 MediaQuerySet(); |
| 67 MediaQuerySet(const MediaQuerySet&); | 64 MediaQuerySet(const MediaQuerySet&); |
| 68 | 65 |
| 69 unsigned m_lastLine; | |
| 70 Vector<OwnPtr<MediaQuery> > m_queries; | 66 Vector<OwnPtr<MediaQuery> > m_queries; |
| 71 }; | 67 }; |
| 72 | 68 |
| 73 class MediaList : public RefCounted<MediaList> { | 69 class MediaList : public RefCounted<MediaList> { |
| 74 public: | 70 public: |
| 75 static PassRefPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSStyleShe
et* parentSheet) | 71 static PassRefPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSStyleShe
et* parentSheet) |
| 76 { | 72 { |
| 77 return adoptRef(new MediaList(mediaQueries, parentSheet)); | 73 return adoptRef(new MediaList(mediaQueries, parentSheet)); |
| 78 } | 74 } |
| 79 static PassRefPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSRule* pa
rentRule) | 75 static PassRefPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSRule* pa
rentRule) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 CSSStyleSheet* m_parentStyleSheet; | 107 CSSStyleSheet* m_parentStyleSheet; |
| 112 CSSRule* m_parentRule; | 108 CSSRule* m_parentRule; |
| 113 }; | 109 }; |
| 114 | 110 |
| 115 // Adds message to inspector console whenever dpi or dpcm values are used for "s
creen" media. | 111 // Adds message to inspector console whenever dpi or dpcm values are used for "s
creen" media. |
| 116 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); | 112 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); |
| 117 | 113 |
| 118 } // namespace | 114 } // namespace |
| 119 | 115 |
| 120 #endif | 116 #endif |
| OLD | NEW |