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

Side by Side Diff: sky/engine/core/css/StyleSheetContents.h

Issue 809513003: Remove dead methods from CSSStyleSheet and StyleSheetContents. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/css/RuleSetTest.cpp ('k') | sky/engine/core/css/StyleSheetContents.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context ) 46 static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context )
47 { 47 {
48 return adoptRef(new StyleSheetContents(context)); 48 return adoptRef(new StyleSheetContents(context));
49 } 49 }
50 50
51 ~StyleSheetContents(); 51 ~StyleSheetContents();
52 52
53 const CSSParserContext& parserContext() const { return m_parserContext; } 53 const CSSParserContext& parserContext() const { return m_parserContext; }
54 54
55 bool parseString(const String&); 55 bool parseString(const String&);
56 bool parseStringAtPosition(const String&, const TextPosition&, bool);
57 56
58 void parserAppendRule(PassRefPtr<StyleRuleBase>); 57 void parserAppendRule(PassRefPtr<StyleRuleBase>);
59 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } 58 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; }
60 59
61 // Rules other than @charset and @import.
62 const Vector<RefPtr<StyleRuleBase> >& childRules() const { return m_childRul es; } 60 const Vector<RefPtr<StyleRuleBase> >& childRules() const { return m_childRul es; }
63 61
64 unsigned ruleCount() const;
65 StyleRuleBase* ruleAt(unsigned index) const;
66
67 bool usesRemUnits() const { return m_usesRemUnits; } 62 bool usesRemUnits() const { return m_usesRemUnits; }
68 63
69 void registerClient(CSSStyleSheet*); 64 void registerClient(CSSStyleSheet*);
70 void unregisterClient(CSSStyleSheet*); 65 void unregisterClient(CSSStyleSheet*);
71 66
72 void setHasMediaQueries(); 67 void setHasMediaQueries();
73 bool hasMediaQueries() const { return m_hasMediaQueries; } 68 bool hasMediaQueries() const { return m_hasMediaQueries; }
74 69
75 void shrinkToFit(); 70 void shrinkToFit();
76 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } 71 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); }
77 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); 72 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags);
78 void clearRuleSet(); 73 void clearRuleSet();
79 74
80 private: 75 private:
81 explicit StyleSheetContents(const CSSParserContext&); 76 explicit StyleSheetContents(const CSSParserContext&);
82 77
83 bool m_usesRemUnits : 1; 78 bool m_usesRemUnits : 1;
84 bool m_hasMediaQueries : 1; 79 bool m_hasMediaQueries : 1;
85 80
86 OwnPtr<RuleSet> m_ruleSet; 81 OwnPtr<RuleSet> m_ruleSet;
87 Vector<RefPtr<StyleRuleBase> > m_childRules; 82 Vector<RefPtr<StyleRuleBase> > m_childRules;
88 CSSParserContext m_parserContext; 83 CSSParserContext m_parserContext;
89 84
90 HashSet<RawPtr<CSSStyleSheet> > m_clients; 85 HashSet<RawPtr<CSSStyleSheet> > m_clients;
91 }; 86 };
92 87
93 } // namespace 88 } // namespace
94 89
95 #endif // SKY_ENGINE_CORE_CSS_STYLESHEETCONTENTS_H_ 90 #endif // SKY_ENGINE_CORE_CSS_STYLESHEETCONTENTS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/RuleSetTest.cpp ('k') | sky/engine/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698