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

Side by Side Diff: sky/engine/core/dom/StyleEngine.h

Issue 836383005: Don't walk treescopes in updateActiveStyleSheets until the resolver exists. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove comments. Created 5 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
« no previous file with comments | « no previous file | sky/engine/core/dom/StyleEngine.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698