#include "third_party/blink/renderer/core/css/css_style_sheet.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_css_style_sheet_init.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_medialist_string.h"
#include "third_party/blink/renderer/core/core_probes_inl.h"
#include "third_party/blink/renderer/core/css/css_import_rule.h"
#include "third_party/blink/renderer/core/css/css_rule_list.h"
#include "third_party/blink/renderer/core/css/media_list.h"
#include "third_party/blink/renderer/core/css/parser/css_parser.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_context.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_impl.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.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_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/tree_scope.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/html/html_link_element.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/inspector/console_message.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/svg/svg_style_element.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
class StyleSheetCSSRuleList final : public CSSRuleList { … };
#if DCHECK_IS_ON()
static bool IsAcceptableCSSStyleSheetParent(const Node& parent_node) { … }
#endif
const Document* CSSStyleSheet::SingleOwnerDocument(
const CSSStyleSheet* style_sheet) { … }
CSSStyleSheet* CSSStyleSheet::Create(Document& document,
const CSSStyleSheetInit* options,
ExceptionState& exception_state) { … }
CSSStyleSheet* CSSStyleSheet::Create(Document& document,
const KURL& base_url,
const CSSStyleSheetInit* options,
ExceptionState& exception_state) { … }
CSSStyleSheet* CSSStyleSheet::CreateInline(StyleSheetContents* sheet,
Node& owner_node,
const TextPosition& start_position) { … }
CSSStyleSheet* CSSStyleSheet::CreateInline(Node& owner_node,
const KURL& base_url,
const TextPosition& start_position,
const WTF::TextEncoding& encoding) { … }
CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents,
CSSImportRule* owner_rule)
: … { … }
CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents,
Document& document,
const CSSStyleSheetInit* options)
: … { … }
CSSStyleSheet::CSSStyleSheet(StyleSheetContents* contents,
Node& owner_node,
bool is_inline_stylesheet,
const TextPosition& start_position)
: … { … }
CSSStyleSheet::~CSSStyleSheet() = default;
void CSSStyleSheet::WillMutateRules() { … }
void CSSStyleSheet::DidMutate(Mutation mutation) { … }
void CSSStyleSheet::EnableRuleAccessForInspector() { … }
void CSSStyleSheet::DisableRuleAccessForInspector() { … }
CSSStyleSheet::InspectorMutationScope::InspectorMutationScope(
CSSStyleSheet* sheet)
: … { … }
CSSStyleSheet::InspectorMutationScope::~InspectorMutationScope() { … }
void CSSStyleSheet::ReattachChildRuleCSSOMWrappers() { … }
void CSSStyleSheet::setDisabled(bool disabled) { … }
bool CSSStyleSheet::MatchesMediaQueries(const MediaQueryEvaluator& evaluator) { … }
void CSSStyleSheet::AddedAdoptedToTreeScope(TreeScope& tree_scope) { … }
void CSSStyleSheet::RemovedAdoptedFromTreeScope(TreeScope& tree_scope) { … }
bool CSSStyleSheet::IsAdoptedByTreeScope(TreeScope& tree_scope) { … }
bool CSSStyleSheet::HasViewportDependentMediaQueries() const { … }
bool CSSStyleSheet::HasDynamicViewportDependentMediaQueries() const { … }
unsigned CSSStyleSheet::length() const { … }
CSSRule* CSSStyleSheet::item(unsigned index, bool trigger_use_counters) { … }
void CSSStyleSheet::ClearOwnerNode() { … }
bool CSSStyleSheet::CanAccessRules() const { … }
CSSRuleList* CSSStyleSheet::rules(ExceptionState& exception_state) { … }
unsigned CSSStyleSheet::insertRule(const String& rule_string,
unsigned index,
ExceptionState& exception_state) { … }
void CSSStyleSheet::deleteRule(unsigned index,
ExceptionState& exception_state) { … }
int CSSStyleSheet::addRule(const String& selector,
const String& style,
int index,
ExceptionState& exception_state) { … }
int CSSStyleSheet::addRule(const String& selector,
const String& style,
ExceptionState& exception_state) { … }
ScriptPromise<CSSStyleSheet> CSSStyleSheet::replace(
ScriptState* script_state,
const String& text,
ExceptionState& exception_state) { … }
void CSSStyleSheet::replaceSync(const String& text,
ExceptionState& exception_state) { … }
CSSRuleList* CSSStyleSheet::cssRules(ExceptionState& exception_state) { … }
String CSSStyleSheet::href() const { … }
KURL CSSStyleSheet::BaseURL() const { … }
bool CSSStyleSheet::IsLoading() const { … }
MediaList* CSSStyleSheet::media() { … }
CSSStyleSheet* CSSStyleSheet::parentStyleSheet() const { … }
Document* CSSStyleSheet::OwnerDocument() const { … }
bool CSSStyleSheet::SheetLoaded() { … }
void CSSStyleSheet::SetToPendingState() { … }
void CSSStyleSheet::SetLoadCompleted(bool completed) { … }
void CSSStyleSheet::SetText(const String& text, CSSImportRules import_rules) { … }
void CSSStyleSheet::SetAlternateFromConstructor(
bool alternate_from_constructor) { … }
bool CSSStyleSheet::IsAlternate() const { … }
bool CSSStyleSheet::CanBeActivated(
const String& current_preferrable_name) const { … }
void CSSStyleSheet::Trace(Visitor* visitor) const { … }
}