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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 273843003: [Oilpan]: Make StylePropertySet fully garbage collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review feedback Created 6 years, 6 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 * 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, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } // namespace 100 } // namespace
101 101
102 namespace WebCore { 102 namespace WebCore {
103 103
104 using namespace HTMLNames; 104 using namespace HTMLNames;
105 105
106 RenderStyle* StyleResolver::s_styleNotYetAvailable; 106 RenderStyle* StyleResolver::s_styleNotYetAvailable;
107 107
108 static StylePropertySet* leftToRightDeclaration() 108 static StylePropertySet* leftToRightDeclaration()
109 { 109 {
110 DEFINE_STATIC_REF(MutableStylePropertySet, leftToRightDecl, (MutableStylePro pertySet::create())); 110 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(MutableStylePropertySet, leftToRightDec l, (MutableStylePropertySet::create()));
111 if (leftToRightDecl->isEmpty()) 111 if (leftToRightDecl->isEmpty())
112 leftToRightDecl->setProperty(CSSPropertyDirection, CSSValueLtr); 112 leftToRightDecl->setProperty(CSSPropertyDirection, CSSValueLtr);
113 return leftToRightDecl; 113 return leftToRightDecl;
114 } 114 }
115 115
116 static StylePropertySet* rightToLeftDeclaration() 116 static StylePropertySet* rightToLeftDeclaration()
117 { 117 {
118 DEFINE_STATIC_REF(MutableStylePropertySet, rightToLeftDecl, (MutableStylePro pertySet::create())); 118 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(MutableStylePropertySet, rightToLeftDec l, (MutableStylePropertySet::create()));
119 if (rightToLeftDecl->isEmpty()) 119 if (rightToLeftDecl->isEmpty())
120 rightToLeftDecl->setProperty(CSSPropertyDirection, CSSValueRtl); 120 rightToLeftDecl->setProperty(CSSPropertyDirection, CSSValueRtl);
121 return rightToLeftDecl; 121 return rightToLeftDecl;
122 } 122 }
123 123
124 static void addFontFaceRule(Document* document, CSSFontSelector* cssFontSelector , const StyleRuleFontFace* fontFaceRule) 124 static void addFontFaceRule(Document* document, CSSFontSelector* cssFontSelector , const StyleRuleFontFace* fontFaceRule)
125 { 125 {
126 RefPtrWillBeRawPtr<FontFace> fontFace = FontFace::create(document, fontFaceR ule); 126 RefPtrWillBeRawPtr<FontFace> fontFace = FontFace::create(document, fontFaceR ule);
127 if (fontFace) 127 if (fontFace)
128 cssFontSelector->fontFaceCache()->add(cssFontSelector, fontFaceRule, fon tFace); 128 cssFontSelector->fontFaceCache()->add(cssFontSelector, fontFaceRule, fon tFace);
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { 1584 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) {
1585 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression() ) != m_viewportDependentMediaQueryResults[i]->result()) 1585 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression() ) != m_viewportDependentMediaQueryResults[i]->result())
1586 return true; 1586 return true;
1587 } 1587 }
1588 return false; 1588 return false;
1589 } 1589 }
1590 1590
1591 void StyleResolver::trace(Visitor* visitor) 1591 void StyleResolver::trace(Visitor* visitor)
1592 { 1592 {
1593 visitor->trace(m_keyframesRuleMap); 1593 visitor->trace(m_keyframesRuleMap);
1594 visitor->trace(m_matchedPropertiesCache);
1594 visitor->trace(m_viewportDependentMediaQueryResults); 1595 visitor->trace(m_viewportDependentMediaQueryResults);
1595 visitor->trace(m_viewportStyleResolver); 1596 visitor->trace(m_viewportStyleResolver);
1596 visitor->trace(m_features); 1597 visitor->trace(m_features);
1597 visitor->trace(m_siblingRuleSet); 1598 visitor->trace(m_siblingRuleSet);
1598 visitor->trace(m_uncommonAttributeRuleSet); 1599 visitor->trace(m_uncommonAttributeRuleSet);
1599 visitor->trace(m_watchedSelectorsRules); 1600 visitor->trace(m_watchedSelectorsRules);
1600 visitor->trace(m_treeBoundaryCrossingRules); 1601 visitor->trace(m_treeBoundaryCrossingRules);
1601 visitor->trace(m_pendingStyleSheets); 1602 visitor->trace(m_pendingStyleSheets);
1602 } 1603 }
1603 1604
1604 } // namespace WebCore 1605 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/MatchedPropertiesCache.cpp ('k') | Source/core/dom/CSSSelectorWatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698