mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +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
41
Libraries/LibWeb/CSS/StyleValues/ShorthandStyleValue.h
Normal file
41
Libraries/LibWeb/CSS/StyleValues/ShorthandStyleValue.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Ali Mohammad Pur <mpfard@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/CSS/CSSStyleValue.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
class ShorthandStyleValue final : public StyleValueWithDefaultOperators<ShorthandStyleValue> {
|
||||
public:
|
||||
static ValueComparingNonnullRefPtr<ShorthandStyleValue> create(PropertyID shorthand, Vector<PropertyID> sub_properties, Vector<ValueComparingNonnullRefPtr<CSSStyleValue const>> values)
|
||||
{
|
||||
return adopt_ref(*new ShorthandStyleValue(shorthand, move(sub_properties), move(values)));
|
||||
}
|
||||
virtual ~ShorthandStyleValue() override;
|
||||
|
||||
Vector<PropertyID> const& sub_properties() const { return m_properties.sub_properties; }
|
||||
Vector<ValueComparingNonnullRefPtr<CSSStyleValue const>> const& values() const { return m_properties.values; }
|
||||
|
||||
ValueComparingRefPtr<CSSStyleValue const> longhand(PropertyID) const;
|
||||
|
||||
virtual String to_string() const override;
|
||||
|
||||
bool properties_equal(ShorthandStyleValue const& other) const { return m_properties == other.m_properties; }
|
||||
|
||||
private:
|
||||
ShorthandStyleValue(PropertyID shorthand, Vector<PropertyID> sub_properties, Vector<ValueComparingNonnullRefPtr<CSSStyleValue const>> values);
|
||||
|
||||
struct Properties {
|
||||
PropertyID shorthand_property;
|
||||
Vector<PropertyID> sub_properties;
|
||||
Vector<ValueComparingNonnullRefPtr<CSSStyleValue const>> values;
|
||||
bool operator==(Properties const&) const = default;
|
||||
} m_properties;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue