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

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

Issue 1562353004: Oilpan: hold onto MediaQueryEvaluator singletons with Persistents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | 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 * 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 using namespace HTMLNames; 44 using namespace HTMLNames;
45 45
46 CSSDefaultStyleSheets& CSSDefaultStyleSheets::instance() 46 CSSDefaultStyleSheets& CSSDefaultStyleSheets::instance()
47 { 47 {
48 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<CSSDefaultStyleSheets>, cssDefaul tStyleSheets, (adoptPtrWillBeNoop(new CSSDefaultStyleSheets()))); 48 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<CSSDefaultStyleSheets>, cssDefaul tStyleSheets, (adoptPtrWillBeNoop(new CSSDefaultStyleSheets())));
49 return *cssDefaultStyleSheets; 49 return *cssDefaultStyleSheets;
50 } 50 }
51 51
52 static const MediaQueryEvaluator& screenEval() 52 static const MediaQueryEvaluator& screenEval()
53 { 53 {
54 DEFINE_STATIC_LOCAL(const MediaQueryEvaluator, staticScreenEval, ("screen")) ; 54 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<MediaQueryEvaluator>, staticScree nEval, (adoptPtrWillBeNoop (new MediaQueryEvaluator("screen"))));
55 return staticScreenEval; 55 return *staticScreenEval;
56 } 56 }
57 57
58 static const MediaQueryEvaluator& printEval() 58 static const MediaQueryEvaluator& printEval()
59 { 59 {
60 DEFINE_STATIC_LOCAL(const MediaQueryEvaluator, staticPrintEval, ("print")); 60 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<MediaQueryEvaluator>, staticPrint Eval, (adoptPtrWillBeNoop (new MediaQueryEvaluator("print"))));
61 return staticPrintEval; 61 return *staticPrintEval;
62 } 62 }
63 63
64 static PassRefPtrWillBeRawPtr<StyleSheetContents> parseUASheet(const String& str ) 64 static PassRefPtrWillBeRawPtr<StyleSheetContents> parseUASheet(const String& str )
65 { 65 {
66 RefPtrWillBeRawPtr<StyleSheetContents> sheet = StyleSheetContents::create(CS SParserContext(UASheetMode, 0)); 66 RefPtrWillBeRawPtr<StyleSheetContents> sheet = StyleSheetContents::create(CS SParserContext(UASheetMode, 0));
67 sheet->parseString(str); 67 sheet->parseString(str);
68 // User Agent stylesheets are parsed once for the lifetime of the renderer 68 // User Agent stylesheets are parsed once for the lifetime of the renderer
69 // process and are intentionally leaked. 69 // process and are intentionally leaked.
70 LEAK_SANITIZER_IGNORE_OBJECT(sheet.get()); 70 LEAK_SANITIZER_IGNORE_OBJECT(sheet.get());
71 return sheet.release(); 71 return sheet.release();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 visitor->trace(m_defaultStyleSheet); 190 visitor->trace(m_defaultStyleSheet);
191 visitor->trace(m_mobileViewportStyleSheet); 191 visitor->trace(m_mobileViewportStyleSheet);
192 visitor->trace(m_quirksStyleSheet); 192 visitor->trace(m_quirksStyleSheet);
193 visitor->trace(m_svgStyleSheet); 193 visitor->trace(m_svgStyleSheet);
194 visitor->trace(m_mathmlStyleSheet); 194 visitor->trace(m_mathmlStyleSheet);
195 visitor->trace(m_mediaControlsStyleSheet); 195 visitor->trace(m_mediaControlsStyleSheet);
196 visitor->trace(m_fullscreenStyleSheet); 196 visitor->trace(m_fullscreenStyleSheet);
197 } 197 }
198 198
199 } // namespace blink 199 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698