OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "wtf/RefPtr.h" | 30 #include "wtf/RefPtr.h" |
31 #include "wtf/Vector.h" | 31 #include "wtf/Vector.h" |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 class CSSStyleSheet; | 35 class CSSStyleSheet; |
36 class MediaQueryEvaluator; | 36 class MediaQueryEvaluator; |
37 class RuleFeatureSet; | 37 class RuleFeatureSet; |
38 class StyleEngine; | 38 class StyleEngine; |
39 | 39 |
| 40 // FIXME: This class doesn't really serve a purpose anymore. Merge it into Style
Resolver. |
40 class DocumentRuleSets { | 41 class DocumentRuleSets { |
41 public: | 42 public: |
42 DocumentRuleSets(); | 43 DocumentRuleSets(); |
43 ~DocumentRuleSets(); | 44 ~DocumentRuleSets(); |
44 RuleSet* userStyle() const { return m_userStyle.get(); } | |
45 | 45 |
46 void initUserStyle(StyleEngine*, const Vector<RefPtr<StyleRule> >& watchedSe
lectors, const MediaQueryEvaluator&, StyleResolver&); | |
47 void resetAuthorStyle(); | 46 void resetAuthorStyle(); |
48 void collectFeaturesTo(RuleFeatureSet&, bool isViewSource); | 47 void collectFeaturesTo(RuleFeatureSet&, bool isViewSource); |
49 | |
50 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } | 48 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } |
51 | 49 |
52 private: | 50 private: |
53 void collectRulesFromUserStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&,
RuleSet& userStyle, const MediaQueryEvaluator&, StyleResolver&); | |
54 void collectRulesFromWatchedSelectors(const Vector<RefPtr<StyleRule> >&, Rul
eSet& userStyle); | |
55 OwnPtr<RuleSet> m_userStyle; | |
56 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; | 51 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; |
57 }; | 52 }; |
58 | 53 |
59 } // namespace WebCore | 54 } // namespace WebCore |
60 | 55 |
61 #endif // DocumentRuleSets_h | 56 #endif // DocumentRuleSets_h |
OLD | NEW |