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

Side by Side Diff: Source/core/css/resolver/ScopedStyleResolver.h

Issue 143323014: *** DO NOT LAND *** Attempt to understand Regions complexity Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months 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 | Annotate | Revision Log
OLDNEW
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) 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 static PassOwnPtr<ScopedStyleResolver> create(ContainerNode& scopingNode) { return adoptPtr(new ScopedStyleResolver(scopingNode)); } 48 static PassOwnPtr<ScopedStyleResolver> create(ContainerNode& scopingNode) { return adoptPtr(new ScopedStyleResolver(scopingNode)); }
49 49
50 static ContainerNode* scopingNodeFor(Document&, const CSSStyleSheet*); 50 static ContainerNode* scopingNodeFor(Document&, const CSSStyleSheet*);
51 51
52 const ContainerNode& scopingNode() const { return m_scopingNode; } 52 const ContainerNode& scopingNode() const { return m_scopingNode; }
53 const TreeScope& treeScope() const { return m_scopingNode.treeScope(); } 53 const TreeScope& treeScope() const { return m_scopingNode.treeScope(); }
54 void setParent(ScopedStyleResolver* newParent) { m_parent = newParent; } 54 void setParent(ScopedStyleResolver* newParent) { m_parent = newParent; }
55 ScopedStyleResolver* parent() { return m_parent; } 55 ScopedStyleResolver* parent() { return m_parent; }
56 56
57 public: 57 public:
58 bool checkRegionStyle(Element*);
59 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima tionName); 58 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima tionName);
60 void addKeyframeStyle(PassRefPtr<StyleRuleKeyframes>); 59 void addKeyframeStyle(PassRefPtr<StyleRuleKeyframes>);
61 60
62 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule s, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder); 61 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule s, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder);
63 void matchPageRules(PageRuleCollector&); 62 void matchPageRules(PageRuleCollector&);
64 void addRulesFromSheet(CSSStyleSheet*, const MediaQueryEvaluator&, StyleReso lver*); 63 void addRulesFromSheet(CSSStyleSheet*, const MediaQueryEvaluator&, StyleReso lver*);
65 void collectFeaturesTo(RuleFeatureSet&); 64 void collectFeaturesTo(RuleFeatureSet&);
66 void resetAuthorStyle(); 65 void resetAuthorStyle();
67 void collectViewportRulesTo(StyleResolver*) const; 66 void collectViewportRulesTo(StyleResolver*) const;
68 67
69 private: 68 private:
70 explicit ScopedStyleResolver(ContainerNode& scopingNode) : m_scopingNode(sco pingNode), m_parent(0) { } 69 explicit ScopedStyleResolver(ContainerNode& scopingNode) : m_scopingNode(sco pingNode), m_parent(0) { }
71 70
72 ContainerNode& m_scopingNode; 71 ContainerNode& m_scopingNode;
73 ScopedStyleResolver* m_parent; 72 ScopedStyleResolver* m_parent;
74 73
75 Vector<CSSStyleSheet*> m_authorStyleSheets; 74 Vector<CSSStyleSheet*> m_authorStyleSheets;
76 75
77 typedef HashMap<const StringImpl*, RefPtr<StyleRuleKeyframes> > KeyframesRul eMap; 76 typedef HashMap<const StringImpl*, RefPtr<StyleRuleKeyframes> > KeyframesRul eMap;
78 KeyframesRuleMap m_keyframesRuleMap; 77 KeyframesRuleMap m_keyframesRuleMap;
79 }; 78 };
80 79
81 } // namespace WebCore 80 } // namespace WebCore
82 81
83 #endif // ScopedStyleResolver_h 82 #endif // ScopedStyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698