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

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

Issue 28553005: Avoid parsing css text if there are identical inline style blocks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 * (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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 bool hasScopedStyleSheet() { return m_documentStyleSheetCollection.scopingNo desForStyleScoped(); } 100 bool hasScopedStyleSheet() { return m_documentStyleSheetCollection.scopingNo desForStyleScoped(); }
101 101
102 void combineCSSFeatureFlags(const RuleFeatureSet&); 102 void combineCSSFeatureFlags(const RuleFeatureSet&);
103 void resetCSSFeatureFlags(const RuleFeatureSet&); 103 void resetCSSFeatureFlags(const RuleFeatureSet&);
104 104
105 void didModifySeamlessParentStyleSheet() { m_needsDocumentStyleSheetsUpdate = true; } 105 void didModifySeamlessParentStyleSheet() { m_needsDocumentStyleSheetsUpdate = true; }
106 void didRemoveShadowRoot(ShadowRoot*); 106 void didRemoveShadowRoot(ShadowRoot*);
107 void appendActiveAuthorStyleSheets(StyleResolver*); 107 void appendActiveAuthorStyleSheets(StyleResolver*);
108 void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >* >& activeAuthorStyleSheets) const; 108 void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >* >& activeAuthorStyleSheets) const;
109 109
110 static PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text, T extPosition startPosition, bool createdByParser);
111 static void removeSheet(StyleSheetContents*);
112 static void clearSheetCache();
113
110 private: 114 private:
111 StyleEngine(Document&); 115 StyleEngine(Document&);
112 116
113 StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); 117 StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
114 StyleSheetCollection* styleSheetCollectionFor(TreeScope&); 118 StyleSheetCollection* styleSheetCollectionFor(TreeScope&);
115 void activeStyleSheetsUpdatedForInspector(); 119 void activeStyleSheetsUpdatedForInspector();
116 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode); 120 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode);
117 121
118 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; 122 typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
119 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); 123 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*);
(...skipping 27 matching lines...) Expand all
147 bool m_usesSiblingRulesOverride; 151 bool m_usesSiblingRulesOverride;
148 bool m_usesFirstLineRules; 152 bool m_usesFirstLineRules;
149 bool m_usesFirstLetterRules; 153 bool m_usesFirstLetterRules;
150 bool m_usesRemUnits; 154 bool m_usesRemUnits;
151 unsigned m_maxDirectAdjacentSelectors; 155 unsigned m_maxDirectAdjacentSelectors;
152 }; 156 };
153 157
154 } 158 }
155 159
156 #endif 160 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698