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

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

Issue 789403005: Keep a separate list of :host(-context) rules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added tests Created 6 years 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 | « Source/core/css/RuleSetTest.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | 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 * 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 * Copyright (C) 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 const TreeScope& treeScope() const { return *m_scope; } 57 const TreeScope& treeScope() const { return *m_scope; }
58 ScopedStyleResolver* parent() const; 58 ScopedStyleResolver* parent() const;
59 59
60 public: 60 public:
61 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima tionName); 61 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima tionName);
62 void addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes>); 62 void addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes>);
63 63
64 unsigned appendCSSStyleSheet(CSSStyleSheet*); 64 unsigned appendCSSStyleSheet(CSSStyleSheet*);
65 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule s, CascadeScope, CascadeOrder = ignoreCascadeOrder); 65 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule s, CascadeScope, CascadeOrder = ignoreCascadeOrder);
66 void collectMatchingShadowHostRules(ElementRuleCollector&, bool includeEmpty Rules, CascadeScope, CascadeOrder = ignoreCascadeOrder);
66 void matchPageRules(PageRuleCollector&); 67 void matchPageRules(PageRuleCollector&);
67 void collectFeaturesTo(RuleFeatureSet&, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents) const; 68 void collectFeaturesTo(RuleFeatureSet&, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents) const;
68 void resetAuthorStyle(); 69 void resetAuthorStyle();
69 void collectViewportRulesTo(StyleResolver*) const; 70 void collectViewportRulesTo(StyleResolver*) const;
70 71
71 void trace(Visitor*); 72 void trace(Visitor*);
72 73
73 private: 74 private:
74 explicit ScopedStyleResolver(TreeScope& scope) 75 explicit ScopedStyleResolver(TreeScope& scope)
75 : m_scope(scope) 76 : m_scope(scope)
76 { 77 {
77 } 78 }
78 79
79 RawPtrWillBeMember<TreeScope> m_scope; 80 RawPtrWillBeMember<TreeScope> m_scope;
80 81
81 WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets; 82 WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets;
82 83
83 typedef WillBeHeapHashMap<const StringImpl*, RefPtrWillBeMember<StyleRuleKey frames> > KeyframesRuleMap; 84 typedef WillBeHeapHashMap<const StringImpl*, RefPtrWillBeMember<StyleRuleKey frames> > KeyframesRuleMap;
84 KeyframesRuleMap m_keyframesRuleMap; 85 KeyframesRuleMap m_keyframesRuleMap;
85 }; 86 };
86 87
87 } // namespace blink 88 } // namespace blink
88 89
89 #endif // ScopedStyleResolver_h 90 #endif // ScopedStyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/css/RuleSetTest.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698