| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class ContainerNode; | 44 class ContainerNode; |
| 45 class CSSStyleSheet; | 45 class CSSStyleSheet; |
| 46 class DocumentStyleSheetCollector; | 46 class DocumentStyleSheetCollector; |
| 47 class StyleEngine; | 47 class StyleEngine; |
| 48 class Node; | 48 class Node; |
| 49 class StyleSheet; | 49 class StyleSheet; |
| 50 class StyleSheetContents; | 50 class StyleSheetContents; |
| 51 class StyleSheetList; | 51 class StyleSheetList; |
| 52 class StyleRuleFontFace; |
| 52 | 53 |
| 53 // FIXME: Should be in separate file and be renamed like: | 54 // FIXME: Should be in separate file and be renamed like: |
| 54 // - StyleSheetCollectionBase -> StyleSheetCollection | 55 // - StyleSheetCollectionBase -> StyleSheetCollection |
| 55 // - StyleSheetCollection -> ScopeStyleSheetCollection | 56 // - StyleSheetCollection -> ScopeStyleSheetCollection |
| 56 // | 57 // |
| 57 class StyleSheetCollectionBase { | 58 class StyleSheetCollectionBase { |
| 58 WTF_MAKE_NONCOPYABLE(StyleSheetCollectionBase); WTF_MAKE_FAST_ALLOCATED; | 59 WTF_MAKE_NONCOPYABLE(StyleSheetCollectionBase); WTF_MAKE_FAST_ALLOCATED; |
| 59 public: | 60 public: |
| 60 friend class ActiveDocumentStyleSheetCollector; | 61 friend class ActiveDocumentStyleSheetCollector; |
| 61 friend class ImportedDocumentStyleSheetCollector; | 62 friend class ImportedDocumentStyleSheetCollector; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 98 |
| 98 protected: | 99 protected: |
| 99 explicit StyleSheetCollection(TreeScope&); | 100 explicit StyleSheetCollection(TreeScope&); |
| 100 | 101 |
| 101 // FIXME: Should return a reference. | 102 // FIXME: Should return a reference. |
| 102 Document* document() { return &m_treeScope.document(); } | 103 Document* document() { return &m_treeScope.document(); } |
| 103 | 104 |
| 104 enum StyleResolverUpdateType { | 105 enum StyleResolverUpdateType { |
| 105 Reconstruct, | 106 Reconstruct, |
| 106 Reset, | 107 Reset, |
| 107 Additive, | 108 Additive |
| 108 ResetStyleResolverAndFontSelector | |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 struct StyleSheetChange { | 111 struct StyleSheetChange { |
| 112 StyleResolverUpdateType styleResolverUpdateType; | 112 StyleResolverUpdateType styleResolverUpdateType; |
| 113 bool requiresFullStyleRecalc; | 113 bool requiresFullStyleRecalc; |
| 114 Vector<const StyleRuleFontFace*> fontFaceRulesToRemove; |
| 114 | 115 |
| 115 StyleSheetChange() | 116 StyleSheetChange() |
| 116 : styleResolverUpdateType(Reconstruct) | 117 : styleResolverUpdateType(Reconstruct) |
| 117 , requiresFullStyleRecalc(true) { } | 118 , requiresFullStyleRecalc(true) { } |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec
tionBase&, StyleSheetChange&); | 121 void analyzeStyleSheetChange(StyleResolverUpdateMode, const StyleSheetCollec
tionBase&, StyleSheetChange&); |
| 121 void resetAllRuleSetsInTreeScope(StyleResolver*); | 122 void resetAllRuleSetsInTreeScope(StyleResolver*); |
| 122 void updateUsesRemUnits(); | 123 void updateUsesRemUnits(); |
| 123 | 124 |
| 124 private: | 125 private: |
| 125 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty
leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets
, Vector<StyleSheetContents*>& addedSheets); | 126 static StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSSty
leSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets
, Vector<StyleSheetContents*>& addedSheets); |
| 126 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new
StyleSheets); | 127 bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& new
StyleSheets); |
| 127 | 128 |
| 128 protected: | 129 protected: |
| 129 TreeScope& m_treeScope; | 130 TreeScope& m_treeScope; |
| 130 bool m_hadActiveLoadingStylesheet; | 131 bool m_hadActiveLoadingStylesheet; |
| 131 bool m_usesRemUnits; | 132 bool m_usesRemUnits; |
| 132 | 133 |
| 133 DocumentOrderedList m_styleSheetCandidateNodes; | 134 DocumentOrderedList m_styleSheetCandidateNodes; |
| 134 StyleSheetScopingNodeList m_scopingNodesForStyleScoped; | 135 StyleSheetScopingNodeList m_scopingNodesForStyleScoped; |
| 135 }; | 136 }; |
| 136 | 137 |
| 137 } | 138 } |
| 138 | 139 |
| 139 #endif | 140 #endif |
| 140 | 141 |
| OLD | NEW |