#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/css/resolver/scoped_style_resolver.h"
#include "third_party/blink/renderer/core/animation/document_timeline.h"
#include "third_party/blink/renderer/core/css/cascade_layer_map.h"
#include "third_party/blink/renderer/core/css/counter_style_map.h"
#include "third_party/blink/renderer/core/css/css_font_selector.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_style_sheet.h"
#include "third_party/blink/renderer/core/css/font_face.h"
#include "third_party/blink/renderer/core/css/page_rule_collector.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/style_resolver.h"
#include "third_party/blink/renderer/core/css/rule_feature_set.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/css/style_rule.h"
#include "third_party/blink/renderer/core/css/style_scope_data.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/html/html_style_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/svg/svg_style_element.h"
namespace blink {
ScopedStyleResolver* ScopedStyleResolver::Parent() const { … }
void ScopedStyleResolver::AddKeyframeRules(const RuleSet& rule_set) { … }
CounterStyleMap& ScopedStyleResolver::EnsureCounterStyleMap() { … }
void ScopedStyleResolver::AddFontFaceRules(const RuleSet& rule_set) { … }
void ScopedStyleResolver::AddCounterStyleRules(const RuleSet& rule_set) { … }
void ScopedStyleResolver::AppendActiveStyleSheets(
unsigned index,
const ActiveStyleSheetVector& active_sheets) { … }
void ScopedStyleResolver::CollectFeaturesTo(
RuleFeatureSet& features,
HeapHashSet<Member<const StyleSheetContents>>&
visited_shared_style_sheet_contents) const { … }
void ScopedStyleResolver::ResetStyle() { … }
StyleRuleKeyframes* ScopedStyleResolver::KeyframeStylesForAnimation(
const AtomicString& animation_name) { … }
void ScopedStyleResolver::AddKeyframeStyle(StyleRuleKeyframes* rule) { … }
bool ScopedStyleResolver::KeyframeStyleShouldOverride(
const StyleRuleKeyframes* new_rule,
const StyleRuleKeyframes* existing_rule) const { … }
Element& ScopedStyleResolver::InvalidationRootForTreeScope(
const TreeScope& tree_scope) { … }
void ScopedStyleResolver::KeyframesRulesAdded(const TreeScope& tree_scope) { … }
namespace {
bool CanRejectRuleSet(ElementRuleCollector& collector,
const RuleSet& rule_set) { … }
}
template <class Func>
void ScopedStyleResolver::ForAllStylesheets(ElementRuleCollector& collector,
const Func& func) { … }
void ScopedStyleResolver::CollectMatchingElementScopeRules(
ElementRuleCollector& collector) { … }
void ScopedStyleResolver::CollectMatchingShadowHostRules(
ElementRuleCollector& collector) { … }
void ScopedStyleResolver::CollectMatchingSlottedRules(
ElementRuleCollector& collector) { … }
void ScopedStyleResolver::CollectMatchingPartPseudoRules(
ElementRuleCollector& collector,
PartNames* part_names,
bool for_shadow_pseudo) { … }
void ScopedStyleResolver::MatchPageRules(PageRuleCollector& collector) { … }
void ScopedStyleResolver::RebuildCascadeLayerMap(
const ActiveStyleSheetVector& sheets) { … }
void ScopedStyleResolver::AddPositionTryRules(const RuleSet& rule_set) { … }
void ScopedStyleResolver::AddFunctionRules(const RuleSet& rule_set) { … }
void ScopedStyleResolver::AddFontFeatureValuesRules(const RuleSet& rule_set) { … }
StyleRulePositionTry* ScopedStyleResolver::PositionTryForName(
const AtomicString& try_name) { … }
StyleRuleFunction* ScopedStyleResolver::FunctionForName(StringView name) { … }
const FontFeatureValuesStorage* ScopedStyleResolver::FontFeatureValuesForFamily(
AtomicString font_family) { … }
namespace {
Element* ImplicitScopeTrigger(TreeScope& scope, CSSStyleSheet& sheet) { … }
template <typename Func>
void ForEachImplicitScopeTrigger(TreeScope& scope,
CSSStyleSheet& sheet,
const RuleSet& rule_set,
Func func) { … }
}
void ScopedStyleResolver::AddImplicitScopeTriggers(CSSStyleSheet& sheet,
const RuleSet& rule_set) { … }
void ScopedStyleResolver::AddImplicitScopeTrigger(
Element& element,
const StyleScope& style_scope) { … }
void ScopedStyleResolver::RemoveImplicitScopeTriggers() { … }
void ScopedStyleResolver::RemoveImplicitScopeTriggers(CSSStyleSheet& sheet,
const RuleSet& rule_set) { … }
void ScopedStyleResolver::RemoveImplicitScopeTrigger(
Element& element,
const StyleScope& style_scope) { … }
void ScopedStyleResolver::Trace(Visitor* visitor) const { … }
}