mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb: Run clang-format
We mistakenly did not add the clang-format linter to the new repo's CI, and some unformatted code made its way into the repo.
This commit is contained in:
@@ -40,12 +40,14 @@ EasingStyleValue::CubicBezier EasingStyleValue::CubicBezier::ease_in_out()
|
|||||||
return bezier;
|
return bezier;
|
||||||
}
|
}
|
||||||
|
|
||||||
EasingStyleValue::Steps EasingStyleValue::Steps::step_start() {
|
EasingStyleValue::Steps EasingStyleValue::Steps::step_start()
|
||||||
|
{
|
||||||
static Steps steps { 1, Steps::Position::Start };
|
static Steps steps { 1, Steps::Position::Start };
|
||||||
return steps;
|
return steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
EasingStyleValue::Steps EasingStyleValue::Steps::step_end() {
|
EasingStyleValue::Steps EasingStyleValue::Steps::step_end()
|
||||||
|
{
|
||||||
static Steps steps { 1, Steps::Position::End };
|
static Steps steps { 1, Steps::Position::End };
|
||||||
return steps;
|
return steps;
|
||||||
}
|
}
|
||||||
@@ -57,8 +59,7 @@ bool EasingStyleValue::CubicBezier::operator==(Web::CSS::EasingStyleValue::Cubic
|
|||||||
|
|
||||||
double EasingStyleValue::Function::evaluate_at(double input_progress, bool before_flag) const
|
double EasingStyleValue::Function::evaluate_at(double input_progress, bool before_flag) const
|
||||||
{
|
{
|
||||||
constexpr static auto cubic_bezier_at = [](double x1, double x2, double t)
|
constexpr static auto cubic_bezier_at = [](double x1, double x2, double t) {
|
||||||
{
|
|
||||||
auto a = 1.0 - 3.0 * x2 + 3.0 * x1;
|
auto a = 1.0 - 3.0 * x2 + 3.0 * x1;
|
||||||
auto b = 3.0 * x2 - 6.0 * x1;
|
auto b = 3.0 * x2 - 6.0 * x1;
|
||||||
auto c = 3.0 * x1;
|
auto c = 3.0 * x1;
|
||||||
|
|||||||
@@ -70,8 +70,7 @@ public:
|
|||||||
bool operator==(Steps const&) const = default;
|
bool operator==(Steps const&) const = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Function : public Variant<Linear, CubicBezier, Steps>
|
struct Function : public Variant<Linear, CubicBezier, Steps> {
|
||||||
{
|
|
||||||
using Variant::Variant;
|
using Variant::Variant;
|
||||||
|
|
||||||
double evaluate_at(double input_progress, bool before_flag) const;
|
double evaluate_at(double input_progress, bool before_flag) const;
|
||||||
|
|||||||
@@ -95,15 +95,16 @@ String HTMLLinkElement::as() const
|
|||||||
{
|
{
|
||||||
String attribute_value = get_attribute_value(HTML::AttributeNames::as);
|
String attribute_value = get_attribute_value(HTML::AttributeNames::as);
|
||||||
|
|
||||||
if (attribute_value.equals_ignoring_ascii_case("fetch"sv) ||
|
if (attribute_value.equals_ignoring_ascii_case("fetch"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("image"sv) ||
|
|| attribute_value.equals_ignoring_ascii_case("image"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("script"sv) ||
|
|| attribute_value.equals_ignoring_ascii_case("script"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("style"sv) ||
|
|| attribute_value.equals_ignoring_ascii_case("style"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("video"sv) ||
|
|| attribute_value.equals_ignoring_ascii_case("video"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("audio"sv) ||
|
|| attribute_value.equals_ignoring_ascii_case("audio"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("track"sv) ||
|
|| attribute_value.equals_ignoring_ascii_case("track"sv)
|
||||||
attribute_value.equals_ignoring_ascii_case("font"sv))
|
|| attribute_value.equals_ignoring_ascii_case("font"sv)) {
|
||||||
return attribute_value.to_lowercase().release_value();
|
return attribute_value.to_lowercase().release_value();
|
||||||
|
}
|
||||||
|
|
||||||
return String {};
|
return String {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <LibWeb/Bindings/Intrinsics.h>
|
#include <LibWeb/Bindings/Intrinsics.h>
|
||||||
#include <LibWeb/HTML/ValidityState.h>
|
|
||||||
#include <LibWeb/Bindings/ValidityStatePrototype.h>
|
#include <LibWeb/Bindings/ValidityStatePrototype.h>
|
||||||
|
#include <LibWeb/HTML/ValidityState.h>
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|||||||
@@ -2889,7 +2889,6 @@ bool readable_byte_stream_controller_should_call_pull(ReadableByteStreamControll
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// NON-STANDARD: Can be used instead of CreateReadableStream in cases where we need to set up a newly allocated
|
// NON-STANDARD: Can be used instead of CreateReadableStream in cases where we need to set up a newly allocated
|
||||||
// ReadableStream before initialization of said ReadableStream, i.e. ReadableStream is captured by lambdas in an uninitialized state.
|
// ReadableStream before initialization of said ReadableStream, i.e. ReadableStream is captured by lambdas in an uninitialized state.
|
||||||
// Spec steps are taken from: https://streams.spec.whatwg.org/#create-readable-stream
|
// Spec steps are taken from: https://streams.spec.whatwg.org/#create-readable-stream
|
||||||
|
|||||||
Reference in New Issue
Block a user