| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 public: | 52 public: |
| 53 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr(
new StyleEngine(document)); } | 53 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr(
new StyleEngine(document)); } |
| 54 | 54 |
| 55 ~StyleEngine(); | 55 ~StyleEngine(); |
| 56 | 56 |
| 57 void detachFromDocument(); | 57 void detachFromDocument(); |
| 58 | 58 |
| 59 void addTreeScope(TreeScope&); | 59 void addTreeScope(TreeScope&); |
| 60 void removeTreeScope(TreeScope&); | 60 void removeTreeScope(TreeScope&); |
| 61 | 61 |
| 62 void updateActiveStyleSheets(); | |
| 63 | |
| 64 // FIXME(sky): Remove this and ::first-line. | 62 // FIXME(sky): Remove this and ::first-line. |
| 65 bool usesFirstLineRules() const { return false; } | 63 bool usesFirstLineRules() const { return false; } |
| 66 | 64 |
| 67 void appendActiveAuthorStyleSheets(); | 65 void appendActiveAuthorStyleSheets(); |
| 68 | 66 |
| 69 StyleResolver* resolver() const | 67 StyleResolver* resolver() const |
| 70 { | 68 { |
| 71 return m_resolver.get(); | 69 return m_resolver.get(); |
| 72 } | 70 } |
| 73 | 71 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 95 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text); | 93 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text); |
| 96 void removeSheet(StyleSheetContents*); | 94 void removeSheet(StyleSheetContents*); |
| 97 | 95 |
| 98 private: | 96 private: |
| 99 // CSSFontSelectorClient implementation. | 97 // CSSFontSelectorClient implementation. |
| 100 virtual void fontsNeedUpdate(CSSFontSelector*) override; | 98 virtual void fontsNeedUpdate(CSSFontSelector*) override; |
| 101 | 99 |
| 102 private: | 100 private: |
| 103 explicit StyleEngine(Document&); | 101 explicit StyleEngine(Document&); |
| 104 | 102 |
| 103 void updateActiveStyleSheets(); |
| 105 void createResolver(); | 104 void createResolver(); |
| 106 | 105 |
| 107 RawPtr<Document> m_document; | 106 RawPtr<Document> m_document; |
| 108 | 107 |
| 109 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; | 108 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; |
| 110 TreeScopeSet m_activeTreeScopes; | 109 TreeScopeSet m_activeTreeScopes; |
| 111 | 110 |
| 112 OwnPtr<StyleResolver> m_resolver; | 111 OwnPtr<StyleResolver> m_resolver; |
| 113 | 112 |
| 114 RefPtr<CSSFontSelector> m_fontSelector; | 113 RefPtr<CSSFontSelector> m_fontSelector; |
| 115 | 114 |
| 116 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache; | 115 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache; |
| 117 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache; | 116 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache; |
| 118 }; | 117 }; |
| 119 | 118 |
| 120 } | 119 } |
| 121 | 120 |
| 122 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ | 121 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ |
| OLD | NEW |