/* * Copyright (C) 1999 Lars Knoll ([email protected]) * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_ELEMENT_RULE_COLLECTOR_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_ELEMENT_RULE_COLLECTOR_H_ #include "base/auto_reset.h" #include "base/gtest_prod_util.h" #include "base/memory/scoped_refptr.h" #include "base/memory/stack_allocated.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/css/container_selector.h" #include "third_party/blink/renderer/core/css/css_rule_list.h" #include "third_party/blink/renderer/core/css/part_names.h" #include "third_party/blink/renderer/core/css/resolver/match_request.h" #include "third_party/blink/renderer/core/css/resolver/match_result.h" #include "third_party/blink/renderer/core/css/selector_checker.h" #include "third_party/blink/renderer/core/css/style_recalc_context.h" #include "third_party/blink/renderer/core/css/style_request.h" #include "third_party/blink/renderer/core/style/computed_style_base_constants.h" #include "third_party/blink/renderer/platform/wtf/ref_counted.h" #include "third_party/blink/renderer/platform/wtf/vector.h" namespace blink { class Element; class ElementResolveContext; class ElementRuleCollector; class HTMLSlotElement; class RuleData; class SelectorFilter; class StyleRuleUsageTracker; class MatchedRule { … }; } // namespace blink WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(…) namespace blink { StyleRuleList; // Manages the process of finding what rules in a RuleSet apply to a given // Element. These tend to be used several times in different contexts and should // have ClearMatchedRules called before use. // // ElementRuleCollector is designed to be used as a stack object. // Create one, ask what rules the ElementResolveContext matches // and then let it go out of scope. In particular, do not change // values in the RuleSet buckets (which would invalidate the RuleData // pointers) before you have extracted the results, typically with // SortAndTransferMatchedRules(). // // FIXME: Currently it modifies the ComputedStyle but should not! class CORE_EXPORT ElementRuleCollector { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_ELEMENT_RULE_COLLECTOR_H_