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

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

Issue 82583005: Use removeFontFace to avoid resetting fontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 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;
51 52
52 // FIXME: Should be in separate file and be renamed like: 53 // FIXME: Should be in separate file and be renamed like:
53 // - StyleSheetCollectionBase -> StyleSheetCollection 54 // - StyleSheetCollectionBase -> StyleSheetCollection
54 // - StyleSheetCollection -> ScopeStyleSheetCollection 55 // - StyleSheetCollection -> ScopeStyleSheetCollection
55 // 56 //
56 class StyleSheetCollectionBase { 57 class StyleSheetCollectionBase {
57 WTF_MAKE_NONCOPYABLE(StyleSheetCollectionBase); WTF_MAKE_FAST_ALLOCATED; 58 WTF_MAKE_NONCOPYABLE(StyleSheetCollectionBase); WTF_MAKE_FAST_ALLOCATED;
58 public: 59 public:
59 StyleSheetCollectionBase(); 60 StyleSheetCollectionBase();
60 ~StyleSheetCollectionBase(); 61 ~StyleSheetCollectionBase();
(...skipping 30 matching lines...) Expand all
91 void clearMediaQueryRuleSetStyleSheets(); 92 void clearMediaQueryRuleSetStyleSheets();
92 93
93 protected: 94 protected:
94 explicit StyleSheetCollection(TreeScope&); 95 explicit StyleSheetCollection(TreeScope&);
95 96
96 Document* document() { return m_treeScope.documentScope(); } 97 Document* document() { return m_treeScope.documentScope(); }
97 98
98 enum StyleResolverUpdateType { 99 enum StyleResolverUpdateType {
99 Reconstruct, 100 Reconstruct,
100 Reset, 101 Reset,
101 Additive, 102 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*> removedFontFace;
dglazkov 2013/11/25 16:27:29 fontFaceRulesToRemove?
tasak 2013/11/26 07:49:06 Done.
108 109
109 StyleSheetChange() 110 StyleSheetChange()
110 : styleResolverUpdateType(Reconstruct) 111 : styleResolverUpdateType(Reconstruct)
111 , requiresFullStyleRecalc(true) { } 112 , requiresFullStyleRecalc(true) { }
112 }; 113 };
113 114
114 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec tionBase&, StyleSheetChange&); 115 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec tionBase&, StyleSheetChange&);
115 void resetAllRuleSetsInTreeScope(StyleResolver*); 116 void resetAllRuleSetsInTreeScope(StyleResolver*);
116 void updateUsesRemUnits(); 117 void updateUsesRemUnits();
117 118
118 private: 119 private:
119 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets , Vector<StyleSheetContents*>& addedSheets); 120 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets , Vector<StyleSheetContents*>& addedSheets);
120 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new StyleSheets); 121 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new StyleSheets);
121 122
122 protected: 123 protected:
123 TreeScope& m_treeScope; 124 TreeScope& m_treeScope;
124 bool m_hadActiveLoadingStylesheet; 125 bool m_hadActiveLoadingStylesheet;
125 bool m_usesRemUnits; 126 bool m_usesRemUnits;
126 127
127 DocumentOrderedList m_styleSheetCandidateNodes; 128 DocumentOrderedList m_styleSheetCandidateNodes;
128 StyleSheetScopingNodeList m_scopingNodesForStyleScoped; 129 StyleSheetScopingNodeList m_scopingNodesForStyleScoped;
129 }; 130 };
130 131
131 } 132 }
132 133
133 #endif 134 #endif
134 135
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698