diff --git a/Libraries/LibWeb/CSS/CSSAnimation.cpp b/Libraries/LibWeb/CSS/CSSAnimation.cpp index 3a431da28b5..19a66c2e86d 100644 --- a/Libraries/LibWeb/CSS/CSSAnimation.cpp +++ b/Libraries/LibWeb/CSS/CSSAnimation.cpp @@ -24,7 +24,7 @@ Optional CSSAnimation::class_specific_composite_order(GC::Ref(*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()); diff --git a/Libraries/LibWeb/EventTiming/PerformanceEventTiming.cpp b/Libraries/LibWeb/EventTiming/PerformanceEventTiming.cpp index 95e1f25f50b..cd0d3567d3e 100644 --- a/Libraries/LibWeb/EventTiming/PerformanceEventTiming.cpp +++ b/Libraries/LibWeb/EventTiming/PerformanceEventTiming.cpp @@ -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> 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 entry’s 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 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; diff --git a/Libraries/LibWeb/Geometry/DOMQuad.cpp b/Libraries/LibWeb/Geometry/DOMQuad.cpp index e77e0b4bb5a..09363637b01 100644 --- a/Libraries/LibWeb/Geometry/DOMQuad.cpp +++ b/Libraries/LibWeb/Geometry/DOMQuad.cpp @@ -103,17 +103,17 @@ GC::Ref DOMQuad::get_bounds() const } // https://drafts.fxtf.org/geometry/#structured-serialization -WebIDL::ExceptionOr DOMQuad::serialization_steps(HTML::SerializationRecord& serialzied, bool for_storage, HTML::SerializationMemory& memory) +WebIDL::ExceptionOr 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 value’s 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 value’s 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 value’s 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 value’s 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 {}; } diff --git a/Libraries/LibWeb/HTML/Canvas/CanvasPath.cpp b/Libraries/LibWeb/HTML/Canvas/CanvasPath.cpp index dac46083c51..22d34afd70a 100644 --- a/Libraries/LibWeb/HTML/Canvas/CanvasPath.cpp +++ b/Libraries/LibWeb/HTML/Canvas/CanvasPath.cpp @@ -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 }); diff --git a/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp index f6f3ab882a0..d6fb63f609e 100644 --- a/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp +++ b/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp @@ -263,10 +263,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); } diff --git a/Libraries/LibWeb/HTML/HTMLElement.cpp b/Libraries/LibWeb/HTML/HTMLElement.cpp index a19927021f4..1091597f656 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -1121,7 +1121,7 @@ WebIDL::ExceptionOr HTMLElement::check_popover_validity(ExpectedToBeShowin // - ignoreDomState is false and element is not connected; // - element's node document is not fully active; // - ignoreDomState is false and expectedDocument is not null and element's node document is not expectedDocument; - // - element is a dialog element and its is modal flage is set to true; or + // - element is a dialog element and its is modal flag is set to true; or // - FIXME: element's fullscreen flag is set, // then: // 3.1 If throwExceptions is true, then throw an "InvalidStateError" DOMException. diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index bff078f009d..7a63fa03c45 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -145,7 +145,7 @@ void HTMLInputElement::adjust_computed_style(CSS::ComputedProperties& 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(); @@ -2404,7 +2404,7 @@ WebIDL::ExceptionOr> HTMLInputElement::convert_string_to_date( } // https://html.spec.whatwg.org/multipage/input.html#concept-input-value-date-string -String HTMLInputElement::covert_date_to_string(GC::Ref input) const +String HTMLInputElement::convert_date_to_string(GC::Ref input) const { // https://html.spec.whatwg.org/multipage/input.html#date-state-(type=date):concept-input-value-date-string if (type_state() == TypeAttributeState::Date) { @@ -2420,7 +2420,7 @@ String HTMLInputElement::covert_date_to_string(GC::Ref input) const return convert_number_to_time_string(input->date_value()); } - dbgln("HTMLInputElement::covert_date_to_string() not implemented for input type {}", type()); + dbgln("HTMLInputElement::convert_date_to_string() not implemented for input type {}", type()); return {}; } @@ -2589,7 +2589,7 @@ WebIDL::ExceptionOr HTMLInputElement::set_value_as_date(Optional> convert_string_to_date(StringView input) const; - String covert_date_to_string(GC::Ref input) const; + String convert_date_to_string(GC::Ref input) const; Optional min() const; Optional max() const; diff --git a/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Libraries/LibWeb/HTML/HTMLMediaElement.cpp index 249e6a0fa4c..5043ccbad74 100644 --- a/Libraries/LibWeb/HTML/HTMLMediaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMediaElement.cpp @@ -637,11 +637,11 @@ public: { // 2. ⌛ Process candidate: If candidate does not have a src attribute, or if its src attribute's value is the // empty string, then end the synchronous section, and jump down to the failed with elements step below. - String candiate_src; + String candidate_src; if (auto maybe_src = m_candidate->get_attribute(HTML::AttributeNames::src); maybe_src.has_value()) - candiate_src = *maybe_src; + candidate_src = *maybe_src; - if (candiate_src.is_empty()) { + if (candidate_src.is_empty()) { TRY(failed_with_elements()); return {}; } @@ -649,7 +649,7 @@ public: // 3. ⌛ Let urlString and urlRecord be the resulting URL string and the resulting URL record, respectively, that // would have resulted from parsing the URL specified by candidate's src attribute's value relative to the // candidate's node document when the src attribute was last changed. - auto url_record = m_candidate->document().parse_url(candiate_src); + auto url_record = m_candidate->document().parse_url(candidate_src); // 4. ⌛ If urlString was not obtained successfully, then end the synchronous section, and jump down to the failed // with elements step below. diff --git a/Libraries/LibWeb/HTML/NavigateEvent.cpp b/Libraries/LibWeb/HTML/NavigateEvent.cpp index e14a05b001e..f61e4dc29f6 100644 --- a/Libraries/LibWeb/HTML/NavigateEvent.cpp +++ b/Libraries/LibWeb/HTML/NavigateEvent.cpp @@ -103,7 +103,7 @@ WebIDL::ExceptionOr 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"]. @@ -118,7 +118,7 @@ WebIDL::ExceptionOr 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"]. diff --git a/Libraries/LibWeb/HTML/NavigatorDeviceMemory.h b/Libraries/LibWeb/HTML/NavigatorDeviceMemory.h index 4a2615e7b93..83eca4e041e 100644 --- a/Libraries/LibWeb/HTML/NavigatorDeviceMemory.h +++ b/Libraries/LibWeb/HTML/NavigatorDeviceMemory.h @@ -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; diff --git a/Libraries/LibWeb/HTML/StructuredSerialize.cpp b/Libraries/LibWeb/HTML/StructuredSerialize.cpp index cb9cce76474..d9c26e23333 100644 --- a/Libraries/LibWeb/HTML/StructuredSerialize.cpp +++ b/Libraries/LibWeb/HTML/StructuredSerialize.cpp @@ -658,7 +658,7 @@ WebIDL::ExceptionOr serialize_viewed_array_buffer(JS::VM& vm, Vector& 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 diff --git a/Libraries/LibWeb/Layout/GridFormattingContext.cpp b/Libraries/LibWeb/Layout/GridFormattingContext.cpp index a1b5aabcbad..b3e8caf61e6 100644 --- a/Libraries/LibWeb/Layout/GridFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/GridFormattingContext.cpp @@ -1160,7 +1160,7 @@ void GridFormattingContext::expand_flexible_tracks(GridDimension 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 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)); @@ -2398,23 +2398,23 @@ 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 = item.maximum_size(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); - return min(result, maxium_size); + return min(result, maximum_size); } auto preferred_size = item.preferred_size(dimension); if (dimension == GridDimension::Column) { auto width = calculate_inner_width(item.box, m_available_space->width, preferred_size); - return min(item.add_margin_box_sizes(width, dimension), maxium_size); + return min(item.add_margin_box_sizes(width, dimension), maximum_size); } auto height = calculate_inner_height(item.box, *m_available_space, preferred_size); - return min(item.add_margin_box_sizes(height, dimension), maxium_size); + return min(item.add_margin_box_sizes(height, dimension), maximum_size); } CSSPixels GridFormattingContext::calculate_max_content_contribution(GridItem const& item, GridDimension dimension) const @@ -2427,21 +2427,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 = item.maximum_size(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 = item.preferred_size(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); - 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); - return min(result, maxium_size); + return min(result, maximum_size); } CSSPixels GridFormattingContext::calculate_limited_min_content_contribution(GridItem const& item, GridDimension dimension) const diff --git a/Libraries/LibWeb/Layout/TableFormattingContext.cpp b/Libraries/LibWeb/Layout/TableFormattingContext.cpp index c9e80f33522..c4277db4b66 100644 --- a/Libraries/LibWeb/Layout/TableFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/TableFormattingContext.cpp @@ -295,15 +295,15 @@ void TableFormattingContext::compute_intrinsic_percentage(size_t max_cell_span) // that the cell spans. If this gives a negative result, change it to 0%. // 3. Multiply by the ratio of the column’s non-spanning max-content width to the sum of the non-spanning max-content widths of all // columns spanned by the cell that have an intrinsic percentage width of the column based on cells of span up to N-1 equal to 0%. - CSSPixels ajusted_cell_contribution; + CSSPixels adjusted_cell_contribution; if (width_sum_of_columns_with_zero_intrinsic_percentage != 0) { - ajusted_cell_contribution = cell_contribution.scaled(rows_or_columns[rc_index].max_size / static_cast(width_sum_of_columns_with_zero_intrinsic_percentage)); + adjusted_cell_contribution = cell_contribution.scaled(rows_or_columns[rc_index].max_size / static_cast(width_sum_of_columns_with_zero_intrinsic_percentage)); } else { // However, if this ratio is undefined because the denominator is zero, instead use the 1 divided by the number of columns // spanned by the cell that have an intrinsic percentage width of the column based on cells of span up to N-1 equal to zero. - ajusted_cell_contribution = cell_contribution * 1 / number_of_columns_with_zero_intrinsic_percentage; + adjusted_cell_contribution = cell_contribution * 1 / number_of_columns_with_zero_intrinsic_percentage; } - intrinsic_percentage_contribution_by_index[rc_index] = max(static_cast(ajusted_cell_contribution), intrinsic_percentage_contribution_by_index[rc_index]); + intrinsic_percentage_contribution_by_index[rc_index] = max(static_cast(adjusted_cell_contribution), intrinsic_percentage_contribution_by_index[rc_index]); } } for (size_t rc_index = 0; rc_index < rows_or_columns.size(); ++rc_index) { diff --git a/Libraries/LibWeb/MediaCapabilitiesAPI/MediaCapabilities.cpp b/Libraries/LibWeb/MediaCapabilitiesAPI/MediaCapabilities.cpp index b958b635fe3..e229d4e3bee 100644 --- a/Libraries/LibWeb/MediaCapabilitiesAPI/MediaCapabilities.cpp +++ b/Libraries/LibWeb/MediaCapabilitiesAPI/MediaCapabilities.cpp @@ -238,7 +238,7 @@ GC::Ref MediaCapabilitiesDecodingInfo::to_object(JS::Realm& realm) MUST(object->create_data_property("supported"_fly_string, JS::BooleanObject::create(realm, supported))); MUST(object->create_data_property("smooth"_fly_string, JS::BooleanObject::create(realm, smooth))); - MUST(object->create_data_property("powerEfficent"_fly_string, JS::BooleanObject::create(realm, power_efficient))); + MUST(object->create_data_property("powerEfficient"_fly_string, JS::BooleanObject::create(realm, power_efficient))); return object; } diff --git a/Libraries/LibWeb/Painting/BorderPainting.cpp b/Libraries/LibWeb/Painting/BorderPainting.cpp index ec7fe534f07..bfb4848891f 100644 --- a/Libraries/LibWeb/Painting/BorderPainting.cpp +++ b/Libraries/LibWeb/Painting/BorderPainting.cpp @@ -213,7 +213,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( diff --git a/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp b/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp index 11103e7d7c9..9a6cd727e10 100644 --- a/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp +++ b/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp @@ -39,7 +39,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); }; diff --git a/Libraries/LibWeb/SVG/SVGElement.cpp b/Libraries/LibWeb/SVG/SVGElement.cpp index 45756e3b639..f7a8d26ad25 100644 --- a/Libraries/LibWeb/SVG/SVGElement.cpp +++ b/Libraries/LibWeb/SVG/SVGElement.cpp @@ -115,7 +115,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()) { diff --git a/Libraries/LibWeb/SVG/SVGUseElement.cpp b/Libraries/LibWeb/SVG/SVGUseElement.cpp index bcac845abdd..6e55ede6333 100644 --- a/Libraries/LibWeb/SVG/SVGUseElement.cpp +++ b/Libraries/LibWeb/SVG/SVGUseElement.cpp @@ -82,14 +82,14 @@ void SVGUseElement::process_the_url(Optional const& href) if (!m_href.has_value()) 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.has_value() || !m_href->fragment().has_value() || !is_referrenced_element_same_document()) { + if (!m_href.has_value() || !m_href->fragment().has_value() || !is_referenced_element_same_document()) { return; } @@ -139,7 +139,7 @@ GC::Ptr 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) diff --git a/Libraries/LibWeb/SVG/SVGUseElement.h b/Libraries/LibWeb/SVG/SVGUseElement.h index 7a1dea33859..d69a25e3b6e 100644 --- a/Libraries/LibWeb/SVG/SVGUseElement.h +++ b/Libraries/LibWeb/SVG/SVGUseElement.h @@ -57,7 +57,7 @@ private: GC::Ptr 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; diff --git a/Libraries/LibWeb/StorageAPI/StorageEndpoint.h b/Libraries/LibWeb/StorageAPI/StorageEndpoint.h index 450f0c32e2e..3f54c1bd771 100644 --- a/Libraries/LibWeb/StorageAPI/StorageEndpoint.h +++ b/Libraries/LibWeb/StorageAPI/StorageEndpoint.h @@ -25,7 +25,7 @@ struct StorageEndpoint { // https://storage.spec.whatwg.org/#storage-endpoint-types // A storage endpoint also has types, which is a set of storage types. - // NOTE: We do not implement this as a set as it is not neccessary in the current implementation. + // NOTE: We do not implement this as a set as it is not necessary in the current implementation. StorageType type; // https://storage.spec.whatwg.org/#storage-endpoint-quota diff --git a/Libraries/LibWeb/UIEvents/KeyboardEvent.cpp b/Libraries/LibWeb/UIEvents/KeyboardEvent.cpp index fda31a480fb..ab12ba49080 100644 --- a/Libraries/LibWeb/UIEvents/KeyboardEvent.cpp +++ b/Libraries/LibWeb/UIEvents/KeyboardEvent.cpp @@ -307,7 +307,7 @@ static ErrorOr 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; diff --git a/Libraries/LibWeb/WebAudio/ChannelSplitterNode.cpp b/Libraries/LibWeb/WebAudio/ChannelSplitterNode.cpp index e181a6b44bc..9d654a3722c 100644 --- a/Libraries/LibWeb/WebAudio/ChannelSplitterNode.cpp +++ b/Libraries/LibWeb/WebAudio/ChannelSplitterNode.cpp @@ -77,7 +77,7 @@ WebIDL::ExceptionOr ChannelSplitterNode::set_channel_count_mode(Bindings:: WebIDL::ExceptionOr ChannelSplitterNode::set_channel_interpretation(Bindings::ChannelInterpretation channel_interpretation) { // https://webaudio.github.io/web-audio-api/#audionode-channelinterpretation-constraints - // The channel intepretation can not be changed from "discrete" and a InvalidStateError exception MUST be thrown for any attempt to change the value. + // The channel interpretation can not be changed from "discrete" and a InvalidStateError exception MUST be thrown for any attempt to change the value. if (channel_interpretation != Bindings::ChannelInterpretation::Discrete) return WebIDL::InvalidStateError::create(realm(), "Channel interpretation must be 'discrete'"_string); diff --git a/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl b/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl index 96870119577..82636b16a1e 100644 --- a/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl +++ b/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl @@ -333,7 +333,7 @@ interface mixin WebGLRenderingContextBase { const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA; const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB; - // GetTexureParameter + // GetTextureParameter const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3; // HintMode diff --git a/Libraries/LibWeb/WebSockets/WebSocket.cpp b/Libraries/LibWeb/WebSockets/WebSocket.cpp index 35258f9bb3c..d4868bbb860 100644 --- a/Libraries/LibWeb/WebSockets/WebSocket.cpp +++ b/Libraries/LibWeb/WebSockets/WebSocket.cpp @@ -193,9 +193,9 @@ ErrorOr WebSocket::establish_web_socket_connection(URL::URL const& url_rec auto& window_or_worker = as(client.global_object()); auto origin_string = window_or_worker.origin().to_byte_string(); - Vector protcol_byte_strings; + Vector 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())); HTTP::HeaderMap additional_headers; @@ -213,7 +213,7 @@ ErrorOr WebSocket::establish_web_socket_connection(URL::URL const& url_rec additional_headers.set("Cookie", cookies.to_byte_string()); } - m_websocket = ResourceLoader::the().request_client().websocket_connect(url_record, origin_string, protcol_byte_strings, {}, additional_headers); + m_websocket = ResourceLoader::the().request_client().websocket_connect(url_record, origin_string, protocol_byte_strings, {}, additional_headers); m_websocket->on_open = [weak_this = make_weak_ptr()] { if (!weak_this) diff --git a/Libraries/LibWeb/Worker/WebWorkerClient.cpp b/Libraries/LibWeb/Worker/WebWorkerClient.cpp index c4a63fae79a..1778595ff39 100644 --- a/Libraries/LibWeb/Worker/WebWorkerClient.cpp +++ b/Libraries/LibWeb/Worker/WebWorkerClient.cpp @@ -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() diff --git a/Libraries/LibWebView/Application.cpp b/Libraries/LibWebView/Application.cpp index 8faee7a4ce3..3c5a448afc8 100644 --- a/Libraries/LibWebView/Application.cpp +++ b/Libraries/LibWebView/Application.cpp @@ -512,8 +512,8 @@ static void edit_dom_node(DevTools::TabDescription const& description, Applicati return; } - view->on_finshed_editing_dom_node = [&view = *view, on_complete = move(on_complete)](auto node_id) { - view.on_finshed_editing_dom_node = nullptr; + view->on_finished_editing_dom_node = [&view = *view, on_complete = move(on_complete)](auto node_id) { + view.on_finished_editing_dom_node = nullptr; if (node_id.has_value()) on_complete(*node_id); diff --git a/Libraries/LibWebView/ViewImplementation.cpp b/Libraries/LibWebView/ViewImplementation.cpp index 5d823ff0591..6c83ad5ac3d 100644 --- a/Libraries/LibWebView/ViewImplementation.cpp +++ b/Libraries/LibWebView/ViewImplementation.cpp @@ -688,7 +688,7 @@ NonnullRefPtr> ViewImplementation::take_screenshot(Sc auto promise = Core::Promise::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; @@ -720,7 +720,7 @@ NonnullRefPtr> ViewImplementation::take_dom_node_scre auto promise = Core::Promise::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; @@ -749,7 +749,7 @@ NonnullRefPtr> ViewImplementation::request_internal_page_i auto promise = Core::Promise::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; } diff --git a/Libraries/LibWebView/ViewImplementation.h b/Libraries/LibWebView/ViewImplementation.h index 5a60dcefdfd..d43bc370c47 100644 --- a/Libraries/LibWebView/ViewImplementation.h +++ b/Libraries/LibWebView/ViewImplementation.h @@ -201,7 +201,7 @@ public: Function on_received_accessibility_tree; Function on_received_hovered_node_id; Function on_dom_mutation_received; - Function const& node_id)> on_finshed_editing_dom_node; + Function const& node_id)> on_finished_editing_dom_node; Function on_received_dom_node_html; Function)> on_received_style_sheet_list; Function on_received_style_sheet_source; diff --git a/Libraries/LibWebView/WebContentClient.cpp b/Libraries/LibWebView/WebContentClient.cpp index ede5a7fadc2..ebffe484135 100644 --- a/Libraries/LibWebView/WebContentClient.cpp +++ b/Libraries/LibWebView/WebContentClient.cpp @@ -341,8 +341,8 @@ void WebContentClient::did_get_hovered_node_id(u64 page_id, Web::UniqueNodeID no void WebContentClient::did_finish_editing_dom_node(u64 page_id, Optional 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); } }