mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
Everywhere: Fix typos - act III
This commit is contained in:
parent
5cc371d54c
commit
565a316c5f
14 changed files with 18 additions and 18 deletions
|
@ -416,7 +416,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()));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -390,7 +390,7 @@ UnsignedBigInteger::CompareResult SignedBigInteger::compare_to_double(double val
|
|||
// Now both bigint and value have the same sign, so let's compare our magnitudes.
|
||||
auto magnitudes_compare_result = m_unsigned_data.compare_to_double(fabs(value));
|
||||
|
||||
// If our mangnitudes are euqal, then we're equal.
|
||||
// If our magnitudes are equal, then we're equal.
|
||||
if (magnitudes_compare_result == UnsignedBigInteger::CompareResult::DoubleEqualsBigInt)
|
||||
return UnsignedBigInteger::CompareResult::DoubleEqualsBigInt;
|
||||
|
||||
|
|
|
@ -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]);
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ ThrowCompletionOr<Value> await(VM& vm, Value value)
|
|||
promise->perform_then(on_fulfilled, on_rejected, {});
|
||||
|
||||
// FIXME: Since we don't support context suspension, we attempt to "wait" for the promise to resolve
|
||||
// by syncronously running all queued promise jobs.
|
||||
// by synchronously running all queued promise jobs.
|
||||
if (auto* custom_data = vm.custom_data()) {
|
||||
// Embedder case (i.e. LibWeb). Runs all promise jobs by performing a microtask checkpoint.
|
||||
custom_data->spin_event_loop_until(GC::create_function(vm.heap(), [success] {
|
||||
|
|
|
@ -385,7 +385,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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue