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

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

Issue 788883005: Remove REM units. (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/MediaValuesTest.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 56
57 void parserAppendRule(PassRefPtr<StyleRuleBase>); 57 void parserAppendRule(PassRefPtr<StyleRuleBase>);
58 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; }
59 58
60 const Vector<RefPtr<StyleRuleBase> >& childRules() const { return m_childRul es; } 59 const Vector<RefPtr<StyleRuleBase> >& childRules() const { return m_childRul es; }
61 60
62 bool usesRemUnits() const { return m_usesRemUnits; }
63
64 void registerClient(CSSStyleSheet*); 61 void registerClient(CSSStyleSheet*);
65 void unregisterClient(CSSStyleSheet*); 62 void unregisterClient(CSSStyleSheet*);
66 63
67 void setHasMediaQueries(); 64 void setHasMediaQueries();
68 bool hasMediaQueries() const { return m_hasMediaQueries; } 65 bool hasMediaQueries() const { return m_hasMediaQueries; }
69 66
70 void shrinkToFit(); 67 void shrinkToFit();
71 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } 68 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); }
72 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); 69 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags);
73 void clearRuleSet(); 70 void clearRuleSet();
74 71
75 private: 72 private:
76 explicit StyleSheetContents(const CSSParserContext&); 73 explicit StyleSheetContents(const CSSParserContext&);
77 74
78 bool m_usesRemUnits : 1;
79 bool m_hasMediaQueries : 1; 75 bool m_hasMediaQueries : 1;
80 76
81 OwnPtr<RuleSet> m_ruleSet; 77 OwnPtr<RuleSet> m_ruleSet;
82 Vector<RefPtr<StyleRuleBase> > m_childRules; 78 Vector<RefPtr<StyleRuleBase> > m_childRules;
83 CSSParserContext m_parserContext; 79 CSSParserContext m_parserContext;
84 80
85 HashSet<RawPtr<CSSStyleSheet> > m_clients; 81 HashSet<RawPtr<CSSStyleSheet> > m_clients;
86 }; 82 };
87 83
88 } // namespace 84 } // namespace
89 85
90 #endif // SKY_ENGINE_CORE_CSS_STYLESHEETCONTENTS_H_ 86 #endif // SKY_ENGINE_CORE_CSS_STYLESHEETCONTENTS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaValuesTest.cpp ('k') | sky/engine/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698