LibWeb: Fix typos - act II

This commit is contained in:
Viktor Szépe 2025-04-07 10:46:22 +00:00 committed by Sam Atkins
parent 86be8abfbf
commit 5cc371d54c
Notes: github-actions[bot] 2025-04-09 14:06:24 +00:00
30 changed files with 69 additions and 69 deletions

View file

@ -24,7 +24,7 @@ Optional<int> CSSAnimation::class_specific_composite_order(GC::Ref<Animations::A
{
auto other = GC::Ref { as<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

@ -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

@ -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);
}

View file

@ -1121,7 +1121,7 @@ WebIDL::ExceptionOr<bool> 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.

View file

@ -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<GC::Ptr<JS::Date>> 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<JS::Date> input) const
String HTMLInputElement::convert_date_to_string(GC::Ref<JS::Date> 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<JS::Date> 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<void> HTMLInputElement::set_value_as_date(Optional<GC::Root<
}
// otherwise, run the algorithm to convert a Date object to a string, as defined for that state, on the new value, and set the value of the element to the resulting string.
TRY(set_value(covert_date_to_string(date)));
TRY(set_value(convert_date_to_string(date)));
return {};
}

View file

@ -289,7 +289,7 @@ private:
String convert_number_to_string(double input) const;
WebIDL::ExceptionOr<GC::Ptr<JS::Date>> convert_string_to_date(StringView input) const;
String covert_date_to_string(GC::Ref<JS::Date> input) const;
String convert_date_to_string(GC::Ref<JS::Date> input) const;
Optional<double> min() const;
Optional<double> max() const;

View file

@ -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.

View file

@ -103,7 +103,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"].
@ -118,7 +118,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

@ -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<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));
@ -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

View file

@ -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 columns 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<double>(width_sum_of_columns_with_zero_intrinsic_percentage));
adjusted_cell_contribution = cell_contribution.scaled(rows_or_columns[rc_index].max_size / static_cast<double>(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<double>(ajusted_cell_contribution), intrinsic_percentage_contribution_by_index[rc_index]);
intrinsic_percentage_contribution_by_index[rc_index] = max(static_cast<double>(adjusted_cell_contribution), intrinsic_percentage_contribution_by_index[rc_index]);
}
}
for (size_t rc_index = 0; rc_index < rows_or_columns.size(); ++rc_index) {

View file

@ -238,7 +238,7 @@ GC::Ref<JS::Object> 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;
}

View file

@ -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(

View file

@ -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);
};

View file

@ -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()) {

View file

@ -82,14 +82,14 @@ void SVGUseElement::process_the_url(Optional<String> 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<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

@ -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

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

@ -77,7 +77,7 @@ WebIDL::ExceptionOr<void> ChannelSplitterNode::set_channel_count_mode(Bindings::
WebIDL::ExceptionOr<void> 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);

View file

@ -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

View file

@ -193,9 +193,9 @@ ErrorOr<void> WebSocket::establish_web_socket_connection(URL::URL const& url_rec
auto& window_or_worker = as<HTML::WindowOrWorkerGlobalScopeMixin>(client.global_object());
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()));
HTTP::HeaderMap additional_headers;
@ -213,7 +213,7 @@ ErrorOr<void> 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<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

@ -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);

View file

@ -688,7 +688,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;
@ -720,7 +720,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;
@ -749,7 +749,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

@ -201,7 +201,7 @@ public:
Function<void(JsonObject)> on_received_accessibility_tree;
Function<void(Web::UniqueNodeID)> on_received_hovered_node_id;
Function<void(Mutation)> on_dom_mutation_received;
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)> on_received_dom_node_html;
Function<void(Vector<Web::CSS::StyleSheetIdentifier>)> on_received_style_sheet_list;
Function<void(Web::CSS::StyleSheetIdentifier const&, URL::URL const&, String const&)> on_received_style_sheet_source;

View file

@ -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<Web::UniqueNodeID> 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);
}
}