Everywhere: Run clang-format
The following command was used to clang-format these files:
clang-format-21 -i $(find . \
-not \( -path "./\.*" -prune \) \
-not \( -path "./Build/*" -prune \) \
-not \( -path "./Toolchain/*" -prune \) \
-type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
This commit is contained in:
parent
415625d398
commit
ea32502947
34 changed files with 231 additions and 84 deletions
|
|
@ -595,9 +595,12 @@ struct StorageOperations {
|
|||
|
||||
template<bool restore_remainder = false>
|
||||
static constexpr void div_mod_internal(
|
||||
StorageSpan<WordType, false> dividend, StorageSpan<WordType, false> divisor,
|
||||
StorageSpan<WordType, false> quotient, StorageSpan<WordType, false> remainder,
|
||||
size_t dividend_len, size_t divisor_len)
|
||||
StorageSpan<WordType, false> dividend,
|
||||
StorageSpan<WordType, false> divisor,
|
||||
StorageSpan<WordType, false> quotient,
|
||||
StorageSpan<WordType, false> remainder,
|
||||
size_t dividend_len,
|
||||
size_t divisor_len)
|
||||
{
|
||||
// Knuth's algorithm D
|
||||
// D1. Normalize
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ struct Tuple {
|
|||
template<typename T>
|
||||
struct Tuple<T> {
|
||||
Tuple(T&& value)
|
||||
requires(!IsSame < T &&, T const& >)
|
||||
requires(!IsSame<T &&, T const&>)
|
||||
: value(forward<T>(value))
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
|
||||
namespace Media {
|
||||
|
||||
VideoFrame::VideoFrame(AK::Duration timestamp, AK::Duration duration,
|
||||
VideoFrame::VideoFrame(
|
||||
AK::Duration timestamp,
|
||||
AK::Duration duration,
|
||||
Gfx::Size<u32> size,
|
||||
u8 bit_depth, CodingIndependentCodePoints cicp,
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap> bitmap)
|
||||
|
|
|
|||
|
|
@ -18,9 +18,12 @@ namespace Media {
|
|||
class MEDIA_API VideoFrame final {
|
||||
|
||||
public:
|
||||
VideoFrame(AK::Duration timestamp, AK::Duration duration,
|
||||
VideoFrame(
|
||||
AK::Duration timestamp,
|
||||
AK::Duration duration,
|
||||
Gfx::Size<u32> size,
|
||||
u8 bit_depth, CodingIndependentCodePoints cicp,
|
||||
u8 bit_depth,
|
||||
CodingIndependentCodePoints cicp,
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap> bitmap);
|
||||
~VideoFrame();
|
||||
|
||||
|
|
|
|||
|
|
@ -166,10 +166,17 @@ static String process_hash_for_init(String const& value, PatternProcessType type
|
|||
}
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#process-a-urlpatterninit
|
||||
PatternErrorOr<Init> process_a_url_pattern_init(Init const& init, PatternProcessType type,
|
||||
Optional<String> const& protocol, Optional<String> const& username, Optional<String> const& password,
|
||||
Optional<String> const& hostname, Optional<String> const& port, Optional<String> const& pathname,
|
||||
Optional<String> const& search, Optional<String> const& hash)
|
||||
PatternErrorOr<Init> process_a_url_pattern_init(
|
||||
Init const& init,
|
||||
PatternProcessType type,
|
||||
Optional<String> const& protocol,
|
||||
Optional<String> const& username,
|
||||
Optional<String> const& password,
|
||||
Optional<String> const& hostname,
|
||||
Optional<String> const& port,
|
||||
Optional<String> const& pathname,
|
||||
Optional<String> const& search,
|
||||
Optional<String> const& hash)
|
||||
{
|
||||
// 1. Let result be the result of creating a new URLPatternInit.
|
||||
Init result;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,16 @@ enum class PatternProcessType {
|
|||
URL,
|
||||
};
|
||||
|
||||
PatternErrorOr<Init> process_a_url_pattern_init(Init const&, PatternProcessType type,
|
||||
Optional<String> const& protocol, Optional<String> const& username, Optional<String> const& password,
|
||||
Optional<String> const& hostname, Optional<String> const& port, Optional<String> const& pathname,
|
||||
Optional<String> const& search, Optional<String> const& hash);
|
||||
PatternErrorOr<Init> process_a_url_pattern_init(
|
||||
Init const&,
|
||||
PatternProcessType type,
|
||||
Optional<String> const& protocol,
|
||||
Optional<String> const& username,
|
||||
Optional<String> const& password,
|
||||
Optional<String> const& hostname,
|
||||
Optional<String> const& port,
|
||||
Optional<String> const& pathname,
|
||||
Optional<String> const& search,
|
||||
Optional<String> const& hash);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,8 +93,12 @@ bool PatternParser::is_a_duplicate_name(String const& name) const
|
|||
}
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#add-a-part
|
||||
PatternErrorOr<void> PatternParser::add_a_part(String const& prefix, Optional<Token const&> name_token,
|
||||
Optional<Token const&> regexp_or_wildcard_token, String const& suffix, Optional<Token const&> modifier_token)
|
||||
PatternErrorOr<void> PatternParser::add_a_part(
|
||||
String const& prefix,
|
||||
Optional<Token const&> name_token,
|
||||
Optional<Token const&> regexp_or_wildcard_token,
|
||||
String const& suffix,
|
||||
Optional<Token const&> modifier_token)
|
||||
{
|
||||
// 1. Let modifier be "none".
|
||||
auto modifier = Part::Modifier::None;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,12 @@ private:
|
|||
PatternErrorOr<void> consume_a_required_token(Token::Type);
|
||||
String consume_text();
|
||||
PatternErrorOr<void> maybe_add_a_part_from_the_pending_fixed_value();
|
||||
PatternErrorOr<void> add_a_part(String const& prefix, Optional<Token const&> name_token,
|
||||
Optional<Token const&> regexp_or_wildcard_token, String const& suffix, Optional<Token const&> modifier_token);
|
||||
PatternErrorOr<void> add_a_part(
|
||||
String const& prefix,
|
||||
Optional<Token const&> name_token,
|
||||
Optional<Token const&> regexp_or_wildcard_token,
|
||||
String const& suffix,
|
||||
Optional<Token const&> modifier_token);
|
||||
bool is_a_duplicate_name(String const&) const;
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#pattern-parser-token-list
|
||||
|
|
|
|||
|
|
@ -20,9 +20,17 @@ namespace Web::CSS {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(CSSTransition);
|
||||
|
||||
GC::Ref<CSSTransition> CSSTransition::start_a_transition(DOM::AbstractElement abstract_element, PropertyID property_id,
|
||||
size_t transition_generation, double delay, double start_time, double end_time, NonnullRefPtr<StyleValue const> start_value,
|
||||
NonnullRefPtr<StyleValue const> end_value, NonnullRefPtr<StyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor)
|
||||
GC::Ref<CSSTransition> CSSTransition::start_a_transition(
|
||||
DOM::AbstractElement abstract_element,
|
||||
PropertyID property_id,
|
||||
size_t transition_generation,
|
||||
double delay,
|
||||
double start_time,
|
||||
double end_time,
|
||||
NonnullRefPtr<StyleValue const> start_value,
|
||||
NonnullRefPtr<StyleValue const> end_value,
|
||||
NonnullRefPtr<StyleValue const> reversing_adjusted_start_value,
|
||||
double reversing_shortening_factor)
|
||||
{
|
||||
auto& realm = abstract_element.element().realm();
|
||||
return realm.create<CSSTransition>(realm, abstract_element, property_id, transition_generation, delay, start_time, end_time, start_value, end_value, reversing_adjusted_start_value, reversing_shortening_factor);
|
||||
|
|
@ -81,9 +89,18 @@ int CSSTransition::class_specific_composite_order(GC::Ref<Animations::Animation>
|
|||
return transition_property().compare(other->transition_property());
|
||||
}
|
||||
|
||||
CSSTransition::CSSTransition(JS::Realm& realm, DOM::AbstractElement abstract_element, PropertyID property_id, size_t transition_generation,
|
||||
double delay, double start_time, double end_time, NonnullRefPtr<StyleValue const> start_value, NonnullRefPtr<StyleValue const> end_value,
|
||||
NonnullRefPtr<StyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor)
|
||||
CSSTransition::CSSTransition(
|
||||
JS::Realm& realm,
|
||||
DOM::AbstractElement abstract_element,
|
||||
PropertyID property_id,
|
||||
size_t transition_generation,
|
||||
double delay,
|
||||
double start_time,
|
||||
double end_time,
|
||||
NonnullRefPtr<StyleValue const> start_value,
|
||||
NonnullRefPtr<StyleValue const> end_value,
|
||||
NonnullRefPtr<StyleValue const> reversing_adjusted_start_value,
|
||||
double reversing_shortening_factor)
|
||||
: Animations::Animation(realm)
|
||||
, m_transition_property(property_id)
|
||||
, m_transition_generation(transition_generation)
|
||||
|
|
|
|||
|
|
@ -19,9 +19,17 @@ class CSSTransition : public Animations::Animation {
|
|||
GC_DECLARE_ALLOCATOR(CSSTransition);
|
||||
|
||||
public:
|
||||
static GC::Ref<CSSTransition> start_a_transition(DOM::AbstractElement, PropertyID,
|
||||
size_t transition_generation, double delay, double start_time, double end_time, NonnullRefPtr<StyleValue const> start_value,
|
||||
NonnullRefPtr<StyleValue const> end_value, NonnullRefPtr<StyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor);
|
||||
static GC::Ref<CSSTransition> start_a_transition(
|
||||
DOM::AbstractElement,
|
||||
PropertyID,
|
||||
size_t transition_generation,
|
||||
double delay,
|
||||
double start_time,
|
||||
double end_time,
|
||||
NonnullRefPtr<StyleValue const> start_value,
|
||||
NonnullRefPtr<StyleValue const> end_value,
|
||||
NonnullRefPtr<StyleValue const> reversing_adjusted_start_value,
|
||||
double reversing_shortening_factor);
|
||||
|
||||
StringView transition_property() const;
|
||||
|
||||
|
|
@ -49,9 +57,18 @@ public:
|
|||
void set_previous_phase(Phase phase) { m_previous_phase = phase; }
|
||||
|
||||
private:
|
||||
CSSTransition(JS::Realm&, DOM::AbstractElement, PropertyID, size_t transition_generation,
|
||||
double delay, double start_time, double end_time, NonnullRefPtr<StyleValue const> start_value, NonnullRefPtr<StyleValue const> end_value,
|
||||
NonnullRefPtr<StyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor);
|
||||
CSSTransition(
|
||||
JS::Realm&,
|
||||
DOM::AbstractElement,
|
||||
PropertyID,
|
||||
size_t transition_generation,
|
||||
double delay,
|
||||
double start_time,
|
||||
double end_time,
|
||||
NonnullRefPtr<StyleValue const> start_value,
|
||||
NonnullRefPtr<StyleValue const> end_value,
|
||||
NonnullRefPtr<StyleValue const> reversing_adjusted_start_value,
|
||||
double reversing_shortening_factor);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ namespace Web::CSS {
|
|||
|
||||
// https://drafts.csswg.org/css-images/#default-sizing
|
||||
CSSPixelSize run_default_sizing_algorithm(
|
||||
Optional<CSSPixels> specified_width, Optional<CSSPixels> specified_height,
|
||||
Optional<CSSPixels> specified_width,
|
||||
Optional<CSSPixels> specified_height,
|
||||
SizeWithAspectRatio const& natural,
|
||||
CSSPixelSize default_size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ struct SizeWithAspectRatio {
|
|||
|
||||
// https://drafts.csswg.org/css-images/#default-sizing
|
||||
CSSPixelSize run_default_sizing_algorithm(
|
||||
Optional<CSSPixels> specified_width, Optional<CSSPixels> specified_height,
|
||||
Optional<CSSPixels> specified_width,
|
||||
Optional<CSSPixels> specified_height,
|
||||
SizeWithAspectRatio const& natural_size,
|
||||
CSSPixelSize default_size);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ ValueComparingNonnullRefPtr<AnchorSizeStyleValue const> AnchorSizeStyleValue::cr
|
|||
return adopt_ref(*new (nothrow) AnchorSizeStyleValue(anchor_name, anchor_size, fallback_value));
|
||||
}
|
||||
|
||||
AnchorSizeStyleValue::AnchorSizeStyleValue(Optional<FlyString> const& anchor_name, Optional<AnchorSize> const& anchor_size,
|
||||
AnchorSizeStyleValue::AnchorSizeStyleValue(
|
||||
Optional<FlyString> const& anchor_name,
|
||||
Optional<AnchorSize> const& anchor_size,
|
||||
ValueComparingRefPtr<StyleValue const> const& fallback_value)
|
||||
: StyleValueWithDefaultOperators(Type::AnchorSize)
|
||||
, m_properties { .anchor_name = anchor_name, .anchor_size = anchor_size, .fallback_value = fallback_value }
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
AnchorSizeStyleValue(Optional<FlyString> const& anchor_name, Optional<AnchorSize> const& anchor_size,
|
||||
AnchorSizeStyleValue(
|
||||
Optional<FlyString> const& anchor_name,
|
||||
Optional<AnchorSize> const& anchor_size,
|
||||
ValueComparingRefPtr<StyleValue const> const& fallback_value);
|
||||
|
||||
struct Properties {
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ GC::Ptr<DOM::Node> block_node_of_node(GC::Ref<DOM::Node>);
|
|||
Utf16String canonical_space_sequence(size_t length, bool non_breaking_start, bool non_breaking_end);
|
||||
void canonicalize_whitespace(DOM::BoundaryPoint, bool fix_collapsed_space = true);
|
||||
Vector<GC::Ref<DOM::Node>> clear_the_value(FlyString const&, GC::Ref<DOM::Element>);
|
||||
void delete_the_selection(Selection&, bool block_merging = true, bool strip_wrappers = true,
|
||||
Selection::Direction direction = Selection::Direction::Forwards);
|
||||
void delete_the_selection(Selection&, bool block_merging = true, bool strip_wrappers = true, Selection::Direction = Selection::Direction::Forwards);
|
||||
Optional<Utf16String> effective_command_value(GC::Ptr<DOM::Node>, FlyString const& command);
|
||||
DOM::BoundaryPoint first_equivalent_point(DOM::BoundaryPoint);
|
||||
void fix_disallowed_ancestors_of_node(GC::Ref<DOM::Node>);
|
||||
|
|
|
|||
|
|
@ -15,8 +15,14 @@ namespace Web::EventTiming {
|
|||
GC_DEFINE_ALLOCATOR(PerformanceEventTiming);
|
||||
|
||||
// https://www.w3.org/TR/event-timing/#sec-init-event-timing
|
||||
PerformanceEventTiming::PerformanceEventTiming(JS::Realm& realm, String const& name, HighResolutionTime::DOMHighResTimeStamp start_time, HighResolutionTime::DOMHighResTimeStamp duration,
|
||||
DOM::Event const& event, HighResolutionTime::DOMHighResTimeStamp processing_start, unsigned long long interaction_id)
|
||||
PerformanceEventTiming::PerformanceEventTiming(
|
||||
JS::Realm& realm,
|
||||
String const& name,
|
||||
HighResolutionTime::DOMHighResTimeStamp start_time,
|
||||
HighResolutionTime::DOMHighResTimeStamp duration,
|
||||
DOM::Event const& event,
|
||||
HighResolutionTime::DOMHighResTimeStamp processing_start,
|
||||
unsigned long long interaction_id)
|
||||
: PerformanceTimeline::PerformanceEntry(realm, name, start_time, duration)
|
||||
, m_entry_type(PerformanceTimeline::EntryTypes::event)
|
||||
, m_start_time(event.time_stamp())
|
||||
|
|
|
|||
|
|
@ -37,8 +37,14 @@ public:
|
|||
virtual FlyString const& entry_type() const override;
|
||||
|
||||
private:
|
||||
PerformanceEventTiming(JS::Realm& realm, String const& name, HighResolutionTime::DOMHighResTimeStamp start_time, HighResolutionTime::DOMHighResTimeStamp duration,
|
||||
DOM::Event const& event, HighResolutionTime::DOMHighResTimeStamp processing_start, unsigned long long interaction_id);
|
||||
PerformanceEventTiming(
|
||||
JS::Realm&,
|
||||
String const& name,
|
||||
HighResolutionTime::DOMHighResTimeStamp start_time,
|
||||
HighResolutionTime::DOMHighResTimeStamp duration,
|
||||
DOM::Event const& event,
|
||||
HighResolutionTime::DOMHighResTimeStamp processing_start,
|
||||
unsigned long long interaction_id);
|
||||
|
||||
// m_entry_type defined here for both "event"s and "first-input"s
|
||||
// this is the only PerformanceEntry that has two event types it could represent
|
||||
|
|
|
|||
|
|
@ -28,9 +28,15 @@ GC::Ref<StorageEvent> StorageEvent::construct_impl(JS::Realm& realm, FlyString c
|
|||
StorageEvent::~StorageEvent() = default;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webstorage.html#dom-storageevent-initstorageevent
|
||||
void StorageEvent::init_storage_event(String const& type, bool bubbles, bool cancelable,
|
||||
Optional<String> const& key, Optional<String> const& old_value, Optional<String> const& new_value,
|
||||
String const& url, GC::Ptr<Storage> storage_area)
|
||||
void StorageEvent::init_storage_event(
|
||||
String const& type,
|
||||
bool bubbles,
|
||||
bool cancelable,
|
||||
Optional<String> const& key,
|
||||
Optional<String> const& old_value,
|
||||
Optional<String> const& new_value,
|
||||
String const& url,
|
||||
GC::Ptr<Storage> storage_area)
|
||||
{
|
||||
// The initStorageEvent(type, bubbles, cancelable, key, oldValue, newValue, url, storageArea) method must initialize
|
||||
// the event in a manner analogous to the similarly-named initEvent() method. [DOM]
|
||||
|
|
|
|||
|
|
@ -39,9 +39,14 @@ public:
|
|||
String const& url() const { return m_url; }
|
||||
GC::Ptr<Storage const> storage_area() const { return m_storage_area; }
|
||||
|
||||
void init_storage_event(String const& type, bool bubbles = false, bool cancelable = false,
|
||||
Optional<String> const& key = {}, Optional<String> const& old_value = {}, Optional<String> const& new_value = {},
|
||||
String const& url = {}, GC::Ptr<Storage> storage_area = {});
|
||||
void init_storage_event(String const& type,
|
||||
bool bubbles = false,
|
||||
bool cancelable = false,
|
||||
Optional<String> const& key = {},
|
||||
Optional<String> const& old_value = {},
|
||||
Optional<String> const& new_value = {},
|
||||
String const& url = {},
|
||||
GC::Ptr<Storage> storage_area = {});
|
||||
|
||||
protected:
|
||||
virtual void visit_edges(Visitor& visitor) override;
|
||||
|
|
|
|||
|
|
@ -15,16 +15,25 @@ namespace Web::SVG {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(SVGAnimatedInteger);
|
||||
|
||||
GC::Ref<SVGAnimatedInteger> SVGAnimatedInteger::create(JS::Realm& realm, GC::Ref<SVGElement> element,
|
||||
DOM::QualifiedName reflected_attribute, WebIDL::Long initial_value, SupportsSecondValue supports_second_value,
|
||||
GC::Ref<SVGAnimatedInteger> SVGAnimatedInteger::create(
|
||||
JS::Realm& realm,
|
||||
GC::Ref<SVGElement> element,
|
||||
DOM::QualifiedName reflected_attribute,
|
||||
WebIDL::Long initial_value,
|
||||
SupportsSecondValue supports_second_value,
|
||||
ValueRepresented value_represented)
|
||||
{
|
||||
return realm.create<SVGAnimatedInteger>(realm, element, move(reflected_attribute), initial_value,
|
||||
supports_second_value, value_represented);
|
||||
}
|
||||
|
||||
SVGAnimatedInteger::SVGAnimatedInteger(JS::Realm& realm, GC::Ref<SVGElement> element, DOM::QualifiedName reflected_attribute,
|
||||
WebIDL::Long initial_value, SupportsSecondValue supports_second_value, ValueRepresented value_represented)
|
||||
SVGAnimatedInteger::SVGAnimatedInteger(
|
||||
JS::Realm& realm,
|
||||
GC::Ref<SVGElement> element,
|
||||
DOM::QualifiedName reflected_attribute,
|
||||
WebIDL::Long initial_value,
|
||||
SupportsSecondValue supports_second_value,
|
||||
ValueRepresented value_represented)
|
||||
: PlatformObject(realm)
|
||||
, m_element(element)
|
||||
, m_reflected_attribute(move(reflected_attribute))
|
||||
|
|
|
|||
|
|
@ -28,8 +28,12 @@ public:
|
|||
Second,
|
||||
};
|
||||
|
||||
[[nodiscard]] static GC::Ref<SVGAnimatedInteger> create(JS::Realm&, GC::Ref<SVGElement>,
|
||||
DOM::QualifiedName reflected_attribute, WebIDL::Long initial_value, SupportsSecondValue = SupportsSecondValue::No,
|
||||
[[nodiscard]] static GC::Ref<SVGAnimatedInteger> create(
|
||||
JS::Realm&,
|
||||
GC::Ref<SVGElement>,
|
||||
DOM::QualifiedName reflected_attribute,
|
||||
WebIDL::Long initial_value,
|
||||
SupportsSecondValue = SupportsSecondValue::No,
|
||||
ValueRepresented = ValueRepresented::First);
|
||||
virtual ~SVGAnimatedInteger() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,16 +14,25 @@ namespace Web::SVG {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(SVGAnimatedNumber);
|
||||
|
||||
GC::Ref<SVGAnimatedNumber> SVGAnimatedNumber::create(JS::Realm& realm, GC::Ref<SVGElement> element,
|
||||
DOM::QualifiedName reflected_attribute, float initial_value, SupportsSecondValue supports_second_value,
|
||||
GC::Ref<SVGAnimatedNumber> SVGAnimatedNumber::create(
|
||||
JS::Realm& realm,
|
||||
GC::Ref<SVGElement> element,
|
||||
DOM::QualifiedName reflected_attribute,
|
||||
float initial_value,
|
||||
SupportsSecondValue supports_second_value,
|
||||
ValueRepresented value_represented)
|
||||
{
|
||||
return realm.create<SVGAnimatedNumber>(realm, element, move(reflected_attribute), initial_value,
|
||||
supports_second_value, value_represented);
|
||||
}
|
||||
|
||||
SVGAnimatedNumber::SVGAnimatedNumber(JS::Realm& realm, GC::Ref<SVGElement> element, DOM::QualifiedName reflected_attribute,
|
||||
float initial_value, SupportsSecondValue supports_second_value, ValueRepresented value_represented)
|
||||
SVGAnimatedNumber::SVGAnimatedNumber(
|
||||
JS::Realm& realm,
|
||||
GC::Ref<SVGElement> element,
|
||||
DOM::QualifiedName reflected_attribute,
|
||||
float initial_value,
|
||||
SupportsSecondValue supports_second_value,
|
||||
ValueRepresented value_represented)
|
||||
: PlatformObject(realm)
|
||||
, m_element(element)
|
||||
, m_reflected_attribute(move(reflected_attribute))
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ public:
|
|||
Second,
|
||||
};
|
||||
|
||||
[[nodiscard]] static GC::Ref<SVGAnimatedNumber> create(JS::Realm&, GC::Ref<SVGElement>,
|
||||
DOM::QualifiedName reflected_attribute, float initial_value, SupportsSecondValue = SupportsSecondValue::No,
|
||||
[[nodiscard]] static GC::Ref<SVGAnimatedNumber> create(
|
||||
JS::Realm&,
|
||||
GC::Ref<SVGElement>,
|
||||
DOM::QualifiedName reflected_attribute,
|
||||
float initial_value,
|
||||
SupportsSecondValue = SupportsSecondValue::No,
|
||||
ValueRepresented = ValueRepresented::First);
|
||||
virtual ~SVGAnimatedNumber() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ struct TextPositioning {
|
|||
Vector<Position> dy;
|
||||
Vector<float> rotate;
|
||||
|
||||
void apply_to_text_position(Layout::Node const& node, CSSPixelSize viewport, Gfx::FloatPoint& current_text_position,
|
||||
size_t character_index) const
|
||||
void apply_to_text_position(Layout::Node const& node, CSSPixelSize viewport, Gfx::FloatPoint& current_text_position, size_t character_index) const
|
||||
{
|
||||
auto value_for_character = [&](Vector<Position> const& values) -> float {
|
||||
if (values.is_empty())
|
||||
|
|
|
|||
|
|
@ -65,8 +65,16 @@ protected:
|
|||
virtual void visit_edges(Cell::Visitor& visitor) override;
|
||||
|
||||
private:
|
||||
PullIntoDescriptor(GC::Ref<JS::ArrayBuffer> buffer, u64 buffer_byte_length, u64 byte_offset, u64 byte_length, u64 bytes_filled,
|
||||
u64 minimum_fill, u64 element_size, GC::Ref<JS::NativeFunction> view_constructor, ReaderType reader_type)
|
||||
PullIntoDescriptor(
|
||||
GC::Ref<JS::ArrayBuffer> buffer,
|
||||
u64 buffer_byte_length,
|
||||
u64 byte_offset,
|
||||
u64 byte_length,
|
||||
u64 bytes_filled,
|
||||
u64 minimum_fill,
|
||||
u64 element_size,
|
||||
GC::Ref<JS::NativeFunction> view_constructor,
|
||||
ReaderType reader_type)
|
||||
: buffer(buffer)
|
||||
, buffer_byte_length(buffer_byte_length)
|
||||
, byte_offset(byte_offset)
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@ WebIDL::ExceptionOr<GC::Ref<PeriodicWave>> BaseAudioContext::create_periodic_wav
|
|||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createscriptprocessor
|
||||
WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> BaseAudioContext::create_script_processor(
|
||||
WebIDL::UnsignedLong buffer_size, WebIDL::UnsignedLong number_of_input_channels,
|
||||
WebIDL::UnsignedLong buffer_size,
|
||||
WebIDL::UnsignedLong number_of_input_channels,
|
||||
WebIDL::UnsignedLong number_of_output_channels)
|
||||
{
|
||||
// The bufferSize parameter determines the buffer size in units of sample-frames. If it’s not passed in, or if the
|
||||
|
|
|
|||
|
|
@ -82,8 +82,10 @@ public:
|
|||
WebIDL::ExceptionOr<GC::Ref<GainNode>> create_gain();
|
||||
WebIDL::ExceptionOr<GC::Ref<PannerNode>> create_panner();
|
||||
WebIDL::ExceptionOr<GC::Ref<PeriodicWave>> create_periodic_wave(Vector<float> const& real, Vector<float> const& imag, Optional<PeriodicWaveConstraints> const& constraints = {});
|
||||
WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> create_script_processor(WebIDL::UnsignedLong buffer_size,
|
||||
WebIDL::UnsignedLong number_of_input_channels, WebIDL::UnsignedLong number_of_output_channels);
|
||||
WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> create_script_processor(
|
||||
WebIDL::UnsignedLong buffer_size,
|
||||
WebIDL::UnsignedLong number_of_input_channels,
|
||||
WebIDL::UnsignedLong number_of_output_channels);
|
||||
WebIDL::ExceptionOr<GC::Ref<StereoPannerNode>> create_stereo_panner();
|
||||
|
||||
GC::Ref<WebIDL::Promise> decode_audio_data(GC::Root<WebIDL::BufferSource>, GC::Ptr<WebIDL::CallbackType>, GC::Ptr<WebIDL::CallbackType>);
|
||||
|
|
|
|||
|
|
@ -54,8 +54,11 @@ WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> OfflineAudioContext::construct
|
|||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-offlineaudiocontext-numberofchannels-length-samplerate
|
||||
WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> OfflineAudioContext::construct_impl(JS::Realm& realm,
|
||||
WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate)
|
||||
WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> OfflineAudioContext::construct_impl(
|
||||
JS::Realm& realm,
|
||||
WebIDL::UnsignedLong number_of_channels,
|
||||
WebIDL::UnsignedLong length,
|
||||
float sample_rate)
|
||||
{
|
||||
return construct_impl(realm, { number_of_channels, length, sample_rate });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,11 @@ class OfflineAudioContext final : public BaseAudioContext {
|
|||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> construct_impl(JS::Realm&, OfflineAudioContextOptions const&);
|
||||
static WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> construct_impl(JS::Realm&,
|
||||
WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate);
|
||||
static WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> construct_impl(
|
||||
JS::Realm&,
|
||||
WebIDL::UnsignedLong number_of_channels,
|
||||
WebIDL::UnsignedLong length,
|
||||
float sample_rate);
|
||||
|
||||
virtual ~OfflineAudioContext() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,11 @@ ScriptProcessorNode::ScriptProcessorNode(JS::Realm& realm, GC::Ref<BaseAudioCont
|
|||
|
||||
ScriptProcessorNode::~ScriptProcessorNode() = default;
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> ScriptProcessorNode::create(JS::Realm& realm,
|
||||
GC::Ref<BaseAudioContext> context, WebIDL::Long buffer_size, WebIDL::UnsignedLong number_of_input_channels,
|
||||
WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> ScriptProcessorNode::create(
|
||||
JS::Realm& realm,
|
||||
GC::Ref<BaseAudioContext> context,
|
||||
WebIDL::Long buffer_size,
|
||||
WebIDL::UnsignedLong number_of_input_channels,
|
||||
WebIDL::UnsignedLong number_of_output_channels)
|
||||
{
|
||||
// https://webaudio.github.io/web-audio-api/#ScriptProcessorNode
|
||||
|
|
|
|||
|
|
@ -20,8 +20,11 @@ public:
|
|||
|
||||
virtual ~ScriptProcessorNode() override;
|
||||
|
||||
static WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> create(JS::Realm&, GC::Ref<BaseAudioContext>,
|
||||
WebIDL::Long buffer_size, WebIDL::UnsignedLong number_of_input_channels,
|
||||
static WebIDL::ExceptionOr<GC::Ref<ScriptProcessorNode>> create(
|
||||
JS::Realm&,
|
||||
GC::Ref<BaseAudioContext>,
|
||||
WebIDL::Long buffer_size,
|
||||
WebIDL::UnsignedLong number_of_input_channels,
|
||||
WebIDL::UnsignedLong number_of_output_channel);
|
||||
|
||||
// ^AudioNode
|
||||
|
|
@ -38,8 +41,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> set_buffer_size(WebIDL::Long buffer_size);
|
||||
|
||||
private:
|
||||
ScriptProcessorNode(JS::Realm&, GC::Ref<BaseAudioContext>, u8 number_of_input_channels,
|
||||
u8 number_of_output_channels);
|
||||
ScriptProcessorNode(JS::Realm&, GC::Ref<BaseAudioContext>, u8 number_of_input_channels, u8 number_of_output_channels);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,13 @@
|
|||
namespace TestWeb {
|
||||
|
||||
// https://web-platform-tests.org/writing-tests/reftests.html#fuzzy-matching
|
||||
bool fuzzy_screenshot_match(URL::URL const& test_url, URL::URL const& reference, Gfx::Bitmap const& bitmap_a,
|
||||
Gfx::Bitmap const& bitmap_b, ReadonlySpan<FuzzyMatch> fuzzy_matches, bool should_match)
|
||||
bool fuzzy_screenshot_match(
|
||||
URL::URL const& test_url,
|
||||
URL::URL const& reference,
|
||||
Gfx::Bitmap const& bitmap_a,
|
||||
Gfx::Bitmap const& bitmap_b,
|
||||
ReadonlySpan<FuzzyMatch> fuzzy_matches,
|
||||
bool should_match)
|
||||
{
|
||||
if (bitmap_a.width() != bitmap_b.width() || bitmap_a.height() != bitmap_b.height())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,13 @@ struct FuzzyMatch {
|
|||
FuzzyRange pixel_error_count;
|
||||
};
|
||||
|
||||
bool fuzzy_screenshot_match(URL::URL const& test_url, URL::URL const& reference, Gfx::Bitmap const&,
|
||||
Gfx::Bitmap const&, ReadonlySpan<FuzzyMatch>, bool should_match);
|
||||
bool fuzzy_screenshot_match(
|
||||
URL::URL const& test_url,
|
||||
URL::URL const& reference,
|
||||
Gfx::Bitmap const&,
|
||||
Gfx::Bitmap const&,
|
||||
ReadonlySpan<FuzzyMatch>,
|
||||
bool should_match);
|
||||
ErrorOr<FuzzyMatch> parse_fuzzy_match(Optional<URL::URL const&> reference, String const&);
|
||||
ErrorOr<FuzzyRange> parse_fuzzy_range(String const&);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,9 @@ public:
|
|||
|
||||
static TVGIconEngine* from_file(QString const& path);
|
||||
|
||||
void paint(QPainter* painter, QRect const& rect, QIcon::Mode mode,
|
||||
QIcon::State state) override;
|
||||
void paint(QPainter* painter, QRect const& rect, QIcon::Mode mode, QIcon::State state) override;
|
||||
QIconEngine* clone() const override;
|
||||
QPixmap pixmap(QSize const& size, QIcon::Mode mode,
|
||||
QIcon::State state) override;
|
||||
QPixmap pixmap(QSize const& size, QIcon::Mode mode, QIcon::State state) override;
|
||||
|
||||
void add_filter(QIcon::Mode mode, Function<Color(Color)> filter);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue