Fix: Correct obvious and common typos

This commit is contained in:
matan-h 2024-12-16 17:21:41 +02:00
parent 2174e5dfcc
commit 1a6a1464d1
66 changed files with 126 additions and 126 deletions

View file

@ -40,7 +40,7 @@ ErrorOr<ByteString> JsonParser::consume_and_unescape_string()
for (;;) {
// OPTIMIZATION: We try to append as many literal characters as possible at a time
// This also pre-checks some error conditions
// Note: All utf8 characters are either plain ascii, or have their most signifiant bit set,
// Note: All utf8 characters are either plain ascii, or have their most significant bit set,
// which puts the, above plain ascii in value, so they will always consist
// of a set of "legal" non-special bytes,
// hence we don't need to bother with a code-point iterator,

View file

@ -37,7 +37,7 @@ ALWAYS_INLINE constexpr void sipround(u64& v0, u64& v1, u64& v2, u64& v3)
}
// Can handle u64 or u128 output as per reference implementation.
// We currenly only use u64 and further fold it to u32 (unsigned) for use in Traits.
// We currently only use u64 and further fold it to u32 (unsigned) for use in Traits.
template<size_t message_block_rounds, size_t finalization_rounds>
static void do_siphash(ReadonlyBytes input, u128 key, Bytes output)
{

View file

@ -518,8 +518,8 @@ ByteString invert_case(StringView str)
return builder.to_byte_string();
}
// Finishes the replacing algorithm once it is known that ita least one
// replacemnet is going to be done. Otherwise the caller may want to follow a
// Finishes the replacing algorithm once it is known that at least one
// replacement is going to be done. Otherwise the caller may want to follow a
// different route to construct its output.
static StringBuilder replace_into_builder(StringView str, StringView needle, StringView replacement, ReplaceMode replace_mode, size_t first_replacement_position)
{

View file

@ -50,8 +50,8 @@ StringView::StringView(ByteBuffer const& buffer)
Vector<StringView> StringView::split_view(char const separator, SplitBehavior split_behavior) const
{
StringView seperator_view { &separator, 1 };
return split_view(seperator_view, split_behavior);
StringView separator_view { &separator, 1 };
return split_view(separator_view, split_behavior);
}
Vector<StringView> StringView::split_view(StringView separator, SplitBehavior split_behavior) const

View file

@ -162,8 +162,8 @@ public:
template<typename Callback>
auto for_each_split_view(char separator, SplitBehavior split_behavior, Callback callback) const
{
StringView seperator_view { &separator, 1 };
return for_each_split_view(seperator_view, split_behavior, callback);
StringView separator_view { &separator, 1 };
return for_each_split_view(separator_view, split_behavior, callback);
}
template<typename Callback>

View file

@ -9,7 +9,7 @@
#if __has_include(<swift/bridging>)
# include <swift/bridging>
// FIXME: Workaround for Xcode 14/15. When swif becomes required, we should bump the
// required Xcode verison to one that supports all the features we are using.
// required Xcode version to one that supports all the features we are using.
# ifndef SWIFT_UNCHECKED_SENDABLE
# define SWIFT_UNCHECKED_SENDABLE
# define SWIFT_NONCOPYABLE

View file

@ -100,7 +100,7 @@
</div>
@COMPUTED_STYLE@
@RESOVLED_STYLE@
@RESOLVED_STYLE@
@CUSTOM_PROPERTIES@
<div id="fonts" class="tab-content">

View file

@ -22,7 +22,7 @@ require('lspconfig').clangd.setup {
-- you can delete this line.
-- on_attach = ...,
-- This is where you'd put capabilities (i.e. if you're useing nvim-cmp)
-- This is where you'd put capabilities (i.e. if you're using nvim-cmp)
-- capabilities = ...,
-- If you have another clangd installation, put it here. Note that we use

View file

@ -427,7 +427,7 @@ try_select_again:
if (error_or_marked_fd_count.value() != 0) {
// Handle file system notifiers by making them normal events.
for (size_t i = 1; i < thread_data.poll_fds.size(); ++i) {
// FIXME: Make the check work under Android, pehaps use ALooper
// FIXME: Make the check work under Android, perhaps use ALooper
#ifdef AK_OS_ANDROID
auto& notifier = *thread_data.notifier_by_index[i];
ThreadEventQueue::current().post_event(notifier, make<NotifierActivationEvent>(notifier.fd(), notifier.type()));

View file

@ -103,7 +103,7 @@ int File::open_mode_to_options(OpenMode mode)
}
// Some open modes, like `ReadWrite` imply the ability to create the file if it doesn't exist.
// Certain applications may not want this privledge, and for compability reasons, this is
// Certain applications may not want this privilege, and for compatibility reasons, this is
// the easiest way to add this option.
if (has_flag(mode, OpenMode::DontCreate))
flags &= ~O_CREAT;

View file

@ -150,7 +150,7 @@ ErrorOr<Vector<Hunk>> Parser::parse_hunks()
return Error::from_string_literal("Malformed empty content line in patch");
if (line[0] != ' ' && line[0] != '+' && line[0] != '-')
return Error::from_string_literal("Invaid operation in patch");
return Error::from_string_literal("Invalid operation in patch");
auto const operation = Line::operation_from_symbol(line[0]);

View file

@ -487,7 +487,7 @@ private:
// - With a BigEndian stream and an EarlyChange of 1, this is used in the PDF format
// The fun begins when they decided to change from the former to the latter when moving
// from TIFF 5.0 to 6.0, and without including a way for files to be identified.
// Fortunately, as the first byte of a LZW stream is a constant we can guess the endianess
// Fortunately, as the first byte of a LZW stream is a constant we can guess the endianness
// and deduce the version from it. The first code is 0x100 (9-bits).
if (encoded_bytes[0] == 0x00)
decoded_bytes = TRY(Compress::LzwDecompressor<LittleEndianInputBitStream>::decompress_all(encoded_bytes, 8, 0));

View file

@ -896,14 +896,14 @@ static Optional<ByteString> expression_identifier(Expression const& expression)
auto const& member_expression = static_cast<MemberExpression const&>(expression);
StringBuilder builder;
if (auto identifer = expression_identifier(member_expression.object()); identifer.has_value())
builder.append(*identifer);
if (auto identifier = expression_identifier(member_expression.object()); identifier.has_value())
builder.append(*identifier);
if (auto identifer = expression_identifier(member_expression.property()); identifer.has_value()) {
if (auto identifier = expression_identifier(member_expression.property()); identifier.has_value()) {
if (member_expression.is_computed())
builder.appendff("[{}]", *identifer);
builder.appendff("[{}]", *identifier);
else
builder.appendff(".{}", *identifer);
builder.appendff(".{}", *identifier);
}
return builder.to_byte_string();
@ -914,8 +914,8 @@ static Optional<ByteString> expression_identifier(Expression const& expression)
Optional<IdentifierTableIndex> Generator::intern_identifier_for_expression(Expression const& expression)
{
if (auto identifer = expression_identifier(expression); identifer.has_value())
return intern_identifier(identifer.release_value());
if (auto identifier = expression_identifier(expression); identifier.has_value())
return intern_identifier(identifier.release_value());
return {};
}

View file

@ -317,7 +317,7 @@ public:
}
if (m_type == ScopeType::Function && m_bound_names.contains(identifier_group_name)) {
// NOTE: Currently parser can't determine that named function expression assigment creates scope with binding for funciton name so function names are not considered as candidates to be optmized in global variables access
// NOTE: Currently parser can't determine that named function expression assignment creates scope with binding for function name so function names are not considered as candidates to be optimized in global variables access
identifier_group.might_be_variable_in_lexical_scope_in_named_function_assignment = true;
}

View file

@ -388,7 +388,7 @@ static i64 clip_double_to_sane_time(double value)
static constexpr auto min_double = static_cast<double>(NumericLimits<i64>::min());
static constexpr auto max_double = static_cast<double>(NumericLimits<i64>::max());
// The provided epoch millseconds value is potentially out of range for AK::Duration and subsequently
// The provided epoch milliseconds value is potentially out of range for AK::Duration and subsequently
// get_time_zone_offset(). We can safely assume that the TZDB has no useful information that far
// into the past and future anyway, so clamp it to the i64 range.
if (value < min_double)

View file

@ -35,7 +35,7 @@ String const& SourceCode::code() const
void SourceCode::fill_position_cache() const
{
constexpr size_t predicted_mimimum_cached_positions = 8;
constexpr size_t predicted_minimum_cached_positions = 8;
constexpr size_t minimum_distance_between_cached_positions = 32;
constexpr size_t maximum_distance_between_cached_positions = 8192;
@ -46,7 +46,7 @@ void SourceCode::fill_position_cache() const
size_t line = 1;
size_t column = 1;
size_t offset_of_last_starting_point = 0;
m_cached_positions.ensure_capacity(predicted_mimimum_cached_positions + m_code.bytes().size() / maximum_distance_between_cached_positions);
m_cached_positions.ensure_capacity(predicted_minimum_cached_positions + m_code.bytes().size() / maximum_distance_between_cached_positions);
m_cached_positions.append({ .line = 1, .column = 1, .offset = 0 });
Utf8View const view(m_code);

View file

@ -71,9 +71,9 @@ describe("correct behaviour", () => {
});
test("gets undefined in completed state", () => {
const ninethRunResult = runGenerator("bad8", false);
expect(ninethRunResult.value).toBeUndefined();
expect(ninethRunResult.done).toBeTrue();
const ninthRunResult = runGenerator("bad8", false);
expect(ninthRunResult.value).toBeUndefined();
expect(ninthRunResult.done).toBeTrue();
});
async function* implicitReturnFunction() {

View file

@ -168,7 +168,7 @@ describe("behavior with exceptions", () => {
expect(inCatch).toBeTrue();
});
test.xfail("normal error and multiple disposing erorrs give chaining suppressed errors", () => {
test.xfail("normal error and multiple disposing errors give chaining suppressed errors", () => {
let inCatch = false;
try {
using a = { [Symbol.dispose]() {
@ -345,7 +345,7 @@ describe("using is still a valid variable name", () => {
});
});
describe("syntax errors / werid artifacts which remain valid", () => {
describe("syntax errors / weird artifacts which remain valid", () => {
test("no patterns in using", () => {
expect("using {a} = {}").not.toEval();
expect("using a, {a} = {}").not.toEval();

View file

@ -224,7 +224,7 @@ DecoderErrorOr<NonnullOwnPtr<VideoFrame>> FFmpegVideoDecoder::get_decoded_frame(
case AVERROR(EINVAL):
return DecoderError::with_description(DecoderErrorCategory::Invalid, "FFmpeg codec has not been opened"sv);
default:
return DecoderError::format(DecoderErrorCategory::Unknown, "FFmpeg codec encountered an unexpected error retreiving frames with code {:x}", result);
return DecoderError::format(DecoderErrorCategory::Unknown, "FFmpeg codec encountered an unexpected error retrieving frames with code {:x}", result);
}
}

View file

@ -584,7 +584,7 @@ ErrorOr<Vector<Certificate>> DefaultRootCACertificates::parse_pem_root_certifica
for (auto& cert : certs) {
auto certificate_result = Certificate::parse_certificate(cert.data);
if (certificate_result.is_error()) {
// FIXME: It would be nice to have more informations about the certificate we failed to parse.
// FIXME: It would be nice to have more information about the certificate we failed to parse.
// Like: Issuer, Algorithm, CN, etc
dbgln("Failed to load certificate: {}", certificate_result.error());
continue;

View file

@ -82,7 +82,7 @@ enum class ConnectionStatus {
Established,
};
enum ClientVerificationStaus {
enum ClientVerificationStatus {
Verified,
VerificationNeeded,
};
@ -295,7 +295,7 @@ struct Context {
ByteBuffer cached_handshake;
ClientVerificationStaus client_verified { Verified };
ClientVerificationStatus client_verified { Verified };
bool connection_finished { false };
bool close_notify { false };

View file

@ -847,7 +847,7 @@ private:
}
// ICU 72 introduced the use of NBSP to separate time fields and day periods. All major browsers have found that
// this significantly breaks web compatibilty, and they all replace these spaces with normal ASCII spaces. See:
// this significantly breaks web compatibility, and they all replace these spaces with normal ASCII spaces. See:
//
// https://bugzilla.mozilla.org/show_bug.cgi?id=1806042
// https://bugs.webkit.org/show_bug.cgi?id=252147

View file

@ -1149,7 +1149,7 @@ ParseResult<CodeSection::Code> CodeSection::Code::parse(Stream& stream)
ScopeLogger<WASM_BINPARSER_DEBUG> logger("Code"sv);
auto size = TRY_READ(stream, LEB128<u32>, ParseError::InvalidSize);
// Emprically, if there are `size` bytes to be read, then there's around
// Empirically, if there are `size` bytes to be read, then there's around
// `size / 2` instructions, so we pass that as our size hint.
auto func = TRY(Func::parse(stream, size / 2));

View file

@ -24,7 +24,7 @@ Optional<int> CSSAnimation::class_specific_composite_order(GC::Ref<Animations::A
{
auto other = GC::Ref { verify_cast<CSSAnimation>(*other_animation) };
// The existance of an owning element determines the animation class, so both animations should have their owning
// The existence of an owning element determines the animation class, so both animations should have their owning
// element in the same state
VERIFY(!owning_element() == !other->owning_element());

View file

@ -175,7 +175,7 @@ FontFace::FontFace(JS::Realm& realm, GC::Ref<WebIDL::Promise> font_status_promis
m_line_gap_override = descriptors.line_gap_override;
// FIXME: Parse from descriptor
// FIXME: Have gettter reflect this member instead of the string
// FIXME: Have getter reflect this member instead of the string
m_unicode_ranges.empend(0x0u, 0x10FFFFu);
if (verify_cast<JS::Promise>(*m_font_status_promise->promise()).state() == JS::Promise::State::Rejected)

View file

@ -137,7 +137,7 @@ NonnullRefPtr<MediaQuery> Parser::parse_media_query(TokenStream<ComponentValue>&
}
// `<media-condition>`, https://www.w3.org/TR/mediaqueries-4/#typedef-media-condition
// `<media-condition-widthout-or>`, https://www.w3.org/TR/mediaqueries-4/#typedef-media-condition-without-or
// `<media-condition-without-or>`, https://www.w3.org/TR/mediaqueries-4/#typedef-media-condition-without-or
// (We distinguish between these two with the `allow_or` parameter.)
OwnPtr<MediaCondition> Parser::parse_media_condition(TokenStream<ComponentValue>& tokens, MediaCondition::AllowOr allow_or)
{

View file

@ -732,7 +732,7 @@ ComponentValue Parser::consume_a_component_value(TokenStream<T>& input)
template<>
void Parser::consume_a_component_value_and_do_nothing<ComponentValue>(TokenStream<ComponentValue>& tokens)
{
// AD-HOC: To avoid unnecessairy allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// AD-HOC: To avoid unnecessarily allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// Note: This overload is called once tokens have already been converted into component values,
// so we do not need to do the work in the more general overload.
(void)tokens.consume_a_token();
@ -743,7 +743,7 @@ void Parser::consume_a_component_value_and_do_nothing<ComponentValue>(TokenStrea
template<typename T>
void Parser::consume_a_component_value_and_do_nothing(TokenStream<T>& input)
{
// AD-HOC: To avoid unnecessairy allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// AD-HOC: To avoid unnecessarily allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// To consume a component value from a token stream input:
// Process input:
@ -865,7 +865,7 @@ SimpleBlock Parser::consume_a_simple_block(TokenStream<T>& input)
template<typename T>
void Parser::consume_a_simple_block_and_do_nothing(TokenStream<T>& input)
{
// AD-HOC: To avoid unnecessairy allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// AD-HOC: To avoid unnecessarily allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// To consume a simple block from a token stream input:
// Assert: the next token of input is <{-token>, <[-token>, or <(-token>.
@ -943,7 +943,7 @@ Function Parser::consume_a_function(TokenStream<T>& input)
template<typename T>
void Parser::consume_a_function_and_do_nothing(TokenStream<T>& input)
{
// AD-HOC: To avoid unnecessairy allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// AD-HOC: To avoid unnecessarily allocations, we explicitly define a "do nothing" variant that discards the result immediately.
// To consume a function from a token stream input:
// Assert: The next token is a <function-token>.

View file

@ -2931,7 +2931,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> ECDSA::import_key(AlgorithmParams const&
// 1. Perform any key import steps defined by other applicable specifications, passing format, keyData and obtaining key.
// TODO: support 'applicable specifications'
// 2. If an error occured or there are no applicable specifications, throw a DataError.
// 2. If an error occurred or there are no applicable specifications, throw a DataError.
return WebIDL::DataError::create(m_realm, "Invalid algorithm"_string);
}
@ -3824,7 +3824,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> ECDH::import_key(AlgorithmParams const&
// 1. Perform any key import steps defined by other applicable specifications, passing format, keyData and obtaining key.
// TODO: support 'applicable specifications'
// 2. If an error occured or there are no applicable specifications, throw a DataError.
// 2. If an error occurred or there are no applicable specifications, throw a DataError.
return WebIDL::DataError::create(m_realm, "Invalid algorithm"_string);
}

View file

@ -36,13 +36,13 @@ FlyString const& PerformanceEventTiming::entry_type() const
HighResolutionTime::DOMHighResTimeStamp PerformanceEventTiming::processing_end() const
{
dbgln("FIXME: Implement PeformanceEventTiming processing_end()");
dbgln("FIXME: Implement PerformanceEventTiming processing_end()");
return 0;
}
HighResolutionTime::DOMHighResTimeStamp PerformanceEventTiming::processing_start() const
{
dbgln("FIXME: Implement PeformanceEventTiming processing_start()");
dbgln("FIXME: Implement PerformanceEventTiming processing_start()");
return 0;
}
@ -53,20 +53,20 @@ bool PerformanceEventTiming::cancelable() const
JS::ThrowCompletionOr<GC::Ptr<DOM::Node>> PerformanceEventTiming::target()
{
dbgln("FIXME: Implement PerformanceEventTiming::PeformanceEventTiming target()");
dbgln("FIXME: Implement PerformanceEventTiming::PerformanceEventTiming target()");
return nullptr;
}
unsigned long long PerformanceEventTiming::interaction_id()
{
dbgln("FIXME: Implement PeformanceEventTiming interaction_id()");
dbgln("FIXME: Implement PerformanceEventTiming interaction_id()");
return 0;
}
// https://www.w3.org/TR/event-timing/#sec-should-add-performanceeventtiming
PerformanceTimeline::ShouldAddEntry PerformanceEventTiming::should_add_performance_event_timing() const
{
dbgln("FIXME: Implement PeformanceEventTiming should_add_performance_event_timing()");
dbgln("FIXME: Implement PerformanceEventTiming should_add_performance_event_timing()");
// 1. If entrys entryType attribute value equals to "first-input", return true.
if (entry_type() == "first-input")
return PerformanceTimeline::ShouldAddEntry::Yes;
@ -89,7 +89,7 @@ PerformanceTimeline::ShouldAddEntry PerformanceEventTiming::should_add_performan
// the commented out if statement won't compile
PerformanceTimeline::AvailableFromTimeline PerformanceEventTiming::available_from_timeline()
{
dbgln("FIXME: Implement PeformanceEventTiming available_from_timeline()");
dbgln("FIXME: Implement PerformanceEventTiming available_from_timeline()");
// if (entry_type() == "first-input")
return PerformanceTimeline::AvailableFromTimeline::Yes;
}
@ -98,7 +98,7 @@ PerformanceTimeline::AvailableFromTimeline PerformanceEventTiming::available_fro
// FIXME: Same issue as available_from_timeline() above
Optional<u64> PerformanceEventTiming::max_buffer_size()
{
dbgln("FIXME: Implement PeformanceEventTiming max_buffer_size()");
dbgln("FIXME: Implement PerformanceEventTiming max_buffer_size()");
if (true) //(entry_type() == "first-input")
return 1;
// else return 150;

View file

@ -103,17 +103,17 @@ GC::Ref<DOMRect> DOMQuad::get_bounds() const
}
// https://drafts.fxtf.org/geometry/#structured-serialization
WebIDL::ExceptionOr<void> DOMQuad::serialization_steps(HTML::SerializationRecord& serialzied, bool for_storage, HTML::SerializationMemory& memory)
WebIDL::ExceptionOr<void> DOMQuad::serialization_steps(HTML::SerializationRecord& serialized, bool for_storage, HTML::SerializationMemory& memory)
{
auto& vm = this->vm();
// 1. Set serialized.[[P1]] to the sub-serialization of values point 1.
serialzied.extend(TRY(HTML::structured_serialize_internal(vm, m_p1, for_storage, memory)));
serialized.extend(TRY(HTML::structured_serialize_internal(vm, m_p1, for_storage, memory)));
// 2. Set serialized.[[P2]] to the sub-serialization of values point 2.
serialzied.extend(TRY(HTML::structured_serialize_internal(vm, m_p2, for_storage, memory)));
serialized.extend(TRY(HTML::structured_serialize_internal(vm, m_p2, for_storage, memory)));
// 3. Set serialized.[[P3]] to the sub-serialization of values point 3.
serialzied.extend(TRY(HTML::structured_serialize_internal(vm, m_p3, for_storage, memory)));
serialized.extend(TRY(HTML::structured_serialize_internal(vm, m_p3, for_storage, memory)));
// 4. Set serialized.[[P4]] to the sub-serialization of values point 4.
serialzied.extend(TRY(HTML::structured_serialize_internal(vm, m_p4, for_storage, memory)));
serialized.extend(TRY(HTML::structured_serialize_internal(vm, m_p4, for_storage, memory)));
return {};
}

View file

@ -81,7 +81,7 @@ void CanvasPath::bezier_curve_to(double cp1x, double cp1y, double cp2x, double c
// 2. Ensure there is a subpath for (cp1x, cp1y)
ensure_subpath(cp1x, cp1y);
// 3. Connect the last point in the subpath to the given point (x, y) using a cubic Bézier curve with control poits (cp1x, cp1y) and (cp2x, cp2y).
// 3. Connect the last point in the subpath to the given point (x, y) using a cubic Bézier curve with control points (cp1x, cp1y) and (cp2x, cp2y).
// 4. Add the point (x, y) to the subpath.
m_path.cubic_bezier_curve_to(
Gfx::FloatPoint { cp1x, cp1y }, Gfx::FloatPoint { cp2x, cp2y }, Gfx::FloatPoint { x, y });

View file

@ -261,10 +261,10 @@ Gfx::Path CanvasRenderingContext2D::text_path(StringView text, float x, float y,
}
// Apply text baseline
// FIXME: Implement CanvasTextBasline::Hanging, Bindings::CanvasTextAlign::Alphabetic and Bindings::CanvasTextAlign::Ideographic for real
// FIXME: Implement CanvasTextBaseline::Hanging, Bindings::CanvasTextAlign::Alphabetic and Bindings::CanvasTextAlign::Ideographic for real
// right now they are just handled as textBaseline = top or bottom.
// https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-textbaseline-hanging
// Default baseline of draw_text is top so do nothing by CanvasTextBaseline::Top and CanvasTextBasline::Hanging
// Default baseline of draw_text is top so do nothing by CanvasTextBaseline::Top and CanvasTextBaseline::Hanging
if (drawing_state.text_baseline == Bindings::CanvasTextBaseline::Middle) {
transform = Gfx::AffineTransform {}.set_translation({ 0, font->pixel_size() / 2 }).multiply(transform);
}

View file

@ -149,7 +149,7 @@ void HTMLInputElement::adjust_computed_style(CSS::StyleProperties& style)
style.set_property(CSS::PropertyID::Width, CSS::LengthStyleValue::create(CSS::Length(size(), CSS::Length::Type::Ch)));
}
// NOTE: The following line-height check is done for web compatability and usability reasons.
// NOTE: The following line-height check is done for web compatibility and usability reasons.
// FIXME: The "normal" line-height value should be calculated but assume 1.0 for now.
double normal_line_height = 1.0;
double current_line_height = style.line_height().to_double();

View file

@ -101,7 +101,7 @@ WebIDL::ExceptionOr<void> NavigateEvent::intercept(NavigationInterceptOptions co
if (m_focus_reset_behavior.has_value() && *m_focus_reset_behavior != *options.focus_reset) {
auto& console = realm.intrinsics().console_object()->console();
console.output_debug_message(JS::Console::LogLevel::Warn,
TRY_OR_THROW_OOM(vm, String::formatted("focusReset behavior on NavigationEvent overriden (was: {}, now: {})", *m_focus_reset_behavior, *options.focus_reset)));
TRY_OR_THROW_OOM(vm, String::formatted("focusReset behavior on NavigationEvent overridden (was: {}, now: {})", *m_focus_reset_behavior, *options.focus_reset)));
}
// 2. Set this's focus reset behavior to options["focusReset"].
@ -116,7 +116,7 @@ WebIDL::ExceptionOr<void> NavigateEvent::intercept(NavigationInterceptOptions co
if (m_scroll_behavior.has_value() && *m_scroll_behavior != *options.scroll) {
auto& console = realm.intrinsics().console_object()->console();
console.output_debug_message(JS::Console::LogLevel::Warn,
TRY_OR_THROW_OOM(vm, String::formatted("scroll option on NavigationEvent overriden (was: {}, now: {})", *m_scroll_behavior, *options.scroll)));
TRY_OR_THROW_OOM(vm, String::formatted("scroll option on NavigationEvent overridden (was: {}, now: {})", *m_scroll_behavior, *options.scroll)));
}
// 2. Set this's scroll behavior to options["scroll"].

View file

@ -18,7 +18,7 @@ public:
WebIDL::Double device_memory() const
{
// The value is calculated by using the actual device memory in MiB then rounding it to the
// nearest number where only the most signicant bit can be set and the rest are zeros
// nearest number where only the most significant bit can be set and the rest are zeros
// (nearest power of two).
auto memory_in_bytes = Core::System::physical_memory_bytes();
auto memory_in_mib = memory_in_bytes / MiB;

View file

@ -658,7 +658,7 @@ WebIDL::ExceptionOr<void> serialize_viewed_array_buffer(JS::VM& vm, Vector<u32>&
auto buffer_serialized = TRY(structured_serialize_internal(vm, buffer, for_storage, memory));
// 4. Assert: bufferSerialized.[[Type]] is "ArrayBuffer", "ResizableArrayBuffer", "SharedArrayBuffer", or "GrowableSharedArrayBuffer".
// NOTE: Object reference + memory check is required when ArrayBuffer is transfered.
// NOTE: Object reference + memory check is required when ArrayBuffer is transferred.
auto tag = buffer_serialized[0];
VERIFY(tag == ValueTag::ArrayBuffer
|| tag == ValueTag::ResizeableArrayBuffer

View file

@ -1083,7 +1083,7 @@ void GridFormattingContext::expand_flexible_tracks(GridDimension const dimension
auto& tracks_and_gaps = dimension == GridDimension::Column ? m_grid_columns_and_gaps : m_grid_rows_and_gaps;
auto& tracks = dimension == GridDimension::Column ? m_grid_columns : m_grid_rows;
auto& available_size = dimension == GridDimension::Column ? m_available_space->width : m_available_space->height;
// FIXME: This should idealy take a Span, as that is more idomatic, but Span does not yet support holding references
// FIXME: This should ideally take a Span, as that is more idomatic, but Span does not yet support holding references
auto find_the_size_of_an_fr = [&](Vector<GridTrack&> const& tracks, CSSPixels space_to_fill) -> CSSPixelFraction {
// https://www.w3.org/TR/css-grid-2/#algo-find-fr-size
auto treat_track_as_inflexiable = MUST(AK::Bitmap::create(tracks.size(), false));
@ -2424,20 +2424,20 @@ CSSPixels GridFormattingContext::calculate_min_content_contribution(GridItem con
return should_treat_height_as_auto(item.box, available_space_for_item);
}();
auto maxium_size = CSSPixels::max();
auto maximum_size = CSSPixels::max();
if (auto const& css_maximum_size = get_item_maximum_size(item, dimension); css_maximum_size.is_length()) {
maxium_size = css_maximum_size.length().to_px(item.box);
maximum_size = css_maximum_size.length().to_px(item.box);
}
if (should_treat_preferred_size_as_auto) {
auto result = item.add_margin_box_sizes(calculate_min_content_size(item, dimension), dimension, m_state);
return min(result, maxium_size);
return min(result, maximum_size);
}
auto preferred_size = get_item_preferred_size(item, dimension);
auto containing_block_size = containing_block_size_for_item(item, dimension);
auto result = item.add_margin_box_sizes(preferred_size.to_px(grid_container(), containing_block_size), dimension, m_state);
return min(result, maxium_size);
return min(result, maximum_size);
}
CSSPixels GridFormattingContext::calculate_max_content_contribution(GridItem const& item, GridDimension const dimension) const
@ -2450,21 +2450,21 @@ CSSPixels GridFormattingContext::calculate_max_content_contribution(GridItem con
return should_treat_height_as_auto(item.box, available_space_for_item);
}();
auto maxium_size = CSSPixels::max();
auto maximum_size = CSSPixels::max();
if (auto const& css_maximum_size = get_item_maximum_size(item, dimension); css_maximum_size.is_length()) {
maxium_size = css_maximum_size.length().to_px(item.box);
maximum_size = css_maximum_size.length().to_px(item.box);
}
auto preferred_size = get_item_preferred_size(item, dimension);
if (should_treat_preferred_size_as_auto || preferred_size.is_fit_content()) {
auto fit_content_size = dimension == GridDimension::Column ? calculate_fit_content_width(item.box, available_space_for_item) : calculate_fit_content_height(item.box, available_space_for_item);
auto result = item.add_margin_box_sizes(fit_content_size, dimension, m_state);
return min(result, maxium_size);
return min(result, maximum_size);
}
auto containing_block_size = containing_block_size_for_item(item, dimension);
auto result = item.add_margin_box_sizes(preferred_size.to_px(grid_container(), containing_block_size), dimension, m_state);
return min(result, maxium_size);
return min(result, maximum_size);
}
CSSPixels GridFormattingContext::calculate_limited_min_content_contribution(GridItem const& item, GridDimension const dimension) const

View file

@ -211,7 +211,7 @@ void paint_border(DisplayListRecorder& painter, BorderEdge edge, DevicePixelRect
VERIFY_NOT_REACHED();
}
}
// FIXME: this middle point rule seems not exacly the same as main browsers
// FIXME: this middle point rule seems not exactly the same as main browsers
// compute the midpoint based on point whose tangent slope of 1
// https://math.stackexchange.com/questions/3325134/find-the-points-on-the-ellipse-where-the-slope-of-the-tangent-line-is-1
return Gfx::FloatPoint(

View file

@ -38,7 +38,7 @@ void RadioButtonPaintable::paint(PaintContext& context, PaintPhase phase) const
return;
auto draw_circle = [&](auto const& rect, Color color) {
// Note: Doing this is a bit more forgiving than draw_circle() which will round to the nearset even radius.
// Note: Doing this is a bit more forgiving than draw_circle() which will round to the nearest even radius.
// This will fudge it (which works better here).
context.display_list_recorder().fill_rect_with_rounded_corners(rect, color, rect.width() / 2);
};

View file

@ -75,7 +75,7 @@ void SVGElement::update_use_elements_that_reference_this()
// An unconnected node cannot have valid references.
// This also prevents searches for elements that are in the process of being constructed - as clones.
|| !this->is_connected()
// Each use element already listens for the completely_loaded event and then clones its referece,
// Each use element already listens for the completely_loaded event and then clones its reference,
// we do not have to also clone it in the process of initial DOM building.
|| !document().is_completely_loaded()) {

View file

@ -82,14 +82,14 @@ void SVGUseElement::process_the_url(Optional<String> const& href)
if (!m_href.is_valid())
return;
if (is_referrenced_element_same_document()) {
if (is_referenced_element_same_document()) {
clone_element_tree_as_our_shadow_tree(referenced_element());
} else {
fetch_the_document(m_href);
}
}
bool SVGUseElement::is_referrenced_element_same_document() const
bool SVGUseElement::is_referenced_element_same_document() const
{
return m_href.equals(document().url(), URL::ExcludeFragment::Yes);
}
@ -121,7 +121,7 @@ void SVGUseElement::svg_element_changed(SVGElement& svg_element)
void SVGUseElement::svg_element_removed(SVGElement& svg_element)
{
if (!m_href.fragment().has_value() || !is_referrenced_element_same_document()) {
if (!m_href.fragment().has_value() || !is_referenced_element_same_document()) {
return;
}
@ -139,7 +139,7 @@ GC::Ptr<DOM::Element> SVGUseElement::referenced_element()
if (!m_href.fragment().has_value())
return nullptr;
if (is_referrenced_element_same_document())
if (is_referenced_element_same_document())
return document().get_element_by_id(*m_href.fragment());
if (!m_resource_request)

View file

@ -57,7 +57,7 @@ private:
GC::Ptr<DOM::Element> referenced_element();
void fetch_the_document(URL::URL const& url);
bool is_referrenced_element_same_document() const;
bool is_referenced_element_same_document() const;
void clone_element_tree_as_our_shadow_tree(Element* to_clone);
bool is_valid_reference_element(Element const& reference_element) const;

View file

@ -307,7 +307,7 @@ static ErrorOr<String> get_event_key(KeyCode platform_key, u32 code_point)
// FIXME: 4. Else, if the key event has any modifier keys other than glyph modifier keys, then
// FIXME: 1. Set key to the key string that would have been generated by this event if it had been typed with all
// modifer keys removed except for glyph modifier keys.
// modifier keys removed except for glyph modifier keys.
// 5. Return key as the key attribute value for this key event.
return "Unidentified"_string;

View file

@ -209,8 +209,8 @@ GC_DEFINE_ALLOCATOR(WaitForAllResults);
// https://webidl.spec.whatwg.org/#wait-for-all
void wait_for_all(JS::Realm& realm, Vector<GC::Ref<Promise>> const& promises, Function<void(Vector<JS::Value> const&)> success_steps, Function<void(JS::Value)> failure_steps)
{
// FIXME: Fix spec typo, fullfilled --> fulfilled
// 1. Let fullfilledCount be 0.
// FIXME: Fix spec typo, fulfilled --> fulfilled
// 1. Let fulfilledCount be 0.
// Handled later in WaitForAllResults
// 2. Let rejected be false.
@ -269,10 +269,10 @@ void wait_for_all(JS::Realm& realm, Vector<GC::Ref<Promise>> const& promises, Fu
// 1. Set result[promiseIndex] to arg.
results->result[promise_index] = arg;
// 2. Set fullfilledCount to fullfilledCount + 1.
// 2. Set fulfilledCount to fulfilledCount + 1.
++results->fulfilled_count;
// 3. If fullfilledCount equals total, then perform successSteps given result.
// 3. If fulfilledCount equals total, then perform successSteps given result.
if (results->fulfilled_count == results->total)
results->success_steps->function()(results->result);

View file

@ -126,11 +126,11 @@ ErrorOr<void> WebSocket::establish_web_socket_connection(URL::URL& url_record, V
VERIFY(window_or_worker);
auto origin_string = window_or_worker->origin().to_byte_string();
Vector<ByteString> protcol_byte_strings;
Vector<ByteString> protocol_byte_strings;
for (auto const& protocol : protocols)
TRY(protcol_byte_strings.try_append(protocol.to_byte_string()));
TRY(protocol_byte_strings.try_append(protocol.to_byte_string()));
m_websocket = ResourceLoader::the().request_client().websocket_connect(url_record, origin_string, protcol_byte_strings);
m_websocket = ResourceLoader::the().request_client().websocket_connect(url_record, origin_string, protocol_byte_strings);
m_websocket->on_open = [weak_this = make_weak_ptr<WebSocket>()] {
if (!weak_this)

View file

@ -11,7 +11,7 @@ namespace Web::HTML {
void WebWorkerClient::die()
{
// FIXME: Notify WorkerAgent that the worker is ded
// FIXME: Notify WorkerAgent that the worker is dead
}
void WebWorkerClient::did_close_worker()

View file

@ -136,7 +136,7 @@ InspectorClient::InspectorClient(ViewImplementation& content_web_view, ViewImple
m_inspector_web_view.run_javascript(script);
};
m_content_web_view.on_finshed_editing_dom_node = [this](auto const& node_id) {
m_content_web_view.on_finished_editing_dom_node = [this](auto const& node_id) {
m_pending_selection = node_id;
m_dom_tree_loaded = false;
m_dom_node_attributes.clear();
@ -285,7 +285,7 @@ InspectorClient::InspectorClient(ViewImplementation& content_web_view, ViewImple
InspectorClient::~InspectorClient()
{
m_content_web_view.on_finshed_editing_dom_node = nullptr;
m_content_web_view.on_finished_editing_dom_node = nullptr;
m_content_web_view.on_received_accessibility_tree = nullptr;
m_content_web_view.on_received_console_message = nullptr;
m_content_web_view.on_received_console_messages = nullptr;
@ -533,7 +533,7 @@ void InspectorClient::load_inspector()
generator.set("INSPECTOR_JS"sv, INSPECTOR_JS);
generator.set("INSPECTOR_STYLE"sv, HTML_HIGHLIGHTER_STYLE);
generator.set("COMPUTED_STYLE"sv, generate_property_table("computed-style"sv));
generator.set("RESOVLED_STYLE"sv, generate_property_table("resolved-style"sv));
generator.set("RESOLVED_STYLE"sv, generate_property_table("resolved-style"sv));
generator.set("CUSTOM_PROPERTIES"sv, generate_property_table("custom-properties"sv));
generator.append(inspector_html->data());

View file

@ -602,7 +602,7 @@ NonnullRefPtr<Core::Promise<LexicalPath>> ViewImplementation::take_screenshot(Sc
auto promise = Core::Promise<LexicalPath>::construct();
if (m_pending_screenshot) {
// For simplicitly, only allow taking one screenshot at a time for now. Revisit if we need
// For simplicity, only allow taking one screenshot at a time for now. Revisit if we need
// to allow spamming screenshot requests for some reason.
promise->reject(Error::from_string_literal("A screenshot request is already in progress"));
return promise;
@ -634,7 +634,7 @@ NonnullRefPtr<Core::Promise<LexicalPath>> ViewImplementation::take_dom_node_scre
auto promise = Core::Promise<LexicalPath>::construct();
if (m_pending_screenshot) {
// For simplicitly, only allow taking one screenshot at a time for now. Revisit if we need
// For simplicity, only allow taking one screenshot at a time for now. Revisit if we need
// to allow spamming screenshot requests for some reason.
promise->reject(Error::from_string_literal("A screenshot request is already in progress"));
return promise;
@ -663,7 +663,7 @@ NonnullRefPtr<Core::Promise<String>> ViewImplementation::request_internal_page_i
auto promise = Core::Promise<String>::construct();
if (m_pending_info_request) {
// For simplicitly, only allow one info request at a time for now.
// For simplicity, only allow one info request at a time for now.
promise->reject(Error::from_string_literal("A page info request is already in progress"));
return promise;
}

View file

@ -198,7 +198,7 @@ public:
Function<void(Web::CSS::StyleSheetIdentifier const&)> on_inspector_requested_style_sheet_source;
Function<void(Web::CSS::StyleSheetIdentifier const&, URL::URL const&, String const&)> on_received_style_sheet_source;
Function<void(Web::UniqueNodeID)> on_received_hovered_node_id;
Function<void(Optional<Web::UniqueNodeID> const& node_id)> on_finshed_editing_dom_node;
Function<void(Optional<Web::UniqueNodeID> const& node_id)> on_finished_editing_dom_node;
Function<void(String const&)> on_received_dom_node_html;
Function<void(i32 message_id)> on_received_console_message;
Function<void(i32 start_index, Vector<ByteString> const& message_types, Vector<ByteString> const& messages)> on_received_console_messages;

View file

@ -299,8 +299,8 @@ void WebContentClient::did_get_hovered_node_id(u64 page_id, Web::UniqueNodeID co
void WebContentClient::did_finish_editing_dom_node(u64 page_id, Optional<Web::UniqueNodeID> const& node_id)
{
if (auto view = view_for_page_id(page_id); view.has_value()) {
if (view->on_finshed_editing_dom_node)
view->on_finshed_editing_dom_node(node_id);
if (view->on_finished_editing_dom_node)
view->on_finished_editing_dom_node(node_id);
}
}

View file

@ -83,7 +83,7 @@ function(_swift_generate_cxx_header target header)
"Generating '${header_path}'"
COMMAND_EXPAND_LISTS)
# Added to public interface for dependees to find.
# Added to public interface for dependencies to find.
target_include_directories(${target} PUBLIC $<BUILD_INTERFACE:${base_path}>)
# Added to the target to ensure target rebuilds if header changes and is used
# by sources in the target.

View file

@ -30,7 +30,7 @@ function(declare_external_from_vcpkg name)
endfunction()
# Download and integrate named external dependencies.
# Downlods must be handled before vcpkg in order to support --only-downloads mode.
# Downloads must be handled before vcpkg in order to support --only-downloads mode.
function(get_externals)
set(licenses_dir "${SOURCE_PATH}/third_party_licenses")
file(REMOVE_RECURSE "${licenses_dir}")

View file

@ -1,7 +1,7 @@
#
# This file introduces a template for calling download_file.py
#
# download_file behaves like CMake's file(DOWNLOAD) with the addtion
# download_file behaves like CMake's file(DOWNLOAD) with the addition
# of version checking the file against a build system defined version.
#
# Parameters:
@ -12,7 +12,7 @@
# version (required) [string]
# Version of the file for caching purposes
#
# version_file (reqiured) [string]
# version_file (required) [string]
# Filename to write the version to in the filesystem
#
# cache [String]

View file

@ -3,7 +3,7 @@ template("unittest") {
has_custom_main = false
use_js_main = false
# Foward everything (has_custom_main if set; configs, sources, deps, ...).
# Forward everything (has_custom_main if set; configs, sources, deps, ...).
forward_variables_from(invoker, "*")
assert(!defined(invoker.output_dir), "cannot set unittest output_dir")
assert(!defined(invoker.testonly), "cannot set unittest testonly")

View file

@ -2775,7 +2775,7 @@ void WebDriverConnection::wait_for_navigation_to_complete(OnNavigationComplete o
void WebDriverConnection::page_did_open_dialog(Badge<PageClient>)
{
// OPTMIZATION: If a dialog is opened while we are awaiting a specific document readiness state, that state will
// OPTIMIZATION: If a dialog is opened while we are awaiting a specific document readiness state, that state will
// never be reached, as the dialog will block the HTML event loop from any further processing. Instead
// of waiting for the session's page load timeout to expire, unblock the waiter immediately. This also
// seems to match how other browsers behave.

View file

@ -30,7 +30,7 @@ void ConnectionFromClient::die()
void ConnectionFromClient::request_file(Web::FileRequest request)
{
// FIXME: Route this to FSAS or Brower chrome as appropriate instead of allowing
// FIXME: Route this to FSAS or Browser chrome as appropriate instead of allowing
// the WebWorker process filesystem access
auto path = request.path();
auto request_id = ++last_id;

View file

@ -303,8 +303,8 @@ TEST_CASE(roman_numerals)
auto nine = ByteString::roman_number_from(9);
EXPECT_EQ(nine, "IX");
auto fourty_eight = ByteString::roman_number_from(48);
EXPECT_EQ(fourty_eight, "XLVIII");
auto forty_eight = ByteString::roman_number_from(48);
EXPECT_EQ(forty_eight, "XLVIII");
auto one_thousand_nine_hundred_ninety_eight = ByteString::roman_number_from(1998);
EXPECT_EQ(one_thousand_nine_hundred_ninety_eight, "MCMXCVIII");

View file

@ -13,15 +13,15 @@ enum class VideoIntro : u8 {
Well = 0x1,
Hello = 0x2,
Friends = 0x4,
ExclimationMark = 0x8,
CompleteIntro = Well | Hello | Friends | ExclimationMark,
ExclamationMark = 0x8,
CompleteIntro = Well | Hello | Friends | ExclamationMark,
};
AK_ENUM_BITWISE_OPERATORS(VideoIntro);
TEST_CASE(bitwise_or)
{
auto intro = VideoIntro::Well | VideoIntro::Hello | VideoIntro::Friends | VideoIntro::ExclimationMark;
auto intro = VideoIntro::Well | VideoIntro::Hello | VideoIntro::Friends | VideoIntro::ExclamationMark;
EXPECT_EQ(intro, VideoIntro::CompleteIntro);
}
@ -34,7 +34,7 @@ TEST_CASE(bitwise_and)
TEST_CASE(bitwise_xor)
{
auto intro = VideoIntro::Well | VideoIntro::Hello | VideoIntro::Friends;
EXPECT_EQ(intro ^ VideoIntro::CompleteIntro, VideoIntro::ExclimationMark);
EXPECT_EQ(intro ^ VideoIntro::CompleteIntro, VideoIntro::ExclamationMark);
}
TEST_CASE(bitwise_not)
@ -46,7 +46,7 @@ TEST_CASE(bitwise_not)
TEST_CASE(bitwise_or_equal)
{
auto intro = VideoIntro::Well | VideoIntro::Hello | VideoIntro::Friends;
EXPECT_EQ(intro |= VideoIntro::ExclimationMark, VideoIntro::CompleteIntro);
EXPECT_EQ(intro |= VideoIntro::ExclamationMark, VideoIntro::CompleteIntro);
}
TEST_CASE(bitwise_and_equal)
@ -58,7 +58,7 @@ TEST_CASE(bitwise_and_equal)
TEST_CASE(bitwise_xor_equal)
{
auto intro = VideoIntro::Well | VideoIntro::Hello | VideoIntro::Friends;
EXPECT_EQ(intro ^= VideoIntro::CompleteIntro, VideoIntro::ExclimationMark);
EXPECT_EQ(intro ^= VideoIntro::CompleteIntro, VideoIntro::ExclamationMark);
}
TEST_CASE(has_flag)

View file

@ -27,7 +27,7 @@ TEST_CASE(ints)
EXPECT_EQ(ints[2], 2);
}
TEST_CASE(conforms_to_iterator_procotol)
TEST_CASE(conforms_to_iterator_protocol)
{
static_assert(std::random_access_iterator<FixedArray<int>::Iterator>);
static_assert(std::random_access_iterator<FixedArray<int>::ConstIterator>);

View file

@ -9,7 +9,7 @@
#include <AK/Endian.h>
#include <AK/IPv4Address.h>
TEST_CASE(should_default_contructor_with_0s)
TEST_CASE(should_default_constructor_with_0s)
{
constexpr IPv4Address addr {};

View file

@ -9,7 +9,7 @@
#include <AK/Endian.h>
#include <AK/IPv6Address.h>
TEST_CASE(should_default_contructor_with_0s)
TEST_CASE(should_default_constructor_with_0s)
{
constexpr IPv6Address addr {};

View file

@ -35,7 +35,7 @@ TEST_CASE(sorts_ascending)
}
}
TEST_CASE(sorts_decending)
TEST_CASE(sorts_descending)
{
srand(seed);

View file

@ -268,7 +268,7 @@ TEST_CASE(test_jpeg_sof0_several_scans_odd_number_mcu)
TRY_OR_FAIL(expect_single_frame_of_size(*plugin_decoder, { 600, 600 }));
}
TEST_CASE(test_jpeg_sof2_successive_aproximation)
TEST_CASE(test_jpeg_sof2_successive_approximation)
{
auto file = TRY_OR_FAIL(Core::MappedFile::map(TEST_INPUT("jpg/successive_approximation.jpg"sv)));
EXPECT(Gfx::JPEGImageDecoderPlugin::sniff(file->bytes()));
@ -846,7 +846,7 @@ TEST_CASE(test_webp_extended_lossless)
TEST_CASE(test_webp_simple_lossless_color_index_transform)
{
// In addition to testing the index transform, this file also tests handling of explicity setting max_symbol.
// In addition to testing the index transform, this file also tests handling of explicitly setting max_symbol.
auto file = TRY_OR_FAIL(Core::MappedFile::map(TEST_INPUT("webp/Qpalette.webp"sv)));
EXPECT(Gfx::WebPImageDecoderPlugin::sniff(file->bytes()));
auto plugin_decoder = TRY_OR_FAIL(Gfx::WebPImageDecoderPlugin::create(file->bytes()));

View file

@ -42,7 +42,7 @@ abstract class LadybirdServiceBase(protected val TAG: String) : Service() {
private fun handleTransferSockets(msg: Message) {
val bundle = msg.data
// FIXME: Handle garbage messages from wierd clients
// FIXME: Handle garbage messages from weird clients
val ipcSocket = bundle.getParcelable<ParcelFileDescriptor>("IPC_SOCKET")!!
createThread(ipcSocket)
}

View file

@ -59,7 +59,7 @@ struct HideCursor {
Optional<HideCursor> m_hidden_cursor;
// We have to send key events for modifer keys, but AppKit does not generate key down/up events when only a modifier
// We have to send key events for modifier keys, but AppKit does not generate key down/up events when only a modifier
// key is pressed. Instead, we only receive an event that the modifier flags have changed, and we must determine for
// ourselves whether the modifier key was pressed or released.
NSEventModifierFlags m_modifier_flags;

View file

@ -76,7 +76,7 @@ static ErrorOr<void> move_alpha_to_rgb(LoadedImage& image)
return Error::from_string_literal("Can't --move-alpha-to-rgb with invalid bitmaps");
case Gfx::BitmapFormat::RGBA8888:
// No image decoder currently produces bitmaps with this format.
// If that ever changes, preferrably fix the image decoder to use BGRA8888 instead :)
// If that ever changes, preferably fix the image decoder to use BGRA8888 instead :)
// If there's a good reason for not doing that, implement support for this, I suppose.
return Error::from_string_literal("--move-alpha-to-rgb not implemented for RGBA8888");
case Gfx::BitmapFormat::BGRA8888:
@ -105,7 +105,7 @@ static ErrorOr<void> strip_alpha(LoadedImage& image)
return Error::from_string_literal("Can't --strip-alpha with invalid bitmaps");
case Gfx::BitmapFormat::RGBA8888:
// No image decoder currently produces bitmaps with this format.
// If that ever changes, preferrably fix the image decoder to use BGRA8888 instead :)
// If that ever changes, preferably fix the image decoder to use BGRA8888 instead :)
// If there's a good reason for not doing that, implement support for this, I suppose.
return Error::from_string_literal("--strip-alpha not implemented for RGBA8888");
case Gfx::BitmapFormat::BGRA8888: