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

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

Issue 131403008: Revert of Use removeFontFace to avoid resetting fontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/dom/StyleSheetCollection.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 * (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 30 matching lines...) Expand all
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 class ContainerNode; 44 class ContainerNode;
45 class CSSStyleSheet; 45 class CSSStyleSheet;
46 class StyleEngine; 46 class StyleEngine;
47 class Node; 47 class Node;
48 class StyleSheet; 48 class StyleSheet;
49 class StyleSheetContents; 49 class StyleSheetContents;
50 class StyleSheetList; 50 class StyleSheetList;
51 class StyleRuleFontFace;
52 51
53 // FIXME: Should be in separate file and be renamed like: 52 // FIXME: Should be in separate file and be renamed like:
54 // - StyleSheetCollectionBase -> StyleSheetCollection 53 // - StyleSheetCollectionBase -> StyleSheetCollection
55 // - StyleSheetCollection -> ScopeStyleSheetCollection 54 // - StyleSheetCollection -> ScopeStyleSheetCollection
56 // 55 //
57 class StyleSheetCollectionBase { 56 class StyleSheetCollectionBase {
58 WTF_MAKE_NONCOPYABLE(StyleSheetCollectionBase); WTF_MAKE_FAST_ALLOCATED; 57 WTF_MAKE_NONCOPYABLE(StyleSheetCollectionBase); WTF_MAKE_FAST_ALLOCATED;
59 public: 58 public:
60 StyleSheetCollectionBase(); 59 StyleSheetCollectionBase();
61 ~StyleSheetCollectionBase(); 60 ~StyleSheetCollectionBase();
(...skipping 30 matching lines...) Expand all
92 void clearMediaQueryRuleSetStyleSheets(); 91 void clearMediaQueryRuleSetStyleSheets();
93 92
94 protected: 93 protected:
95 explicit StyleSheetCollection(TreeScope&); 94 explicit StyleSheetCollection(TreeScope&);
96 95
97 Document* document() { return m_treeScope.documentScope(); } 96 Document* document() { return m_treeScope.documentScope(); }
98 97
99 enum StyleResolverUpdateType { 98 enum StyleResolverUpdateType {
100 Reconstruct, 99 Reconstruct,
101 Reset, 100 Reset,
102 Additive 101 Additive,
102 ResetStyleResolverAndFontSelector
103 }; 103 };
104 104
105 struct StyleSheetChange { 105 struct StyleSheetChange {
106 StyleResolverUpdateType styleResolverUpdateType; 106 StyleResolverUpdateType styleResolverUpdateType;
107 bool requiresFullStyleRecalc; 107 bool requiresFullStyleRecalc;
108 Vector<const StyleRuleFontFace*> fontFaceRulesToRemove;
109 108
110 StyleSheetChange() 109 StyleSheetChange()
111 : styleResolverUpdateType(Reconstruct) 110 : styleResolverUpdateType(Reconstruct)
112 , requiresFullStyleRecalc(true) { } 111 , requiresFullStyleRecalc(true) { }
113 }; 112 };
114 113
115 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec tionBase&, StyleSheetChange&); 114 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec tionBase&, StyleSheetChange&);
116 void resetAllRuleSetsInTreeScope(StyleResolver*); 115 void resetAllRuleSetsInTreeScope(StyleResolver*);
117 void updateUsesRemUnits(); 116 void updateUsesRemUnits();
118 117
119 private: 118 private:
120 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets , Vector<StyleSheetContents*>& addedSheets); 119 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets , Vector<StyleSheetContents*>& addedSheets);
121 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new StyleSheets); 120 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new StyleSheets);
122 121
123 protected: 122 protected:
124 TreeScope& m_treeScope; 123 TreeScope& m_treeScope;
125 bool m_hadActiveLoadingStylesheet; 124 bool m_hadActiveLoadingStylesheet;
126 bool m_usesRemUnits; 125 bool m_usesRemUnits;
127 126
128 DocumentOrderedList m_styleSheetCandidateNodes; 127 DocumentOrderedList m_styleSheetCandidateNodes;
129 StyleSheetScopingNodeList m_scopingNodesForStyleScoped; 128 StyleSheetScopingNodeList m_scopingNodesForStyleScoped;
130 }; 129 };
131 130
132 } 131 }
133 132
134 #endif 133 #endif
135 134
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/dom/StyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698