From b609d8481a375d5ca84f87a782c4ca856f77adb7 Mon Sep 17 00:00:00 2001 From: zoupingshi Date: Sat, 22 Feb 2025 10:59:50 +0800 Subject: [PATCH] LibURL+LibWeb+Tests: Remove redundant words --- Libraries/LibURL/Parser.cpp | 2 +- Libraries/LibWeb/CSS/CSSStyleSheet.cpp | 2 +- Libraries/LibWeb/FileAPI/Blob.cpp | 2 +- Libraries/LibWeb/HTML/HTMLCanvasElement.cpp | 4 ++-- Tests/LibWeb/Text/input/wpt-import/resources/testdriver.js | 2 +- .../input/wpt-import/webaudio/resources/audionodeoptions.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Libraries/LibURL/Parser.cpp b/Libraries/LibURL/Parser.cpp index 21fd9bd7a98..57b19e0c96a 100644 --- a/Libraries/LibURL/Parser.cpp +++ b/Libraries/LibURL/Parser.cpp @@ -875,7 +875,7 @@ Optional Parser::basic_parse(StringView raw_input, Optional bas } // 6. Otherwise, if url is special, base is non-null, and base’s scheme is url’s scheme: else if (url->is_special() && base_url.has_value() && base_url->scheme() == url->m_data->scheme) { - // 1. Assert: base is is special (and therefore does not have an opaque path). + // 1. Assert: base is special (and therefore does not have an opaque path). VERIFY(base_url->is_special()); // 2. Set state to special relative or authority state. diff --git a/Libraries/LibWeb/CSS/CSSStyleSheet.cpp b/Libraries/LibWeb/CSS/CSSStyleSheet.cpp index 663d42bae9f..96d0bfef3b4 100644 --- a/Libraries/LibWeb/CSS/CSSStyleSheet.cpp +++ b/Libraries/LibWeb/CSS/CSSStyleSheet.cpp @@ -62,7 +62,7 @@ WebIDL::ExceptionOr> CSSStyleSheet::construct_impl(JS::Re // 6. Set sheet’s owner CSS rule to null. sheet->set_owner_css_rule(nullptr); - // 7. Set sheet’s title to the the empty string. + // 7. Set sheet’s title to the empty string. sheet->set_title(String {}); // 8. Unset sheet’s alternate flag. diff --git a/Libraries/LibWeb/FileAPI/Blob.cpp b/Libraries/LibWeb/FileAPI/Blob.cpp index be6be78afa3..bba0f83ecdf 100644 --- a/Libraries/LibWeb/FileAPI/Blob.cpp +++ b/Libraries/LibWeb/FileAPI/Blob.cpp @@ -36,7 +36,7 @@ GC::Ref Blob::create(JS::Realm& realm, ByteBuffer byte_buffer, String type // https://w3c.github.io/FileAPI/#convert-line-endings-to-native ErrorOr convert_line_endings_to_native(StringView string) { - // 1. Let native line ending be be the code point U+000A LF. + // 1. Let native line ending be the code point U+000A LF. auto native_line_ending = "\n"sv; // 2. If the underlying platform’s conventions are to represent newlines as a carriage return and line feed sequence, set native line ending to the code point U+000D CR followed by the code point U+000A LF. diff --git a/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp index 0b64f66c796..7334d9ba7ce 100644 --- a/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp @@ -317,7 +317,7 @@ static ErrorOr serialize_bitmap(Gfx::Bitmap const& bitmap // https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-todataurl String HTMLCanvasElement::to_data_url(StringView type, JS::Value quality) { - // It is possible the the canvas doesn't have a associated bitmap so create one + // It is possible the canvas doesn't have a associated bitmap so create one allocate_painting_surface_if_needed(); auto surface = this->surface(); auto size = bitmap_size_for_canvas(); @@ -357,7 +357,7 @@ String HTMLCanvasElement::to_data_url(StringView type, JS::Value quality) // https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-toblob WebIDL::ExceptionOr HTMLCanvasElement::to_blob(GC::Ref callback, StringView type, JS::Value quality) { - // It is possible the the canvas doesn't have a associated bitmap so create one + // It is possible the canvas doesn't have a associated bitmap so create one allocate_painting_surface_if_needed(); auto surface = this->surface(); auto size = bitmap_size_for_canvas(); diff --git a/Tests/LibWeb/Text/input/wpt-import/resources/testdriver.js b/Tests/LibWeb/Text/input/wpt-import/resources/testdriver.js index 2d1a89690cc..f2a1ebce80b 100644 --- a/Tests/LibWeb/Text/input/wpt-import/resources/testdriver.js +++ b/Tests/LibWeb/Text/input/wpt-import/resources/testdriver.js @@ -322,7 +322,7 @@ /** * Minimizes the browser window. * - * Matches the the behaviour of the `Minimize + * Matches the behaviour of the `Minimize * `_ * WebDriver command * diff --git a/Tests/LibWeb/Text/input/wpt-import/webaudio/resources/audionodeoptions.js b/Tests/LibWeb/Text/input/wpt-import/webaudio/resources/audionodeoptions.js index 3b7867cabf1..ef2dab672b3 100644 --- a/Tests/LibWeb/Text/input/wpt-import/webaudio/resources/audionodeoptions.js +++ b/Tests/LibWeb/Text/input/wpt-import/webaudio/resources/audionodeoptions.js @@ -104,7 +104,7 @@ function testAudioNodeOptions(should, context, nodeName, expectedNodeOptions) { .throw(DOMException, expectedNodeOptions.channelCountMode.exceptionType); } else { - // Test that explicitly setting the the fixed value is allowed. + // Test that explicitly setting the fixed value is allowed. should( () => { node = new window[nodeName](