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

Side by Side Diff: Source/core/dom/TreeScopeStyleSheetCollection.h

Issue 180003002: Consistently use on-heap collections for StyleRuleBase descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 enum StyleResolverUpdateType { 73 enum StyleResolverUpdateType {
74 Reconstruct, 74 Reconstruct,
75 Reset, 75 Reset,
76 Additive 76 Additive
77 }; 77 };
78 78
79 struct StyleSheetChange { 79 struct StyleSheetChange {
80 StyleResolverUpdateType styleResolverUpdateType; 80 StyleResolverUpdateType styleResolverUpdateType;
81 bool requiresFullStyleRecalc; 81 bool requiresFullStyleRecalc;
82 Vector<const StyleRuleFontFace*> fontFaceRulesToRemove; 82 WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFontFace> > fontFaceR ulesToRemove;
83 83
84 StyleSheetChange() 84 StyleSheetChange()
85 : styleResolverUpdateType(Reconstruct) 85 : styleResolverUpdateType(Reconstruct)
86 , requiresFullStyleRecalc(true) { } 86 , requiresFullStyleRecalc(true) { }
87 private:
88 // FIXME: oilpan: This should be STACK_ALLOCATED.
89 DISALLOW_ALLOCATION();
haraken 2014/02/26 02:20:13 Let's put this at the head of the struct. Probabl
Erik Corry 2014/02/26 13:01:28 Classes normally start off private, so it would be
Vyacheslav Egorov (Chromium) 2014/02/26 13:12:24 Done.
87 }; 90 };
88 91
89 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec tion&, StyleSheetChange&); 92 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec tion&, StyleSheetChange&);
90 void resetAllRuleSetsInTreeScope(StyleResolver*); 93 void resetAllRuleSetsInTreeScope(StyleResolver*);
91 void updateUsesRemUnits(); 94 void updateUsesRemUnits();
92 95
93 private: 96 private:
94 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets , Vector<StyleSheetContents*>& addedSheets); 97 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets , WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents> >& addedSheets);
95 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new StyleSheets); 98 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new StyleSheets);
96 99
97 protected: 100 protected:
98 TreeScope& m_treeScope; 101 TreeScope& m_treeScope;
99 bool m_hadActiveLoadingStylesheet; 102 bool m_hadActiveLoadingStylesheet;
100 bool m_usesRemUnits; 103 bool m_usesRemUnits;
101 104
102 DocumentOrderedList m_styleSheetCandidateNodes; 105 DocumentOrderedList m_styleSheetCandidateNodes;
103 StyleSheetScopingNodeList m_scopingNodesForStyleScoped; 106 StyleSheetScopingNodeList m_scopingNodesForStyleScoped;
104 }; 107 };
105 108
106 } 109 }
107 110
108 #endif 111 #endif
109 112
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698