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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

Issue 2105743002: Optimize style recalc when adding @keyframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test review issues Created 4 years, 5 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 * (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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 bool usesRemUnits() const { return m_usesRemUnits; } 117 bool usesRemUnits() const { return m_usesRemUnits; }
118 void setUsesRemUnit(bool b) { m_usesRemUnits = b; } 118 void setUsesRemUnit(bool b) { m_usesRemUnits = b; }
119 119
120 void resetCSSFeatureFlags(const RuleFeatureSet&); 120 void resetCSSFeatureFlags(const RuleFeatureSet&);
121 121
122 void didRemoveShadowRoot(ShadowRoot*); 122 void didRemoveShadowRoot(ShadowRoot*);
123 void shadowRootRemovedFromDocument(ShadowRoot*); 123 void shadowRootRemovedFromDocument(ShadowRoot*);
124 void appendActiveAuthorStyleSheets(); 124 void appendActiveAuthorStyleSheets();
125 125
126 void setHasUnresolvedKeyframesRule() { m_hasUnresolvedKeyframesRule = true; }
127 void keyframesRulesAdded();
128
126 StyleResolver* resolver() const 129 StyleResolver* resolver() const
127 { 130 {
128 return m_resolver.get(); 131 return m_resolver.get();
129 } 132 }
130 133
131 StyleResolver& ensureResolver() 134 StyleResolver& ensureResolver()
132 { 135 {
133 if (!m_resolver) { 136 if (!m_resolver) {
134 createResolver(); 137 createResolver();
135 } else if (m_resolver->hasPendingAuthorStyleSheets()) { 138 } else if (m_resolver->hasPendingAuthorStyleSheets()) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 String m_selectedStylesheetSetName; 249 String m_selectedStylesheetSetName;
247 250
248 bool m_usesSiblingRules = false; 251 bool m_usesSiblingRules = false;
249 bool m_usesFirstLineRules = false; 252 bool m_usesFirstLineRules = false;
250 bool m_usesWindowInactiveSelector = false; 253 bool m_usesWindowInactiveSelector = false;
251 bool m_usesRemUnits = false; 254 bool m_usesRemUnits = false;
252 unsigned m_maxDirectAdjacentSelectors = 0; 255 unsigned m_maxDirectAdjacentSelectors = 0;
253 256
254 bool m_ignorePendingStylesheets = false; 257 bool m_ignorePendingStylesheets = false;
255 bool m_didCalculateResolver = false; 258 bool m_didCalculateResolver = false;
259 bool m_hasUnresolvedKeyframesRule = false;
256 260
257 Member<StyleResolver> m_resolver; 261 Member<StyleResolver> m_resolver;
258 StyleInvalidator m_styleInvalidator; 262 StyleInvalidator m_styleInvalidator;
259 263
260 Member<CSSFontSelector> m_fontSelector; 264 Member<CSSFontSelector> m_fontSelector;
261 265
262 HeapHashMap<AtomicString, Member<StyleSheetContents>> m_textToSheetCache; 266 HeapHashMap<AtomicString, Member<StyleSheetContents>> m_textToSheetCache;
263 HeapHashMap<Member<StyleSheetContents>, AtomicString> m_sheetToTextCache; 267 HeapHashMap<Member<StyleSheetContents>, AtomicString> m_sheetToTextCache;
264 268
265 std::unique_ptr<StyleResolverStats> m_styleResolverStats; 269 std::unique_ptr<StyleResolverStats> m_styleResolverStats;
266 unsigned m_styleForElementCount = 0; 270 unsigned m_styleForElementCount = 0;
267 271
268 friend class StyleEngineTest; 272 friend class StyleEngineTest;
269 }; 273 };
270 274
271 } // namespace blink 275 } // namespace blink
272 276
273 #endif 277 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698