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

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

Issue 778743003: Merge StyleSheet into CSSStyleSheet. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: sort headers. Created 6 years 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/StyleElement.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "sky/engine/wtf/text/WTFString.h" 42 #include "sky/engine/wtf/text/WTFString.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class CSSFontSelector; 46 class CSSFontSelector;
47 class CSSStyleSheet; 47 class CSSStyleSheet;
48 class Node; 48 class Node;
49 class RuleFeatureSet; 49 class RuleFeatureSet;
50 class ShadowTreeStyleSheetCollection; 50 class ShadowTreeStyleSheetCollection;
51 class StyleRuleFontFace; 51 class StyleRuleFontFace;
52 class StyleSheet;
53 class StyleSheetContents; 52 class StyleSheetContents;
54 53
55 class StyleEngine final : public CSSFontSelectorClient { 54 class StyleEngine final : public CSSFontSelectorClient {
56 WTF_MAKE_FAST_ALLOCATED; 55 WTF_MAKE_FAST_ALLOCATED;
57 public: 56 public:
58 57
59 class IgnoringPendingStylesheet : public TemporaryChange<bool> { 58 class IgnoringPendingStylesheet : public TemporaryChange<bool> {
60 public: 59 public:
61 IgnoringPendingStylesheet(StyleEngine* engine) 60 IgnoringPendingStylesheet(StyleEngine* engine)
62 : TemporaryChange<bool>(engine->m_ignorePendingStylesheets, true) 61 : TemporaryChange<bool>(engine->m_ignorePendingStylesheets, true)
63 { 62 {
64 } 63 }
65 }; 64 };
66 65
67 friend class IgnoringPendingStylesheet; 66 friend class IgnoringPendingStylesheet;
68 67
69 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr( new StyleEngine(document)); } 68 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr( new StyleEngine(document)); }
70 69
71 ~StyleEngine(); 70 ~StyleEngine();
72 71
73 #if !ENABLE(OILPAN) 72 #if !ENABLE(OILPAN)
74 void detachFromDocument(); 73 void detachFromDocument();
75 #endif 74 #endif
76 75
77 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList(TreeScope&); 76 const Vector<RefPtr<CSSStyleSheet> >& styleSheetsForStyleSheetList(TreeScope &);
78 77
79 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re turn m_authorStyleSheets; } 78 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re turn m_authorStyleSheets; }
80 79
81 void modifiedStyleSheet(StyleSheet*); 80 void modifiedStyleSheet(CSSStyleSheet*);
82 void addStyleSheetCandidateNode(Node*, bool createdByParser); 81 void addStyleSheetCandidateNode(Node*, bool createdByParser);
83 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeSc ope&); 82 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeSc ope&);
84 83
85 void clearMediaQueryRuleSetStyleSheets(); 84 void clearMediaQueryRuleSetStyleSheets();
86 void updateActiveStyleSheets(); 85 void updateActiveStyleSheets();
87 86
88 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; } 87 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; }
89 88
90 // FIXME(sky): Remove this and ::first-line. 89 // FIXME(sky): Remove this and ::first-line.
91 bool usesFirstLineRules() const { return false; } 90 bool usesFirstLineRules() const { return false; }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 191
193 RefPtr<CSSFontSelector> m_fontSelector; 192 RefPtr<CSSFontSelector> m_fontSelector;
194 193
195 HashMap<AtomicString, RawPtr<StyleSheetContents> > m_textToSheetCache; 194 HashMap<AtomicString, RawPtr<StyleSheetContents> > m_textToSheetCache;
196 HashMap<RawPtr<StyleSheetContents>, AtomicString> m_sheetToTextCache; 195 HashMap<RawPtr<StyleSheetContents>, AtomicString> m_sheetToTextCache;
197 }; 196 };
198 197
199 } 198 }
200 199
201 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ 200 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleElement.cpp ('k') | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698