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

Unified Diff: Source/core/css/CSSStyleSheet.h

Issue 27537009: Avoid always style recalc when removing stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSStyleSheet.cpp » ('j') | Source/core/css/resolver/StyleResolver.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSStyleSheet.h
diff --git a/Source/core/css/CSSStyleSheet.h b/Source/core/css/CSSStyleSheet.h
index f81fdef14402ff70cdde98ae5936734940ce60eb..c0eeb6f0d1db2c5fafcc847e01f3dfe3fda6e742 100644
--- a/Source/core/css/CSSStyleSheet.h
+++ b/Source/core/css/CSSStyleSheet.h
@@ -41,6 +41,11 @@ class MediaQuerySet;
class SecurityOrigin;
class StyleSheetContents;
+enum StyleSheetUpdateType {
+ PartialRuleUpdate,
+ EntireStyleSheetUpdate
+};
+
class CSSStyleSheet : public StyleSheet {
public:
static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule = 0);
@@ -71,7 +76,7 @@ public:
unsigned length() const;
CSSRule* item(unsigned index);
- virtual void clearOwnerNode() OVERRIDE { didMutate(); m_ownerNode = 0; }
+ virtual void clearOwnerNode() OVERRIDE { didMutate(EntireStyleSheetUpdate); m_ownerNode = 0; }
virtual CSSRule* ownerRule() const OVERRIDE { return m_ownerRule; }
virtual KURL baseURL() const OVERRIDE;
virtual bool isLoading() const OVERRIDE;
@@ -95,7 +100,7 @@ public:
void willMutateRules();
void didMutateRules();
- void didMutate();
+ void didMutate(StyleSheetUpdateType = PartialRuleUpdate);
void clearChildRuleCSSOMWrappers();
void reattachChildRuleCSSOMWrappers();
« no previous file with comments | « no previous file | Source/core/css/CSSStyleSheet.cpp » ('j') | Source/core/css/resolver/StyleResolver.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698