mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
49
Libraries/LibWeb/CSS/Parser/ParsingContext.h
Normal file
49
Libraries/LibWeb/CSS/Parser/ParsingContext.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, the SerenityOS developers.
|
||||
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
||||
namespace Web::CSS::Parser {
|
||||
|
||||
class ParsingContext {
|
||||
public:
|
||||
enum class Mode {
|
||||
Normal,
|
||||
SVGPresentationAttribute, // See https://svgwg.org/svg2-draft/types.html#presentation-attribute-css-value
|
||||
};
|
||||
|
||||
explicit ParsingContext(JS::Realm&, Mode = Mode::Normal);
|
||||
explicit ParsingContext(JS::Realm&, URL::URL, Mode = Mode::Normal);
|
||||
explicit ParsingContext(DOM::Document const&, Mode = Mode::Normal);
|
||||
explicit ParsingContext(DOM::Document const&, URL::URL, Mode = Mode::Normal);
|
||||
explicit ParsingContext(DOM::ParentNode&, Mode = Mode::Normal);
|
||||
|
||||
Mode mode() const { return m_mode; }
|
||||
bool is_parsing_svg_presentation_attribute() const { return m_mode == Mode::SVGPresentationAttribute; }
|
||||
|
||||
bool in_quirks_mode() const;
|
||||
DOM::Document const* document() const { return m_document; }
|
||||
HTML::Window const* window() const;
|
||||
URL::URL complete_url(StringView) const;
|
||||
|
||||
PropertyID current_property_id() const { return m_current_property_id; }
|
||||
void set_current_property_id(PropertyID property_id) { m_current_property_id = property_id; }
|
||||
|
||||
JS::Realm& realm() const { return m_realm; }
|
||||
|
||||
private:
|
||||
JS::NonnullGCPtr<JS::Realm> m_realm;
|
||||
JS::GCPtr<DOM::Document const> m_document;
|
||||
PropertyID m_current_property_id { PropertyID::Invalid };
|
||||
URL::URL m_url;
|
||||
Mode m_mode { Mode::Normal };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue