mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +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
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "CounterDefinitionsStyleValue.h"
|
||||
#include <LibWeb/CSS/Serialize.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
String CounterDefinitionsStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder stb;
|
||||
|
||||
for (auto const& counter_definition : m_counter_definitions) {
|
||||
if (!stb.is_empty())
|
||||
stb.append(' ');
|
||||
|
||||
if (counter_definition.is_reversed)
|
||||
stb.appendff("reversed({})", counter_definition.name);
|
||||
else
|
||||
stb.append(counter_definition.name);
|
||||
|
||||
if (counter_definition.value)
|
||||
stb.appendff(" {}", counter_definition.value->to_string());
|
||||
}
|
||||
|
||||
return stb.to_string_without_validation();
|
||||
}
|
||||
|
||||
bool CounterDefinitionsStyleValue::properties_equal(CounterDefinitionsStyleValue const& other) const
|
||||
{
|
||||
if (m_counter_definitions.size() != other.counter_definitions().size())
|
||||
return false;
|
||||
|
||||
for (auto i = 0u; i < m_counter_definitions.size(); i++) {
|
||||
auto const& ours = m_counter_definitions[i];
|
||||
auto const& theirs = other.counter_definitions()[i];
|
||||
if (ours.name != theirs.name || ours.is_reversed != theirs.is_reversed || ours.value != theirs.value)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue