mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +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
52
Libraries/LibWeb/CSS/StyleValues/MathDepthStyleValue.cpp
Normal file
52
Libraries/LibWeb/CSS/StyleValues/MathDepthStyleValue.cpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "MathDepthStyleValue.h"
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
ValueComparingNonnullRefPtr<MathDepthStyleValue> MathDepthStyleValue::create_auto_add()
|
||||
{
|
||||
return adopt_ref(*new (nothrow) MathDepthStyleValue(MathDepthType::AutoAdd));
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<MathDepthStyleValue> MathDepthStyleValue::create_add(ValueComparingNonnullRefPtr<CSSStyleValue const> integer_value)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) MathDepthStyleValue(MathDepthType::Add, move(integer_value)));
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<MathDepthStyleValue> MathDepthStyleValue::create_integer(ValueComparingNonnullRefPtr<CSSStyleValue const> integer_value)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) MathDepthStyleValue(MathDepthType::Integer, move(integer_value)));
|
||||
}
|
||||
|
||||
MathDepthStyleValue::MathDepthStyleValue(MathDepthType type, ValueComparingRefPtr<CSSStyleValue const> integer_value)
|
||||
: StyleValueWithDefaultOperators(Type::MathDepth)
|
||||
, m_type(type)
|
||||
, m_integer_value(move(integer_value))
|
||||
{
|
||||
}
|
||||
|
||||
bool MathDepthStyleValue::properties_equal(MathDepthStyleValue const& other) const
|
||||
{
|
||||
return m_type == other.m_type
|
||||
&& m_integer_value == other.m_integer_value;
|
||||
}
|
||||
|
||||
String MathDepthStyleValue::to_string() const
|
||||
{
|
||||
switch (m_type) {
|
||||
case MathDepthType::AutoAdd:
|
||||
return "auto-add"_string;
|
||||
case MathDepthType::Add:
|
||||
return MUST(String::formatted("add({})", m_integer_value->to_string()));
|
||||
case MathDepthType::Integer:
|
||||
return m_integer_value->to_string();
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue