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

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

Issue 993713002: Fix template angle bracket syntax in CSS subdirs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 PassRefPtr<LayoutStyle> pseudoStyleForElement(Element*, const PseudoStyleReq uest&, LayoutStyle* parentStyle); 115 PassRefPtr<LayoutStyle> pseudoStyleForElement(Element*, const PseudoStyleReq uest&, LayoutStyle* parentStyle);
116 116
117 PassRefPtr<LayoutStyle> styleForPage(int pageIndex); 117 PassRefPtr<LayoutStyle> styleForPage(int pageIndex);
118 PassRefPtr<LayoutStyle> defaultStyleForElement(); 118 PassRefPtr<LayoutStyle> defaultStyleForElement();
119 PassRefPtr<LayoutStyle> styleForText(Text*); 119 PassRefPtr<LayoutStyle> styleForText(Text*);
120 120
121 static PassRefPtr<LayoutStyle> styleForDocument(Document&); 121 static PassRefPtr<LayoutStyle> styleForDocument(Document&);
122 122
123 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte r we factor StyleResolver further. 123 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte r we factor StyleResolver further.
124 // https://bugs.webkit.org/show_bug.cgi?id=108890 124 // https://bugs.webkit.org/show_bug.cgi?id=108890
125 void appendAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMember<CSSSt yleSheet> >&); 125 void appendAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMember<CSSSt yleSheet>>&);
126 void resetAuthorStyle(TreeScope&); 126 void resetAuthorStyle(TreeScope&);
127 void finishAppendAuthorStyleSheets(); 127 void finishAppendAuthorStyleSheets();
128 128
129 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R efPtrWillBeMember<CSSStyleSheet> >&); 129 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R efPtrWillBeMember<CSSStyleSheet>>&);
130 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe r<CSSStyleSheet> >&); 130 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe r<CSSStyleSheet>>&);
131 void appendPendingAuthorStyleSheets(); 131 void appendPendingAuthorStyleSheets();
132 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; } 132 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; }
133 133
134 SelectorFilter& selectorFilter() { return m_selectorFilter; } 134 SelectorFilter& selectorFilter() { return m_selectorFilter; }
135 135
136 StyleRuleKeyframes* findKeyframesRule(const Element*, const AtomicString& an imationName); 136 StyleRuleKeyframes* findKeyframesRule(const Element*, const AtomicString& an imationName);
137 137
138 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element). 138 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element).
139 enum CSSRuleFilter { 139 enum CSSRuleFilter {
140 UAAndUserCSSRules = 1 << 1, 140 UAAndUserCSSRules = 1 << 1,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void increaseStyleSharingDepth() { ++m_styleSharingDepth; } 198 void increaseStyleSharingDepth() { ++m_styleSharingDepth; }
199 void decreaseStyleSharingDepth() { --m_styleSharingDepth; } 199 void decreaseStyleSharingDepth() { --m_styleSharingDepth; }
200 200
201 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElementIfNeeded(Element& p arent, PseudoId); 201 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElementIfNeeded(Element& p arent, PseudoId);
202 202
203 DECLARE_TRACE(); 203 DECLARE_TRACE();
204 204
205 void addTreeBoundaryCrossingScope(ContainerNode& scope); 205 void addTreeBoundaryCrossingScope(ContainerNode& scope);
206 206
207 private: 207 private:
208 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl eRule> >& watchedSelectors); 208 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl eRule>>& watchedSelectors);
209 209
210 // FIXME: This should probably go away, folded into FontBuilder. 210 // FIXME: This should probably go away, folded into FontBuilder.
211 void updateFont(StyleResolverState&); 211 void updateFont(StyleResolverState&);
212 212
213 static AuthorStyleInfo authorStyleInfo(StyleResolverState&); 213 static AuthorStyleInfo authorStyleInfo(StyleResolverState&);
214 214
215 void loadPendingResources(StyleResolverState&); 215 void loadPendingResources(StyleResolverState&);
216 void adjustLayoutStyle(StyleResolverState&, Element*); 216 void adjustLayoutStyle(StyleResolverState&, Element*);
217 217
218 void appendCSSStyleSheet(CSSStyleSheet&); 218 void appendCSSStyleSheet(CSSStyleSheet&);
(...skipping 11 matching lines...) Expand all
230 230
231 void applyMatchedProperties(StyleResolverState&, const MatchResult&); 231 void applyMatchedProperties(StyleResolverState&, const MatchResult&);
232 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl ement); 232 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl ement);
233 void applyCallbackSelectors(StyleResolverState&); 233 void applyCallbackSelectors(StyleResolverState&);
234 234
235 template <CSSPropertyPriority priority> 235 template <CSSPropertyPriority priority>
236 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im portant, int startIndex, int endIndex, bool inheritedOnly); 236 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im portant, int startIndex, int endIndex, bool inheritedOnly);
237 template <CSSPropertyPriority priority> 237 template <CSSPropertyPriority priority>
238 void applyProperties(StyleResolverState&, const StylePropertySet* properties , bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis tNone); 238 void applyProperties(StyleResolverState&, const StylePropertySet* properties , bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis tNone);
239 template <CSSPropertyPriority priority> 239 template <CSSPropertyPriority priority>
240 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS SPropertyID, RefPtrWillBeMember<Interpolation> >&); 240 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS SPropertyID, RefPtrWillBeMember<Interpolation>>&);
241 template <CSSPropertyPriority priority> 241 template <CSSPropertyPriority priority>
242 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly); 242 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly);
243 243
244 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag e, const String& pageName); 244 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag e, const String& pageName);
245 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage > >& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage> >&, bool isLeftPage, bool isFirstPage, const String& pageName); 245 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage >>& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage>>&, bo ol isLeftPage, bool isFirstPage, const String& pageName);
246 void collectViewportRules(); 246 void collectViewportRules();
247 247
248 bool isLeftPage(int pageIndex) const; 248 bool isLeftPage(int pageIndex) const;
249 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } 249 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); }
250 bool isFirstPage(int pageIndex) const; 250 bool isFirstPage(int pageIndex) const;
251 String pageName(int pageIndex) const; 251 String pageName(int pageIndex) const;
252 252
253 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, Layo utStyle* parentStyle, StyleResolverState&); 253 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, Layo utStyle* parentStyle, StyleResolverState&);
254 254
255 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P seudoId); 255 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P seudoId);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; 292 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals;
293 unsigned m_styleResolverStatsSequence; 293 unsigned m_styleResolverStatsSequence;
294 294
295 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 295 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
296 unsigned m_accessCount; 296 unsigned m_accessCount;
297 }; 297 };
298 298
299 } // namespace blink 299 } // namespace blink
300 300
301 #endif // StyleResolver_h 301 #endif // StyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/MatchedPropertiesCache.h ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698