| 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&); | 46 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 |
| 47 RuleSet* watchedSelectorRules() const { return m_watchedSelectorsRules.get()
; } |
| 48 void initWatchedSelectorRules(const Vector<RefPtr<StyleRule> >& watchedSelec
tors); |
| 49 |
| 47 void resetAuthorStyle(); | 50 void resetAuthorStyle(); |
| 48 void collectFeaturesTo(RuleFeatureSet&, bool isViewSource); | 51 void collectFeaturesTo(RuleFeatureSet&, bool isViewSource); |
| 49 | |
| 50 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } | 52 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } |
| 51 | 53 |
| 52 private: | 54 private: |
| 53 void collectRulesFromUserStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&,
RuleSet& userStyle, const MediaQueryEvaluator&, StyleResolver&); | 55 OwnPtr<RuleSet> m_watchedSelectorsRules; |
| 54 void collectRulesFromWatchedSelectors(const Vector<RefPtr<StyleRule> >&, Rul
eSet& userStyle); | |
| 55 OwnPtr<RuleSet> m_userStyle; | |
| 56 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; | 56 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace WebCore | 59 } // namespace WebCore |
| 60 | 60 |
| 61 #endif // DocumentRuleSets_h | 61 #endif // DocumentRuleSets_h |
| OLD | NEW |