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

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

Issue 721103002: Fix lfiespan of ScopedStyleResolver (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add comment in layout test. Created 6 years, 1 month 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 PassRefPtr<RenderStyle> styleForText(Text*); 117 PassRefPtr<RenderStyle> styleForText(Text*);
118 118
119 static PassRefPtr<RenderStyle> styleForDocument(Document&); 119 static PassRefPtr<RenderStyle> styleForDocument(Document&);
120 120
121 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte r we factor StyleResolver further. 121 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte r we factor StyleResolver further.
122 // https://bugs.webkit.org/show_bug.cgi?id=108890 122 // https://bugs.webkit.org/show_bug.cgi?id=108890
123 void appendAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMember<CSSSt yleSheet> >&); 123 void appendAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMember<CSSSt yleSheet> >&);
124 void resetAuthorStyle(TreeScope&); 124 void resetAuthorStyle(TreeScope&);
125 void finishAppendAuthorStyleSheets(); 125 void finishAppendAuthorStyleSheets();
126 126
127 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, unsigned sheetIndex, ContainerNode& scope);
128
129 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R efPtrWillBeMember<CSSStyleSheet> >&); 127 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R efPtrWillBeMember<CSSStyleSheet> >&);
130 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe r<CSSStyleSheet> >&); 128 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe r<CSSStyleSheet> >&);
131 void appendPendingAuthorStyleSheets(); 129 void appendPendingAuthorStyleSheets();
132 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; } 130 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; }
133 131
134 SelectorFilter& selectorFilter() { return m_selectorFilter; } 132 SelectorFilter& selectorFilter() { return m_selectorFilter; }
135 133
136 void styleTreeResolveScopedKeyframesRules(const Element*, WillBeHeapVector<R awPtrWillBeMember<ScopedStyleResolver>, 8>&); 134 void styleTreeResolveScopedKeyframesRules(const Element*, WillBeHeapVector<R awPtrWillBeMember<ScopedStyleResolver>, 8>&);
137 135
138 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element). 136 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element).
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl eRule> >& watchedSelectors); 204 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl eRule> >& watchedSelectors);
207 205
208 // FIXME: This should probably go away, folded into FontBuilder. 206 // FIXME: This should probably go away, folded into FontBuilder.
209 void updateFont(StyleResolverState&); 207 void updateFont(StyleResolverState&);
210 208
211 void loadPendingResources(StyleResolverState&); 209 void loadPendingResources(StyleResolverState&);
212 void adjustRenderStyle(StyleResolverState&, Element*); 210 void adjustRenderStyle(StyleResolverState&, Element*);
213 211
214 void appendCSSStyleSheet(CSSStyleSheet&); 212 void appendCSSStyleSheet(CSSStyleSheet&);
215 void addRulesFromSheet(CSSStyleSheet&, TreeScope*, unsigned); 213 void addRulesFromSheet(CSSStyleSheet&, TreeScope*, unsigned);
214 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, unsigned sheetIndex, ContainerNode& scope);
hayato 2014/11/19 10:52:15 Looks unnecessary change.
kochi 2014/11/19 11:41:52 Reverted.
216 215
217 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId, unsigned rulesToInclude); 216 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId, unsigned rulesToInclude);
218 void matchRuleSet(ElementRuleCollector&, RuleSet*); 217 void matchRuleSet(ElementRuleCollector&, RuleSet*);
219 void matchUARules(ElementRuleCollector&); 218 void matchUARules(ElementRuleCollector&);
220 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule s); 219 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule s);
221 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers InShadowTree); 220 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers InShadowTree);
222 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS MILProperties); 221 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS MILProperties);
223 void collectFeatures(); 222 void collectFeatures();
224 void resetRuleFeatures(); 223 void resetRuleFeatures();
225 224
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; 301 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals;
303 unsigned m_styleResolverStatsSequence; 302 unsigned m_styleResolverStatsSequence;
304 303
305 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 304 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
306 unsigned m_accessCount; 305 unsigned m_accessCount;
307 }; 306 };
308 307
309 } // namespace blink 308 } // namespace blink
310 309
311 #endif // StyleResolver_h 310 #endif // StyleResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698