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

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: Remove clearParentXYZ methods when compiling with oilpan 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
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/css/MediaList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
96 #if !ENABLE(OILPAN)
97 void clearParentStyleSheet() { ASSERT(m_parentStyleSheet); m_parentStyleShee t = nullptr; }
96 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; } 98 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; }
99 #endif
100
97 const MediaQuerySet* queries() const { return m_mediaQueries.get(); } 101 const MediaQuerySet* queries() const { return m_mediaQueries.get(); }
98 102
99 void reattach(MediaQuerySet*); 103 void reattach(MediaQuerySet*);
100 104
101 void trace(Visitor*); 105 void trace(Visitor*);
102 106
103 private: 107 private:
104 MediaList(); 108 MediaList();
105 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet); 109 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet);
106 MediaList(MediaQuerySet*, CSSRule* parentRule); 110 MediaList(MediaQuerySet*, CSSRule* parentRule);
107 111
108 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; 112 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries;
109 // Cleared in ~CSSStyleSheet destructor. 113 // Cleared in ~CSSStyleSheet destructor when oilpan is not enabled.
110 CSSStyleSheet* m_parentStyleSheet; 114 RawPtrWillBeMember<CSSStyleSheet> m_parentStyleSheet;
111 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i s not enabled. 115 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i s not enabled.
112 RawPtrWillBeMember<CSSRule> m_parentRule; 116 RawPtrWillBeMember<CSSRule> m_parentRule;
113 }; 117 };
114 118
115 // Adds message to inspector console whenever dpi or dpcm values are used for "s creen" media. 119 // Adds message to inspector console whenever dpi or dpcm values are used for "s creen" media.
116 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); 120 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*);
117 121
118 } // namespace 122 } // namespace
119 123
120 #endif 124 #endif
OLDNEW
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/css/MediaList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698