Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: Source/core/css/MediaList.h

Issue 187313005: Move StyleSheet to the oilpan heap using transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nullptr Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 String item(unsigned index) const; 85 String item(unsigned index) const;
86 void deleteMedium(const String& oldMedium, ExceptionState&); 86 void deleteMedium(const String& oldMedium, ExceptionState&);
87 void appendMedium(const String& newMedium, ExceptionState&); 87 void appendMedium(const String& newMedium, ExceptionState&);
88 88
89 String mediaText() const { return m_mediaQueries->mediaText(); } 89 String mediaText() const { return m_mediaQueries->mediaText(); }
90 void setMediaText(const String&); 90 void setMediaText(const String&);
91 91
92 // Not part of CSSOM. 92 // Not part of CSSOM.
93 CSSRule* parentRule() const { return m_parentRule; } 93 CSSRule* parentRule() const { return m_parentRule; }
94 CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } 94 CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
95 void clearParentStyleSheet() { ASSERT(m_parentStyleSheet); m_parentStyleShee t = 0; } 95 void clearParentStyleSheet() { ASSERT(m_parentStyleSheet); m_parentStyleShee t = nullptr; }
96 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; } 96 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; }
97 const MediaQuerySet* queries() const { return m_mediaQueries.get(); } 97 const MediaQuerySet* queries() const { return m_mediaQueries.get(); }
98 98
99 void reattach(MediaQuerySet*); 99 void reattach(MediaQuerySet*);
100 100
101 void trace(Visitor*); 101 void trace(Visitor*);
102 102
103 private: 103 private:
104 MediaList(); 104 MediaList();
105 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet); 105 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet);
106 MediaList(MediaQuerySet*, CSSRule* parentRule); 106 MediaList(MediaQuerySet*, CSSRule* parentRule);
107 107
108 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; 108 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries;
109 // Cleared in ~CSSStyleSheet destructor. 109 // Cleared in ~CSSStyleSheet destructor when oilpan is not enabled.
110 CSSStyleSheet* m_parentStyleSheet; 110 RawPtrWillBeMember<CSSStyleSheet> m_parentStyleSheet;
111 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i s not enabled. 111 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i s not enabled.
112 RawPtrWillBeMember<CSSRule> m_parentRule; 112 RawPtrWillBeMember<CSSRule> m_parentRule;
113 }; 113 };
114 114
115 // Adds message to inspector console whenever dpi or dpcm values are used for "s creen" media. 115 // Adds message to inspector console whenever dpi or dpcm values are used for "s creen" media.
116 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); 116 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*);
117 117
118 } // namespace 118 } // namespace
119 119
120 #endif 120 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698