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

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

Issue 816423004: Remove some dead code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « sky/engine/core/dom/Document.cpp ('k') | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class CSSStyleSheet; 43 class CSSStyleSheet;
44 class Document; 44 class Document;
45 class Node; 45 class Node;
46 class RuleFeatureSet; 46 class RuleFeatureSet;
47 class StyleRuleFontFace; 47 class StyleRuleFontFace;
48 class StyleSheetContents; 48 class StyleSheetContents;
49 49
50 class StyleEngine final : public CSSFontSelectorClient { 50 class StyleEngine final : public CSSFontSelectorClient {
51 WTF_MAKE_FAST_ALLOCATED; 51 WTF_MAKE_FAST_ALLOCATED;
52 public: 52 public:
53 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr( new StyleEngine(document)); } 53 static PassOwnPtr<StyleEngine> create(Document& document)
54 {
55 return adoptPtr(new StyleEngine(document));
56 }
54 57
55 ~StyleEngine(); 58 ~StyleEngine();
56 59
57 void detachFromDocument();
58
59 void addTreeScope(TreeScope&); 60 void addTreeScope(TreeScope&);
60 void removeTreeScope(TreeScope&); 61 void removeTreeScope(TreeScope&);
61 62
62 // FIXME(sky): Remove this and ::first-line. 63 // FIXME(sky): Remove this and ::first-line.
63 bool usesFirstLineRules() const { return false; } 64 bool usesFirstLineRules() const { return false; }
64 65
65 StyleResolver& resolver() { return *m_resolver; } 66 StyleResolver& resolver() { return *m_resolver; }
66 67
67 CSSFontSelector* fontSelector() { return m_fontSelector.get(); } 68 CSSFontSelector* fontSelector() { return m_fontSelector.get(); }
68 void clearFontCache(); 69
69 // updateGenericFontFamilySettings is used from WebSettingsImpl.
70 void updateGenericFontFamilySettings(); 70 void updateGenericFontFamilySettings();
71 71
72 void resolverChanged(); 72 void resolverChanged();
73 unsigned resolverAccessCount() const;
74 73
75 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text); 74 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text);
76 void removeSheet(StyleSheetContents*); 75 void removeSheet(StyleSheetContents*);
77 76
78 private: 77 private:
79 // CSSFontSelectorClient implementation. 78 // CSSFontSelectorClient implementation.
80 virtual void fontsNeedUpdate(CSSFontSelector*) override; 79 virtual void fontsNeedUpdate(CSSFontSelector*) override;
81 80
82 private: 81 private:
83 explicit StyleEngine(Document&); 82 explicit StyleEngine(Document&);
84 83
84 // TODO(esprehn): Need to call this after @font-face rules load.
85 void clearFontCache();
86
85 void updateActiveStyleSheets(); 87 void updateActiveStyleSheets();
86 88
87 RawPtr<Document> m_document; 89 RawPtr<Document> m_document;
88 90
89 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; 91 typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
90 TreeScopeSet m_activeTreeScopes; 92 TreeScopeSet m_activeTreeScopes;
91 93
92 OwnPtr<StyleResolver> m_resolver; 94 OwnPtr<StyleResolver> m_resolver;
93 95
94 RefPtr<CSSFontSelector> m_fontSelector; 96 RefPtr<CSSFontSelector> m_fontSelector;
95 97
96 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache; 98 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache;
97 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache; 99 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache;
98 }; 100 };
99 101
100 } 102 }
101 103
102 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ 104 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698