| 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 * |
| 11 * This library is free software; you can redistribute it and/or | 11 * This library is free software; you can redistribute it and/or |
| 12 * modify it under the terms of the GNU Library General Public | 12 * modify it under the terms of the GNU Library General Public |
| 13 * License as published by the Free Software Foundation; either | 13 * License as published by the Free Software Foundation; either |
| 14 * version 2 of the License, or (at your option) any later version. | 14 * version 2 of the License, or (at your option) any later version. |
| 15 * | 15 * |
| 16 * This library is distributed in the hope that it will be useful, | 16 * This library is distributed in the hope that it will be useful, |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 19 * Library General Public License for more details. | 19 * Library General Public License for more details. |
| 20 * | 20 * |
| 21 * You should have received a copy of the GNU Library General Public License | 21 * You should have received a copy of the GNU Library General Public License |
| 22 * along with this library; see the file COPYING.LIB. If not, write to | 22 * along with this library; see the file COPYING.LIB. If not, write to |
| 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
| 25 * | 25 * |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef StyleSheetCollections_h | 28 #ifndef StyleEngine_h |
| 29 #define StyleSheetCollections_h | 29 #define StyleEngine_h |
| 30 | 30 |
| 31 #include "core/dom/Document.h" | 31 #include "core/dom/Document.h" |
| 32 #include "core/dom/DocumentOrderedList.h" | 32 #include "core/dom/DocumentOrderedList.h" |
| 33 #include "core/dom/DocumentStyleSheetCollection.h" | 33 #include "core/dom/DocumentStyleSheetCollection.h" |
| 34 #include "wtf/FastAllocBase.h" | 34 #include "wtf/FastAllocBase.h" |
| 35 #include "wtf/ListHashSet.h" | 35 #include "wtf/ListHashSet.h" |
| 36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
| 37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class CSSStyleSheet; | 42 class CSSStyleSheet; |
| 43 class Node; | 43 class Node; |
| 44 class RuleFeatureSet; | 44 class RuleFeatureSet; |
| 45 class ShadowTreeStyleSheetCollection; | 45 class ShadowTreeStyleSheetCollection; |
| 46 class StyleSheet; | 46 class StyleSheet; |
| 47 class StyleSheetCollection; | 47 class StyleSheetCollection; |
| 48 class StyleSheetContents; | 48 class StyleSheetContents; |
| 49 class StyleSheetList; | 49 class StyleSheetList; |
| 50 | 50 |
| 51 class StyleSheetCollections { | 51 class StyleEngine { |
| 52 WTF_MAKE_FAST_ALLOCATED; | 52 WTF_MAKE_FAST_ALLOCATED; |
| 53 public: | 53 public: |
| 54 static PassOwnPtr<StyleSheetCollections> create(Document& document) { return
adoptPtr(new StyleSheetCollections(document)); } | 54 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr(
new StyleEngine(document)); } |
| 55 | 55 |
| 56 ~StyleSheetCollections(); | 56 ~StyleEngine(); |
| 57 | 57 |
| 58 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList(); | 58 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList(); |
| 59 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const; | 59 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const; |
| 60 | 60 |
| 61 CSSStyleSheet* pageUserSheet(); | 61 CSSStyleSheet* pageUserSheet(); |
| 62 const Vector<RefPtr<CSSStyleSheet> >& documentUserStyleSheets() const { retu
rn m_userStyleSheets; } | 62 const Vector<RefPtr<CSSStyleSheet> >& documentUserStyleSheets() const { retu
rn m_userStyleSheets; } |
| 63 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re
turn m_authorStyleSheets; } | 63 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re
turn m_authorStyleSheets; } |
| 64 const Vector<RefPtr<CSSStyleSheet> >& injectedUserStyleSheets() const; | 64 const Vector<RefPtr<CSSStyleSheet> >& injectedUserStyleSheets() const; |
| 65 const Vector<RefPtr<CSSStyleSheet> >& injectedAuthorStyleSheets() const; | 65 const Vector<RefPtr<CSSStyleSheet> >& injectedAuthorStyleSheets() const; |
| 66 | 66 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 void combineCSSFeatureFlags(const RuleFeatureSet&); | 106 void combineCSSFeatureFlags(const RuleFeatureSet&); |
| 107 void resetCSSFeatureFlags(const RuleFeatureSet&); | 107 void resetCSSFeatureFlags(const RuleFeatureSet&); |
| 108 | 108 |
| 109 void didModifySeamlessParentStyleSheet() { m_needsDocumentStyleSheetsUpdate
= true; } | 109 void didModifySeamlessParentStyleSheet() { m_needsDocumentStyleSheetsUpdate
= true; } |
| 110 void didRemoveShadowRoot(ShadowRoot*); | 110 void didRemoveShadowRoot(ShadowRoot*); |
| 111 void appendActiveAuthorStyleSheets(StyleResolver*); | 111 void appendActiveAuthorStyleSheets(StyleResolver*); |
| 112 void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >*
>& activeAuthorStyleSheets) const; | 112 void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >*
>& activeAuthorStyleSheets) const; |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 StyleSheetCollections(Document&); | 115 StyleEngine(Document&); |
| 116 | 116 |
| 117 StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); | 117 StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); |
| 118 StyleSheetCollection* styleSheetCollectionFor(TreeScope&); | 118 StyleSheetCollection* styleSheetCollectionFor(TreeScope&); |
| 119 void activeStyleSheetsUpdatedForInspector(); | 119 void activeStyleSheetsUpdatedForInspector(); |
| 120 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode); | 120 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode); |
| 121 | 121 |
| 122 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; | 122 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; |
| 123 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); | 123 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); |
| 124 | 124 |
| 125 Document& m_document; | 125 Document& m_document; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 154 bool m_usesSiblingRules; | 154 bool m_usesSiblingRules; |
| 155 bool m_usesSiblingRulesOverride; | 155 bool m_usesSiblingRulesOverride; |
| 156 bool m_usesFirstLineRules; | 156 bool m_usesFirstLineRules; |
| 157 bool m_usesFirstLetterRules; | 157 bool m_usesFirstLetterRules; |
| 158 bool m_usesRemUnits; | 158 bool m_usesRemUnits; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 } | 161 } |
| 162 | 162 |
| 163 #endif | 163 #endif |
| OLD | NEW |