/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::CSS { class DeprecatedParsingContext { public: DeprecatedParsingContext(); explicit DeprecatedParsingContext(const DOM::Document&); explicit DeprecatedParsingContext(const DOM::ParentNode&); bool in_quirks_mode() const; URL complete_url(const String&) const; private: const DOM::Document* m_document { nullptr }; }; } namespace Web { RefPtr parse_css(const CSS::DeprecatedParsingContext&, const StringView&); RefPtr parse_css_declaration(const CSS::DeprecatedParsingContext&, const StringView&); RefPtr parse_css_value(const CSS::DeprecatedParsingContext&, const StringView&, CSS::PropertyID property_id = CSS::PropertyID::Invalid); RefPtr parse_selector(const CSS::DeprecatedParsingContext&, const StringView&); RefPtr parse_line_width(const CSS::DeprecatedParsingContext&, const StringView&); RefPtr parse_color(const CSS::DeprecatedParsingContext&, const StringView&); RefPtr parse_line_style(const CSS::DeprecatedParsingContext&, const StringView&); RefPtr parse_html_length(const DOM::Document&, const StringView&); }