#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/css/css_property_value_set.h"
#include "third_party/blink/renderer/core/css/css_style_sheet.h"
#include "third_party/blink/renderer/core/css/parser/css_parser.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_rule_counter_style.h"
#include "third_party/blink/renderer/core/css/style_rule_import.h"
#include "third_party/blink/renderer/core/css/style_rule_namespace.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/loader/resource/css_style_sheet_resource.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
namespace blink {
const Document* StyleSheetContents::SingleOwnerDocument(
const StyleSheetContents* style_sheet_contents) { … }
unsigned StyleSheetContents::EstimatedSizeInBytes() const { … }
StyleSheetContents::StyleSheetContents(const CSSParserContext* context,
const String& original_url,
StyleRuleImport* owner_rule)
: … { … }
StyleSheetContents::StyleSheetContents(const StyleSheetContents& o)
: … { … }
StyleSheetContents::~StyleSheetContents() = default;
void StyleSheetContents::SetHasSyntacticallyValidCSSHeader(bool is_valid_css) { … }
bool StyleSheetContents::IsCacheableForResource() const { … }
bool StyleSheetContents::IsCacheableForStyleElement() const { … }
void StyleSheetContents::ParserAppendRule(StyleRuleBase* rule) { … }
void StyleSheetContents::SetHasMediaQueries() { … }
StyleRuleBase* StyleSheetContents::RuleAt(unsigned index) const { … }
unsigned StyleSheetContents::RuleCount() const { … }
void StyleSheetContents::ClearRules() { … }
static wtf_size_t ReplaceRuleIfExistsInternal(
const StyleRuleBase* old_rule,
StyleRuleBase* new_rule,
HeapVector<Member<StyleRuleBase>>& child_rules) { … }
wtf_size_t StyleSheetContents::ReplaceRuleIfExists(StyleRuleBase* old_rule,
StyleRuleBase* new_rule,
wtf_size_t position_hint) { … }
bool StyleSheetContents::WrapperInsertRule(StyleRuleBase* rule,
unsigned index) { … }
bool StyleSheetContents::WrapperDeleteRule(unsigned index) { … }
void StyleSheetContents::ParserAddNamespace(const AtomicString& prefix,
const AtomicString& uri) { … }
const AtomicString& StyleSheetContents::NamespaceURIFromPrefix(
const AtomicString& prefix) const { … }
void StyleSheetContents::ParseAuthorStyleSheet(
const CSSStyleSheetResource* cached_style_sheet) { … }
ParseSheetResult StyleSheetContents::ParseString(
const String& sheet_text,
bool allow_import_rules,
CSSDeferPropertyParsing defer_property_parsing) { … }
bool StyleSheetContents::IsLoading() const { … }
bool StyleSheetContents::LoadCompleted() const { … }
void StyleSheetContents::CheckLoaded() { … }
void StyleSheetContents::NotifyLoadedSheet(const CSSStyleSheetResource* sheet) { … }
void StyleSheetContents::SetToPendingState() { … }
StyleSheetContents* StyleSheetContents::RootStyleSheet() const { … }
bool StyleSheetContents::HasSingleOwnerNode() const { … }
Node* StyleSheetContents::SingleOwnerNode() const { … }
Document* StyleSheetContents::SingleOwnerDocument() const { … }
Document* StyleSheetContents::AnyOwnerDocument() const { … }
static bool ChildRulesHaveFailedOrCanceledSubresources(
const HeapVector<Member<StyleRuleBase>>& rules) { … }
bool StyleSheetContents::HasFailedOrCanceledSubresources() const { … }
Document* StyleSheetContents::ClientAnyOwnerDocument() const { … }
Document* StyleSheetContents::ClientSingleOwnerDocument() const { … }
StyleSheetContents* StyleSheetContents::ParentStyleSheet() const { … }
void StyleSheetContents::RegisterClient(CSSStyleSheet* sheet) { … }
void StyleSheetContents::UnregisterClient(CSSStyleSheet* sheet) { … }
void StyleSheetContents::ClientLoadCompleted(CSSStyleSheet* sheet) { … }
void StyleSheetContents::ClientLoadStarted(CSSStyleSheet* sheet) { … }
void StyleSheetContents::SetReferencedFromResource(
CSSStyleSheetResource* resource) { … }
void StyleSheetContents::ClearReferencedFromResource() { … }
RuleSet& StyleSheetContents::EnsureRuleSet(const MediaQueryEvaluator& medium) { … }
static void SetNeedsActiveStyleUpdateForClients(
HeapHashSet<WeakMember<CSSStyleSheet>>& clients) { … }
void StyleSheetContents::StartMutation() { … }
void StyleSheetContents::ClearRuleSet() { … }
static void RemoveFontFaceRules(HeapHashSet<WeakMember<CSSStyleSheet>>& clients,
const StyleRuleFontFace* font_face_rule) { … }
void StyleSheetContents::NotifyRemoveFontFaceRule(
const StyleRuleFontFace* font_face_rule) { … }
void StyleSheetContents::Trace(Visitor* visitor) const { … }
}