diff options
author | DexesTTP <dexes.ttp@gmail.com> | 2022-04-30 11:15:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-15 12:17:36 +0200 |
commit | 962040b49c92447530b934b91c4da8815f18b964 (patch) | |
tree | e5b37ad6d10d85d2eb77a0dd12d2669593f362fd /Userland/Libraries/LibWeb/StylePropertiesModel.h | |
parent | b797e1e2b95c3e91849b4726cfd1871d285b6f55 (diff) | |
download | serenity-962040b49c92447530b934b91c4da8815f18b964.zip |
LibWebView: Move StylePropertiesModel to LibWebView
This patch has no functional changes.
Diffstat (limited to 'Userland/Libraries/LibWeb/StylePropertiesModel.h')
-rw-r--r-- | Userland/Libraries/LibWeb/StylePropertiesModel.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/Userland/Libraries/LibWeb/StylePropertiesModel.h b/Userland/Libraries/LibWeb/StylePropertiesModel.h deleted file mode 100644 index b4b1debd74..0000000000 --- a/Userland/Libraries/LibWeb/StylePropertiesModel.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> - * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org> - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include <AK/JsonObject.h> -#include <LibGUI/Model.h> -#include <LibWeb/CSS/StyleProperties.h> - -namespace Web { - -class StylePropertiesModel final : public GUI::Model { -public: - enum Column { - PropertyName, - PropertyValue, - __Count - }; - - static NonnullRefPtr<StylePropertiesModel> create(StringView properties) - { - auto json_or_error = JsonValue::from_string(properties).release_value_but_fixme_should_propagate_errors(); - return adopt_ref(*new StylePropertiesModel(json_or_error.as_object())); - } - - virtual ~StylePropertiesModel() override; - - virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; - virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; } - virtual String column_name(int) const override; - virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override; - virtual bool is_searchable() const override { return true; } - virtual Vector<GUI::ModelIndex> matches(StringView, unsigned flags, GUI::ModelIndex const&) override; - -private: - explicit StylePropertiesModel(JsonObject); - - JsonObject m_properties; - - struct Value { - String name; - String value; - }; - Vector<Value> m_values; -}; - -} |