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

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

Issue 2610513003: Avoid unnecessary updateActiveStyle comparing shadow styles. (Closed)
Patch Set: Fixed review issues. Created 3 years, 11 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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2012 Google Inc. All rights reserved. 5 * Copyright (C) 2012 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void collectFeaturesTo(RuleFeatureSet&, 69 void collectFeaturesTo(RuleFeatureSet&,
70 HeapHashSet<Member<const StyleSheetContents>>& 70 HeapHashSet<Member<const StyleSheetContents>>&
71 visitedSharedStyleSheetContents) const; 71 visitedSharedStyleSheetContents) const;
72 void resetAuthorStyle(); 72 void resetAuthorStyle();
73 bool hasDeepOrShadowSelector() const { return m_hasDeepOrShadowSelector; } 73 bool hasDeepOrShadowSelector() const { return m_hasDeepOrShadowSelector; }
74 void setHasUnresolvedKeyframesRule() { m_hasUnresolvedKeyframesRule = true; } 74 void setHasUnresolvedKeyframesRule() { m_hasUnresolvedKeyframesRule = true; }
75 bool needsAppendAllSheets() const { return m_needsAppendAllSheets; } 75 bool needsAppendAllSheets() const { return m_needsAppendAllSheets; }
76 void setNeedsAppendAllSheets() { m_needsAppendAllSheets = true; } 76 void setNeedsAppendAllSheets() { m_needsAppendAllSheets = true; }
77 static void keyframesRulesAdded(const TreeScope&); 77 static void keyframesRulesAdded(const TreeScope&);
78 static ContainerNode& invalidationRootForTreeScope(const TreeScope&); 78 static ContainerNode& invalidationRootForTreeScope(const TreeScope&);
79 CORE_EXPORT static bool haveSameStyles(const ScopedStyleResolver*,
sashab 2017/01/04 00:39:33 I sort of agree with sigbjornf that this could be
80 const ScopedStyleResolver*);
79 81
80 DECLARE_TRACE(); 82 DECLARE_TRACE();
81 83
82 private: 84 private:
83 explicit ScopedStyleResolver(TreeScope& scope) : m_scope(scope) {} 85 explicit ScopedStyleResolver(TreeScope& scope) : m_scope(scope) {}
84 86
85 void addTreeBoundaryCrossingRules(const RuleSet&, 87 void addTreeBoundaryCrossingRules(const RuleSet&,
86 CSSStyleSheet*, 88 CSSStyleSheet*,
87 unsigned sheetIndex); 89 unsigned sheetIndex);
88 void addKeyframeRules(const RuleSet&); 90 void addKeyframeRules(const RuleSet&);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 123
122 Member<CSSStyleSheetRuleSubSet> m_treeBoundaryCrossingRuleSet; 124 Member<CSSStyleSheetRuleSubSet> m_treeBoundaryCrossingRuleSet;
123 bool m_hasDeepOrShadowSelector = false; 125 bool m_hasDeepOrShadowSelector = false;
124 bool m_hasUnresolvedKeyframesRule = false; 126 bool m_hasUnresolvedKeyframesRule = false;
125 bool m_needsAppendAllSheets = false; 127 bool m_needsAppendAllSheets = false;
126 }; 128 };
127 129
128 } // namespace blink 130 } // namespace blink
129 131
130 #endif // ScopedStyleResolver_h 132 #endif // ScopedStyleResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698