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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp

Issue 1461193003: Revert of [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make patch applicable Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 m_defaultStyleSheet = parseUASheet(defaultRules); 96 m_defaultStyleSheet = parseUASheet(defaultRules);
97 m_defaultStyle->addRulesFromSheet(defaultStyleSheet(), screenEval()); 97 m_defaultStyle->addRulesFromSheet(defaultStyleSheet(), screenEval());
98 m_defaultPrintStyle->addRulesFromSheet(defaultStyleSheet(), printEval()); 98 m_defaultPrintStyle->addRulesFromSheet(defaultStyleSheet(), printEval());
99 99
100 // Quirks-mode rules. 100 // Quirks-mode rules.
101 String quirksRules = loadResourceAsASCIIString("quirks.css") + LayoutTheme:: theme().extraQuirksStyleSheet(); 101 String quirksRules = loadResourceAsASCIIString("quirks.css") + LayoutTheme:: theme().extraQuirksStyleSheet();
102 m_quirksStyleSheet = parseUASheet(quirksRules); 102 m_quirksStyleSheet = parseUASheet(quirksRules);
103 m_defaultQuirksStyle->addRulesFromSheet(quirksStyleSheet(), screenEval()); 103 m_defaultQuirksStyle->addRulesFromSheet(quirksStyleSheet(), screenEval());
104 } 104 }
105 105
106 RuleSet* CSSDefaultStyleSheets::defaultStyle() const
107 {
108 return m_defaultStyle.get();
109 }
110
111 RuleSet* CSSDefaultStyleSheets::defaultQuirksStyle() const
112 {
113 return m_defaultQuirksStyle.get();
114 }
115
116 RuleSet* CSSDefaultStyleSheets::defaultPrintStyle() const
117 {
118 return m_defaultPrintStyle.get();
119 }
120
121 RuleSet* CSSDefaultStyleSheets::defaultViewSourceStyle() 106 RuleSet* CSSDefaultStyleSheets::defaultViewSourceStyle()
122 { 107 {
123 if (!m_defaultViewSourceStyle) { 108 if (!m_defaultViewSourceStyle) {
124 m_defaultViewSourceStyle = RuleSet::create(); 109 m_defaultViewSourceStyle = RuleSet::create();
125 // Loaded stylesheet is leaked on purpose. 110 // Loaded stylesheet is leaked on purpose.
126 RefPtrWillBeRawPtr<StyleSheetContents> stylesheet = parseUASheet(loadRes ourceAsASCIIString("view-source.css")); 111 RefPtrWillBeRawPtr<StyleSheetContents> stylesheet = parseUASheet(loadRes ourceAsASCIIString("view-source.css"));
127 m_defaultViewSourceStyle->addRulesFromSheet(stylesheet.release().leakRef (), screenEval()); 112 m_defaultViewSourceStyle->addRulesFromSheet(stylesheet.release().leakRef (), screenEval());
128 } 113 }
129 return m_defaultViewSourceStyle.get(); 114 return m_defaultViewSourceStyle.get();
130 } 115 }
131 116
132 RuleSet* CSSDefaultStyleSheets::defaultXHTMLMobileProfileStyle() 117 RuleSet* CSSDefaultStyleSheets::defaultXHTMLMobileProfileStyle()
133 { 118 {
134 if (!m_defaultXHTMLMobileProfileStyle) { 119 if (!m_defaultXHTMLMobileProfileStyle) {
135 m_defaultXHTMLMobileProfileStyle = RuleSet::create(); 120 m_defaultXHTMLMobileProfileStyle = RuleSet::create();
136 // Loaded stylesheet is leaked on purpose. 121 // Loaded stylesheet is leaked on purpose.
137 RefPtrWillBeRawPtr<StyleSheetContents> stylesheet = parseUASheet(loadRes ourceAsASCIIString("xhtmlmp.css")); 122 RefPtrWillBeRawPtr<StyleSheetContents> stylesheet = parseUASheet(loadRes ourceAsASCIIString("xhtmlmp.css"));
138 m_defaultXHTMLMobileProfileStyle->addRulesFromSheet(stylesheet.release() .leakRef(), screenEval()); 123 m_defaultXHTMLMobileProfileStyle->addRulesFromSheet(stylesheet.release() .leakRef(), screenEval());
139 } 124 }
140 return m_defaultXHTMLMobileProfileStyle.get(); 125 return m_defaultXHTMLMobileProfileStyle.get();
141 } 126 }
142 127
143 StyleSheetContents* CSSDefaultStyleSheets::defaultStyleSheet() const
144 {
145 return m_defaultStyleSheet.get();
146 }
147
148 StyleSheetContents* CSSDefaultStyleSheets::quirksStyleSheet() const
149 {
150 return m_quirksStyleSheet.get();
151 }
152
153 StyleSheetContents* CSSDefaultStyleSheets::svgStyleSheet() const
154 {
155 return m_svgStyleSheet.get();
156 }
157
158 StyleSheetContents* CSSDefaultStyleSheets::mathmlStyleSheet() const
159 {
160 return m_mathmlStyleSheet.get();
161 }
162
163 StyleSheetContents* CSSDefaultStyleSheets::mediaControlsStyleSheet() const
164 {
165 return m_mediaControlsStyleSheet.get();
166 }
167
168 StyleSheetContents* CSSDefaultStyleSheets::fullscreenStyleSheet() const
169 {
170 return m_fullscreenStyleSheet.get();
171 }
172
173 RuleSet* CSSDefaultStyleSheets::defaultMobileViewportStyle() 128 RuleSet* CSSDefaultStyleSheets::defaultMobileViewportStyle()
174 { 129 {
175 if (!m_defaultMobileViewportStyle) { 130 if (!m_defaultMobileViewportStyle) {
176 m_defaultMobileViewportStyle = RuleSet::create(); 131 m_defaultMobileViewportStyle = RuleSet::create();
177 m_mobileViewportStyleSheet = parseUASheet(loadResourceAsASCIIString("vie wportAndroid.css")); 132 m_mobileViewportStyleSheet = parseUASheet(loadResourceAsASCIIString("vie wportAndroid.css"));
178 m_defaultMobileViewportStyle->addRulesFromSheet(m_mobileViewportStyleShe et.get(), screenEval()); 133 m_defaultMobileViewportStyle->addRulesFromSheet(m_mobileViewportStyleShe et.get(), screenEval());
179 } 134 }
180 return m_defaultMobileViewportStyle.get(); 135 return m_defaultMobileViewportStyle.get();
181 } 136 }
182 137
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 visitor->trace(m_defaultStyleSheet); 191 visitor->trace(m_defaultStyleSheet);
237 visitor->trace(m_mobileViewportStyleSheet); 192 visitor->trace(m_mobileViewportStyleSheet);
238 visitor->trace(m_quirksStyleSheet); 193 visitor->trace(m_quirksStyleSheet);
239 visitor->trace(m_svgStyleSheet); 194 visitor->trace(m_svgStyleSheet);
240 visitor->trace(m_mathmlStyleSheet); 195 visitor->trace(m_mathmlStyleSheet);
241 visitor->trace(m_mediaControlsStyleSheet); 196 visitor->trace(m_mediaControlsStyleSheet);
242 visitor->trace(m_fullscreenStyleSheet); 197 visitor->trace(m_fullscreenStyleSheet);
243 } 198 }
244 199
245 } // namespace blink 200 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.h ('k') | third_party/WebKit/Source/core/css/CSSFontFaceSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698