diff --git a/Libraries/LibWeb/CSS/TransitionEvent.cpp b/Libraries/LibWeb/CSS/TransitionEvent.cpp index 07cd590089fef..4609926af06d9 100644 --- a/Libraries/LibWeb/CSS/TransitionEvent.cpp +++ b/Libraries/LibWeb/CSS/TransitionEvent.cpp @@ -7,6 +7,7 @@ #include "TransitionEvent.h" #include #include +#include namespace Web::CSS { @@ -29,6 +30,7 @@ TransitionEvent::TransitionEvent(JS::Realm& realm, Utf16FlyString const& type, B , m_property_name(event_init.property_name) , m_elapsed_time(event_init.elapsed_time) , m_pseudo_element(event_init.pseudo_element) + , m_animation(event_init.animation) { } @@ -40,4 +42,10 @@ void TransitionEvent::initialize(JS::Realm& realm) Base::initialize(realm); } +void TransitionEvent::visit_edges(Cell::Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_animation); +} + } diff --git a/Libraries/LibWeb/CSS/TransitionEvent.h b/Libraries/LibWeb/CSS/TransitionEvent.h index be7a8683e8880..f3d6d2ac0d828 100644 --- a/Libraries/LibWeb/CSS/TransitionEvent.h +++ b/Libraries/LibWeb/CSS/TransitionEvent.h @@ -25,6 +25,9 @@ class TransitionEvent final : public DOM::Event { Utf16String const& property_name() const { return m_property_name; } double elapsed_time() const { return m_elapsed_time; } Utf16String const& pseudo_element() const { return m_pseudo_element; } + GC::Ptr animation() const { return m_animation; } + + virtual void visit_edges(Cell::Visitor&) override; private: TransitionEvent(JS::Realm&, Utf16FlyString const& event_name, Bindings::TransitionEventInit const& event_init); @@ -34,6 +37,7 @@ class TransitionEvent final : public DOM::Event { Utf16String m_property_name {}; double m_elapsed_time {}; Utf16String m_pseudo_element {}; + GC::Ptr m_animation; }; } diff --git a/Libraries/LibWeb/CSS/TransitionEvent.idl b/Libraries/LibWeb/CSS/TransitionEvent.idl index 915e0be64f81b..042f859f2ff0b 100644 --- a/Libraries/LibWeb/CSS/TransitionEvent.idl +++ b/Libraries/LibWeb/CSS/TransitionEvent.idl @@ -1,14 +1,25 @@ -// https://drafts.csswg.org/css-transitions/#transitionevent +// https://drafts.csswg.org/css-transitions-2/#interface-transitionevent-idl [Exposed=Window] interface TransitionEvent : Event { constructor([Utf16FlyString] Utf16CSSOMString type, optional TransitionEventInit transitionEventInitDict = {}); readonly attribute Utf16CSSOMString propertyName; readonly attribute double elapsedTime; readonly attribute Utf16CSSOMString pseudoElement; + readonly attribute CSSTransition? animation; }; +// https://drafts.csswg.org/css-transitions-2/#interface-transitionevent-idl dictionary TransitionEventInit : EventInit { Utf16CSSOMString propertyName = ""; double elapsedTime = 0.0; Utf16CSSOMString pseudoElement = ""; + CSSTransition? animation = null; +}; + +// https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl +partial interface mixin GlobalEventHandlers { + attribute EventHandler ontransitionrun; + attribute EventHandler ontransitionstart; + attribute EventHandler ontransitionend; + attribute EventHandler ontransitioncancel; }; diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 83941e01e871c..8e6b49945b02d 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -3909,6 +3909,7 @@ void Document::dispatch_events_for_transition(GC::Ref transi pseudo_element.has_value()) { event_init.pseudo_element = pseudo_element.release_value(); } + event_init.animation = transition; auto timeline = transition->timeline(); diff --git a/Libraries/LibWeb/DOM/Document.idl b/Libraries/LibWeb/DOM/Document.idl index bb03f9a271454..a3036915d3cee 100644 --- a/Libraries/LibWeb/DOM/Document.idl +++ b/Libraries/LibWeb/DOM/Document.idl @@ -125,8 +125,9 @@ interface Document : Node { [LegacyLenientThis] attribute EventHandler onreadystatechange; attribute EventHandler onvisibilitychange; - // https://drafts.csswg.org/css-view-transitions-1/#additions-to-document-api + // https://drafts.csswg.org/css-view-transitions-2/#additions-to-document-api [Experimental] ViewTransition startViewTransition(optional ViewTransitionUpdateCallback updateCallback); + [Experimental] readonly attribute ViewTransition? activeViewTransition; // https://w3c.github.io/svgwg/svg2-draft/struct.html#InterfaceDocumentExtensions readonly attribute SVGSVGElement? rootElement; diff --git a/Libraries/LibWeb/DOM/StyleElementBase.cpp b/Libraries/LibWeb/DOM/StyleElementBase.cpp index 97d0e25c91642..044d5997c035c 100644 --- a/Libraries/LibWeb/DOM/StyleElementBase.cpp +++ b/Libraries/LibWeb/DOM/StyleElementBase.cpp @@ -306,6 +306,33 @@ CSS::CSSStyleSheet const* StyleElementBase::sheet() const return m_associated_css_style_sheet; } +// https://html.spec.whatwg.org/multipage/semantics.html#dom-style-disabled +bool StyleElementBase::disabled() +{ + // 1. If this does not have an associated CSS style sheet, return false. + if (!sheet()) + return false; + + // 2. If this's associated CSS style sheet's disabled flag is set, return true. + if (sheet()->disabled()) + return true; + + // 3. Return false. + return false; +} + +// https://html.spec.whatwg.org/multipage/semantics.html#dom-style-disabled +void StyleElementBase::set_disabled(bool disabled) +{ + // 1. If this does not have an associated CSS style sheet, return. + if (!sheet()) + return; + + // 2. If the given value is true, set this's associated CSS style sheet's disabled flag. + // Otherwise, unset this's associated CSS style sheet's disabled flag. + sheet()->set_disabled(disabled); +} + void StyleElementBase::visit_style_element_edges(JS::Cell::Visitor& visitor) { visitor.visit(m_associated_css_style_sheet); diff --git a/Libraries/LibWeb/DOM/StyleElementBase.h b/Libraries/LibWeb/DOM/StyleElementBase.h index 0867c9b565db8..7475e0e83fcdc 100644 --- a/Libraries/LibWeb/DOM/StyleElementBase.h +++ b/Libraries/LibWeb/DOM/StyleElementBase.h @@ -33,6 +33,9 @@ class StyleElementBase { CSS::CSSStyleSheet* sheet(); CSS::CSSStyleSheet const* sheet() const; + bool disabled(); + void set_disabled(bool disabled); + [[nodiscard]] GC::Ptr style_sheet_list() { return m_style_sheet_list; } [[nodiscard]] GC::Ptr style_sheet_list() const { return m_style_sheet_list; } diff --git a/Libraries/LibWeb/HTML/AttributeNames.h b/Libraries/LibWeb/HTML/AttributeNames.h index ab8d305fe21ac..8f3c85f1e81e0 100644 --- a/Libraries/LibWeb/HTML/AttributeNames.h +++ b/Libraries/LibWeb/HTML/AttributeNames.h @@ -249,6 +249,10 @@ namespace AttributeNames { __ENUMERATE_HTML_ATTRIBUTE(onsuspend, "onsuspend") \ __ENUMERATE_HTML_ATTRIBUTE(ontimeupdate, "ontimeupdate") \ __ENUMERATE_HTML_ATTRIBUTE(ontoggle, "ontoggle") \ + __ENUMERATE_HTML_ATTRIBUTE(ontransitioncancel, "ontransitioncancel") \ + __ENUMERATE_HTML_ATTRIBUTE(ontransitionend, "ontransitionend") \ + __ENUMERATE_HTML_ATTRIBUTE(ontransitionrun, "ontransitionrun") \ + __ENUMERATE_HTML_ATTRIBUTE(ontransitionstart, "ontransitionstart") \ __ENUMERATE_HTML_ATTRIBUTE(onunhandledrejection, "onunhandledrejection") \ __ENUMERATE_HTML_ATTRIBUTE(onunload, "onunload") \ __ENUMERATE_HTML_ATTRIBUTE(onvolumechange, "onvolumechange") \ diff --git a/Libraries/LibWeb/HTML/GlobalEventHandlers.h b/Libraries/LibWeb/HTML/GlobalEventHandlers.h index 788bd99d8a677..1fd6279fdbaa8 100644 --- a/Libraries/LibWeb/HTML/GlobalEventHandlers.h +++ b/Libraries/LibWeb/HTML/GlobalEventHandlers.h @@ -99,6 +99,10 @@ E(onsuspend, HTML::EventNames::suspend) \ E(ontimeupdate, HTML::EventNames::timeupdate) \ E(ontoggle, HTML::EventNames::toggle) \ + E(ontransitioncancel, HTML::EventNames::transitioncancel) \ + E(ontransitionend, HTML::EventNames::transitionend) \ + E(ontransitionrun, HTML::EventNames::transitionrun) \ + E(ontransitionstart, HTML::EventNames::transitionstart) \ E(onvolumechange, HTML::EventNames::volumechange) \ E(onwaiting, HTML::EventNames::waiting) \ E(onwebkitanimationend, HTML::EventNames::webkitAnimationEnd) \ diff --git a/Libraries/LibWeb/HTML/HTMLStyleElement.cpp b/Libraries/LibWeb/HTML/HTMLStyleElement.cpp index cdbf4a550e3f2..01ef0e3106eba 100644 --- a/Libraries/LibWeb/HTML/HTMLStyleElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLStyleElement.cpp @@ -63,33 +63,6 @@ void HTMLStyleElement::attribute_changed(Utf16FlyString const& name, Optionaldisabled()) - return true; - - // 3. Return false. - return false; -} - -// https://html.spec.whatwg.org/multipage/semantics.html#dom-style-disabled -void HTMLStyleElement::set_disabled(bool disabled) -{ - // 1. If this does not have an associated CSS style sheet, return. - if (!sheet()) - return; - - // 2. If the given value is true, set this's associated CSS style sheet's disabled flag. - // Otherwise, unset this's associated CSS style sheet's disabled flag. - sheet()->set_disabled(disabled); -} - // https://html.spec.whatwg.org/multipage/semantics.html#contributes-a-script-blocking-style-sheet bool HTMLStyleElement::contributes_a_script_blocking_style_sheet() const { diff --git a/Libraries/LibWeb/HTML/HTMLStyleElement.h b/Libraries/LibWeb/HTML/HTMLStyleElement.h index f9c36c1c6f93f..a14bd26a05f10 100644 --- a/Libraries/LibWeb/HTML/HTMLStyleElement.h +++ b/Libraries/LibWeb/HTML/HTMLStyleElement.h @@ -26,9 +26,6 @@ class HTMLStyleElement final virtual void removed_from(IsSubtreeRoot, Node* old_ancestor, Node& old_root) override; virtual void attribute_changed(Utf16FlyString const& name, Optional const& old_value, Optional const& value, Optional const& namespace_) override; - bool disabled(); - void set_disabled(bool disabled); - virtual bool contributes_a_script_blocking_style_sheet() const final; private: diff --git a/Libraries/LibWeb/HTML/PopStateEvent.cpp b/Libraries/LibWeb/HTML/PopStateEvent.cpp index c76f24b894fd1..c46b8fe84ab67 100644 --- a/Libraries/LibWeb/HTML/PopStateEvent.cpp +++ b/Libraries/LibWeb/HTML/PopStateEvent.cpp @@ -27,6 +27,7 @@ GC::Ref PopStateEvent::construct_impl(JS::Realm& realm, Utf16FlyS PopStateEvent::PopStateEvent(JS::Realm& realm, Utf16FlyString const& event_name, Bindings::PopStateEventInit const& event_init) : DOM::Event(realm, event_name, event_init) , m_state(event_init.state) + , m_has_ua_visual_transition(event_init.has_ua_visual_transition) { } diff --git a/Libraries/LibWeb/HTML/PopStateEvent.h b/Libraries/LibWeb/HTML/PopStateEvent.h index 5d160f109f440..50c3aed632e0d 100644 --- a/Libraries/LibWeb/HTML/PopStateEvent.h +++ b/Libraries/LibWeb/HTML/PopStateEvent.h @@ -20,6 +20,7 @@ class PopStateEvent final : public DOM::Event { [[nodiscard]] static GC::Ref construct_impl(JS::Realm&, Utf16FlyString const& event_name, Bindings::PopStateEventInit const&); JS::Value const& state() const { return m_state; } + bool has_ua_visual_transition() const { return m_has_ua_visual_transition; } private: PopStateEvent(JS::Realm&, Utf16FlyString const& event_name, Bindings::PopStateEventInit const& event_init); @@ -28,6 +29,7 @@ class PopStateEvent final : public DOM::Event { virtual void visit_edges(JS::Cell::Visitor& visitor) override; JS::Value m_state { JS::js_null() }; + bool m_has_ua_visual_transition { false }; }; } diff --git a/Libraries/LibWeb/HTML/PopStateEvent.idl b/Libraries/LibWeb/HTML/PopStateEvent.idl index e99a2e5fa3c4a..ca246cbffe56f 100644 --- a/Libraries/LibWeb/HTML/PopStateEvent.idl +++ b/Libraries/LibWeb/HTML/PopStateEvent.idl @@ -4,10 +4,10 @@ interface PopStateEvent : Event { constructor([Utf16FlyString] Utf16DOMString type, optional PopStateEventInit eventInitDict = {}); readonly attribute any state; - [FIXME] readonly attribute boolean hasUAVisualTransition; + readonly attribute boolean hasUAVisualTransition; }; dictionary PopStateEventInit : EventInit { any state = null; - // FIXME: boolean hasUAVisualTransition = false; + boolean hasUAVisualTransition = false; }; diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Libraries/LibWeb/SVG/SVGSVGElement.cpp index 6535bb9e88cfb..963bc0f0bc60c 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.cpp +++ b/Libraries/LibWeb/SVG/SVGSVGElement.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -225,6 +226,12 @@ void SVGSVGElement::deselect_all() const selection->remove_all_ranges(); } +// https://w3c.github.io/svgwg/svg2-draft/struct.html#__svg__SVGSVGElement__createSVGNumber +GC::Ref SVGSVGElement::create_svg_number() const +{ + return SVGNumber::create(realm(), 0, SVGNumber::ReadOnly::No); +} + GC::Ref SVGSVGElement::create_svg_length() const { // A new, detached SVGLength object whose value is the unitless 0. diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.h b/Libraries/LibWeb/SVG/SVGSVGElement.h index 168f1fcfbcacc..b61c734d8c4c5 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.h +++ b/Libraries/LibWeb/SVG/SVGSVGElement.h @@ -65,6 +65,7 @@ class SVGSVGElement final : public SVGGraphicsElement void deselect_all() const; + GC::Ref create_svg_number() const; GC::Ref create_svg_length() const; GC::Ref create_svg_point() const; GC::Ref create_svg_matrix() const; diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.idl b/Libraries/LibWeb/SVG/SVGSVGElement.idl index d208c8dbb2d34..e24230221ff76 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.idl +++ b/Libraries/LibWeb/SVG/SVGSVGElement.idl @@ -16,7 +16,7 @@ interface SVGSVGElement : SVGGraphicsElement { undefined deselectAll(); - // FIXME: [NewObject] SVGNumber createSVGNumber(); + [NewObject] SVGNumber createSVGNumber(); [NewObject] SVGLength createSVGLength(); [FIXME, NewObject] SVGAngle createSVGAngle(); [NewObject] DOMPoint createSVGPoint(); diff --git a/Libraries/LibWeb/SVG/SVGStyleElement.idl b/Libraries/LibWeb/SVG/SVGStyleElement.idl index 98ad54eb8c334..3f246edb11ae1 100644 --- a/Libraries/LibWeb/SVG/SVGStyleElement.idl +++ b/Libraries/LibWeb/SVG/SVGStyleElement.idl @@ -3,7 +3,8 @@ interface SVGStyleElement : SVGElement { [Reflect] attribute Utf16DOMString media; [Reflect] attribute Utf16DOMString title; - + attribute boolean disabled; + // obsolete members [Reflect] attribute Utf16DOMString type; }; diff --git a/Libraries/LibWeb/UIEvents/InputEvent.cpp b/Libraries/LibWeb/UIEvents/InputEvent.cpp index 08edeaa831a6a..8ebe9b91c1fd7 100644 --- a/Libraries/LibWeb/UIEvents/InputEvent.cpp +++ b/Libraries/LibWeb/UIEvents/InputEvent.cpp @@ -6,6 +6,7 @@ #include #include +#include #include namespace Web::UIEvents { @@ -25,7 +26,7 @@ GC::Ref InputEvent::create_from_platform_event(JS::Realm& realm, Utf WebIDL::ExceptionOr> InputEvent::construct_impl(JS::Realm& realm, Utf16FlyString const& event_name, Bindings::InputEventInit const& event_init) { - return realm.create(realm, event_name, event_init); + return realm.create(realm, event_name, event_init, event_init.target_ranges); } InputEvent::InputEvent(JS::Realm& realm, Utf16FlyString const& event_name, Bindings::InputEventInit const& event_init, Vector> const& target_ranges) @@ -33,6 +34,7 @@ InputEvent::InputEvent(JS::Realm& realm, Utf16FlyString const& event_name, Bindi , m_data(event_init.data) , m_is_composing(event_init.is_composing) , m_input_type(event_init.input_type) + , m_data_transfer(event_init.data_transfer) , m_target_ranges(target_ranges) { } @@ -48,6 +50,7 @@ void InputEvent::initialize(JS::Realm& realm) void InputEvent::visit_edges(Visitor& visitor) { Base::visit_edges(visitor); + visitor.visit(m_data_transfer); visitor.visit(m_target_ranges); } diff --git a/Libraries/LibWeb/UIEvents/InputEvent.h b/Libraries/LibWeb/UIEvents/InputEvent.h index 1e804c3c1a50e..dcaf01a3e5a7c 100644 --- a/Libraries/LibWeb/UIEvents/InputEvent.h +++ b/Libraries/LibWeb/UIEvents/InputEvent.h @@ -30,6 +30,8 @@ class InputEvent final : public UIEvent { // https://w3c.github.io/uievents/#dom-inputevent-inputtype Utf16FlyString input_type() const { return m_input_type; } + GC::Ptr data_transfer() const { return m_data_transfer; } + ReadonlySpan> get_target_ranges() const; private: @@ -41,6 +43,7 @@ class InputEvent final : public UIEvent { Optional m_data; bool m_is_composing; Utf16FlyString m_input_type; + GC::Ptr m_data_transfer; Vector> m_target_ranges; }; diff --git a/Libraries/LibWeb/UIEvents/InputEvent.idl b/Libraries/LibWeb/UIEvents/InputEvent.idl index cc8e6fcd84209..db29cdf715726 100644 --- a/Libraries/LibWeb/UIEvents/InputEvent.idl +++ b/Libraries/LibWeb/UIEvents/InputEvent.idl @@ -6,6 +6,8 @@ interface InputEvent : UIEvent { readonly attribute boolean isComposing; readonly attribute Utf16DOMString inputType; + // https://w3c.github.io/input-events/#interface-InputEvent + readonly attribute DataTransfer? dataTransfer; sequence getTargetRanges(); }; @@ -14,4 +16,8 @@ dictionary InputEventInit : UIEventInit { Utf16DOMString? data = null; boolean isComposing = false; [Utf16FlyString] Utf16DOMString inputType = ""; + + // https://w3c.github.io/input-events/#interface-InputEvent + DataTransfer? dataTransfer = null; + sequence targetRanges = []; }; diff --git a/Tests/LibWeb/TestConfig.ini b/Tests/LibWeb/TestConfig.ini index 6cda669b04271..7ccc6bd35bfdb 100644 --- a/Tests/LibWeb/TestConfig.ini +++ b/Tests/LibWeb/TestConfig.ini @@ -138,10 +138,12 @@ Text/input/wpt-import/css/css-animations/idlharness.html Text/input/wpt-import/css/css-conditional/idlharness.html Text/input/wpt-import/css/css-counter-styles/idlharness.html Text/input/wpt-import/css/css-fonts/idlharness.html +Text/input/wpt-import/css/css-transitions/idlharness.html Text/input/wpt-import/css/css-typed-om/idlharness.html Text/input/wpt-import/css/cssom-view/idlharness.html Text/input/wpt-import/gamepad/idlharness.window.html Text/input/wpt-import/geolocation/idlharness.https.window.html +Text/input/wpt-import/input-events/idlharness.window.html Text/input/wpt-import/notifications/idlharness.https.any.html Text/input/wpt-import/permissions/idlharness.any.html Text/input/wpt-import/permissions/idlharness.any.worker.html diff --git a/Tests/LibWeb/Text/expected/SVG/svg-create-svg-number.txt b/Tests/LibWeb/Text/expected/SVG/svg-create-svg-number.txt new file mode 100644 index 0000000000000..1b0c2560c5e3f --- /dev/null +++ b/Tests/LibWeb/Text/expected/SVG/svg-create-svg-number.txt @@ -0,0 +1,4 @@ +is an SVGNumber: true +initial value: 0 +value after assignment: 12.5 +returns a new object each call: true diff --git a/Tests/LibWeb/Text/expected/SVG/svg-style-element-disabled.txt b/Tests/LibWeb/Text/expected/SVG/svg-style-element-disabled.txt new file mode 100644 index 0000000000000..527035e4245e7 --- /dev/null +++ b/Tests/LibWeb/Text/expected/SVG/svg-style-element-disabled.txt @@ -0,0 +1,6 @@ +disabled: false +fill: rgb(0, 128, 0) +disabled after disabling: true +fill after disabling: rgb(0, 0, 0) +disabled after enabling: false +fill after enabling: rgb(0, 128, 0) diff --git a/Tests/LibWeb/Text/expected/UIEvents/InputEvent-construction-target-ranges.txt b/Tests/LibWeb/Text/expected/UIEvents/InputEvent-construction-target-ranges.txt new file mode 100644 index 0000000000000..8cffc0d356449 --- /dev/null +++ b/Tests/LibWeb/Text/expected/UIEvents/InputEvent-construction-target-ranges.txt @@ -0,0 +1,6 @@ +range count: 1 +start container is the text node: true +start offset: 1 +end offset: 3 +collapsed: false +range count without targetRanges: 0 diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/events-008.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/events-008.txt new file mode 100644 index 0000000000000..bd507d652d087 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/events-008.txt @@ -0,0 +1,8 @@ +Harness status: OK + +Found 3 tests + +3 Pass +Pass transitionrun event has animation property and its value is the corresponding CSSTransition object +Pass transitionstart event has animation property and its value is the corresponding CSSTransition object +Pass transitionend event has animation property and its value is the corresponding CSSTransition object \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/idlharness.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/idlharness.txt new file mode 100644 index 0000000000000..55e88d4959a50 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/idlharness.txt @@ -0,0 +1,69 @@ +Harness status: OK + +Found 64 tests + +64 Pass +Pass idl_test setup +Pass idl_test validation +Pass Partial interface mixin GlobalEventHandlers: original interface mixin defined +Pass Partial interface mixin GlobalEventHandlers: member names are unique +Pass Partial interface Document: member names are unique +Pass Partial interface Element: member names are unique +Pass Partial interface Document[2]: member names are unique +Pass Partial interface Window: member names are unique +Pass Document includes GlobalEventHandlers: member names are unique +Pass HTMLElement includes GlobalEventHandlers: member names are unique +Pass HTMLElement includes ElementContentEditable: member names are unique +Pass HTMLElement includes HTMLOrSVGElement: member names are unique +Pass Window includes GlobalEventHandlers: member names are unique +Pass Window includes WindowEventHandlers: member names are unique +Pass Window includes WindowOrWorkerGlobalScope: member names are unique +Pass Window includes AnimationFrameProvider: member names are unique +Pass Window includes WindowSessionStorage: member names are unique +Pass Window includes WindowLocalStorage: member names are unique +Pass Document includes NonElementParentNode: member names are unique +Pass Document includes DocumentOrShadowRoot: member names are unique +Pass Document includes ParentNode: member names are unique +Pass Element includes ParentNode: member names are unique +Pass Element includes NonDocumentTypeChildNode: member names are unique +Pass Element includes ChildNode: member names are unique +Pass Element includes Slottable: member names are unique +Pass Document includes XPathEvaluatorBase: member names are unique +Pass TransitionEvent interface: existence and properties of interface object +Pass TransitionEvent interface object length +Pass TransitionEvent interface object name +Pass TransitionEvent interface: existence and properties of interface prototype object +Pass TransitionEvent interface: existence and properties of interface prototype object's "constructor" property +Pass TransitionEvent interface: existence and properties of interface prototype object's @@unscopables property +Pass TransitionEvent interface: attribute propertyName +Pass TransitionEvent interface: attribute elapsedTime +Pass TransitionEvent interface: attribute pseudoElement +Pass TransitionEvent must be primary interface of new TransitionEvent("transitionend") +Pass Stringification of new TransitionEvent("transitionend") +Pass TransitionEvent interface: new TransitionEvent("transitionend") must inherit property "propertyName" with the proper type +Pass TransitionEvent interface: new TransitionEvent("transitionend") must inherit property "elapsedTime" with the proper type +Pass TransitionEvent interface: new TransitionEvent("transitionend") must inherit property "pseudoElement" with the proper type +Pass HTMLElement interface: attribute ontransitionrun +Pass HTMLElement interface: attribute ontransitionstart +Pass HTMLElement interface: attribute ontransitionend +Pass HTMLElement interface: attribute ontransitioncancel +Pass HTMLElement interface: document must inherit property "ontransitionrun" with the proper type +Pass HTMLElement interface: document must inherit property "ontransitionstart" with the proper type +Pass HTMLElement interface: document must inherit property "ontransitionend" with the proper type +Pass HTMLElement interface: document must inherit property "ontransitioncancel" with the proper type +Pass Window interface: attribute ontransitionrun +Pass Window interface: attribute ontransitionstart +Pass Window interface: attribute ontransitionend +Pass Window interface: attribute ontransitioncancel +Pass Window interface: window must inherit property "ontransitionrun" with the proper type +Pass Window interface: window must inherit property "ontransitionstart" with the proper type +Pass Window interface: window must inherit property "ontransitionend" with the proper type +Pass Window interface: window must inherit property "ontransitioncancel" with the proper type +Pass Document interface: attribute ontransitionrun +Pass Document interface: attribute ontransitionstart +Pass Document interface: attribute ontransitionend +Pass Document interface: attribute ontransitioncancel +Pass Document interface: document must inherit property "ontransitionrun" with the proper type +Pass Document interface: document must inherit property "ontransitionstart" with the proper type +Pass Document interface: document must inherit property "ontransitionend" with the proper type +Pass Document interface: document must inherit property "ontransitioncancel" with the proper type \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/transitionevent-interface.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/transitionevent-interface.txt index c9d096d381234..3e3fb7483556f 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/transitionevent-interface.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transitions/transitionevent-interface.txt @@ -1,8 +1,8 @@ Harness status: OK -Found 41 tests +Found 42 tests -41 Pass +42 Pass Pass the event is an instance of TransitionEvent Pass the event inherts from Event Pass Missing type argument @@ -43,4 +43,5 @@ Pass elapsedTime cannot be set to -Infinity Pass elapsedTime cannot be set to 'sample' Pass elapsedTime cannot be set to [0.5, 1.0] Pass elapsedTime cannot be set to an object -Pass TransitionEventInit properties set value \ No newline at end of file +Pass TransitionEventInit properties set value +Pass TransitionEventInit animation property sets value \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-view-transitions/document-active-view-transition.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-view-transitions/document-active-view-transition.txt new file mode 100644 index 0000000000000..66aae458d7823 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-view-transitions/document-active-view-transition.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Pass +Pass document.activeViewTransition returns the active transition \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/browsing-the-web/history-traversal/PopStateEvent.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/browsing-the-web/history-traversal/PopStateEvent.txt new file mode 100644 index 0000000000000..99d345f302b87 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/browsing-the-web/history-traversal/PopStateEvent.txt @@ -0,0 +1,10 @@ +Harness status: OK + +Found 5 tests + +5 Pass +Pass PopStateEvent constructor called as normal function +Pass initPopStateEvent +Pass Initial value of PopStateEvent.state must be null +Pass Initial value of PopStateEvent.hasUAVisualTransition must be false +Pass Dispatching a synthetic PopStateEvent \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/input-events/idlharness.window.txt b/Tests/LibWeb/Text/expected/wpt-import/input-events/idlharness.window.txt new file mode 100644 index 0000000000000..26c5de39b5a75 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/input-events/idlharness.window.txt @@ -0,0 +1,18 @@ +Harness status: OK + +Found 13 tests + +13 Pass +Pass idl_test setup +Pass idl_test validation +Pass Partial interface InputEvent: original interface defined +Pass Partial interface InputEvent: member names are unique +Pass Partial dictionary InputEventInit: original dictionary defined +Pass Partial dictionary InputEventInit: member names are unique +Pass Partial interface UIEvent: member names are unique +Pass Partial interface UIEvent[2]: member names are unique +Pass Partial dictionary UIEventInit: member names are unique +Pass InputEvent interface: attribute dataTransfer +Pass InputEvent interface: operation getTargetRanges() +Pass InputEvent interface: new InputEvent("foo") must inherit property "dataTransfer" with the proper type +Pass InputEvent interface: new InputEvent("foo") must inherit property "getTargetRanges()" with the proper type \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt index 33681d94946ec..9e22221231afb 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt @@ -2,8 +2,8 @@ Harness status: OK Found 1780 tests -1124 Pass -656 Fail +1131 Pass +649 Fail Pass idl_test setup Pass idl_test validation Pass Partial interface Document: original interface defined @@ -94,9 +94,9 @@ Pass SVGNumber interface: existence and properties of interface prototype object Pass SVGNumber interface: existence and properties of interface prototype object's "constructor" property Pass SVGNumber interface: existence and properties of interface prototype object's @@unscopables property Pass SVGNumber interface: attribute value -Fail SVGNumber must be primary interface of objects.svg.createSVGNumber() -Fail Stringification of objects.svg.createSVGNumber() -Fail SVGNumber interface: objects.svg.createSVGNumber() must inherit property "value" with the proper type +Pass SVGNumber must be primary interface of objects.svg.createSVGNumber() +Pass Stringification of objects.svg.createSVGNumber() +Pass SVGNumber interface: objects.svg.createSVGNumber() must inherit property "value" with the proper type Pass SVGLength interface: existence and properties of interface object Pass SVGLength interface object length Pass SVGLength interface object name @@ -417,7 +417,7 @@ Pass SVGSVGElement interface: operation getEnclosureList(DOMRectReadOnly, SVGEle Pass SVGSVGElement interface: operation checkIntersection(SVGElement, DOMRectReadOnly) Pass SVGSVGElement interface: operation checkEnclosure(SVGElement, DOMRectReadOnly) Pass SVGSVGElement interface: operation deselectAll() -Fail SVGSVGElement interface: operation createSVGNumber() +Pass SVGSVGElement interface: operation createSVGNumber() Pass SVGSVGElement interface: operation createSVGLength() Fail SVGSVGElement interface: operation createSVGAngle() Pass SVGSVGElement interface: operation createSVGPoint() @@ -454,7 +454,7 @@ Pass SVGSVGElement interface: calling checkIntersection(SVGElement, DOMRectReadO Pass SVGSVGElement interface: objects.svg must inherit property "checkEnclosure(SVGElement, DOMRectReadOnly)" with the proper type Pass SVGSVGElement interface: calling checkEnclosure(SVGElement, DOMRectReadOnly) on objects.svg with too few arguments must throw TypeError Pass SVGSVGElement interface: objects.svg must inherit property "deselectAll()" with the proper type -Fail SVGSVGElement interface: objects.svg must inherit property "createSVGNumber()" with the proper type +Pass SVGSVGElement interface: objects.svg must inherit property "createSVGNumber()" with the proper type Pass SVGSVGElement interface: objects.svg must inherit property "createSVGLength()" with the proper type Fail SVGSVGElement interface: objects.svg must inherit property "createSVGAngle()" with the proper type Pass SVGSVGElement interface: objects.svg must inherit property "createSVGPoint()" with the proper type @@ -670,13 +670,13 @@ Pass SVGStyleElement interface: existence and properties of interface prototype Pass SVGStyleElement interface: attribute type Pass SVGStyleElement interface: attribute media Pass SVGStyleElement interface: attribute title -Fail SVGStyleElement interface: attribute disabled +Pass SVGStyleElement interface: attribute disabled Pass SVGStyleElement must be primary interface of objects.style Pass Stringification of objects.style Pass SVGStyleElement interface: objects.style must inherit property "type" with the proper type Pass SVGStyleElement interface: objects.style must inherit property "media" with the proper type Pass SVGStyleElement interface: objects.style must inherit property "title" with the proper type -Fail SVGStyleElement interface: objects.style must inherit property "disabled" with the proper type +Pass SVGStyleElement interface: objects.style must inherit property "disabled" with the proper type Pass SVGElement interface: objects.style must inherit property "className" with the proper type Pass SVGElement interface: objects.style must inherit property "ownerSVGElement" with the proper type Pass SVGElement interface: objects.style must inherit property "viewportElement" with the proper type diff --git a/Tests/LibWeb/Text/input/SVG/svg-create-svg-number.html b/Tests/LibWeb/Text/input/SVG/svg-create-svg-number.html new file mode 100644 index 0000000000000..f8515e77702ee --- /dev/null +++ b/Tests/LibWeb/Text/input/SVG/svg-create-svg-number.html @@ -0,0 +1,17 @@ + + + diff --git a/Tests/LibWeb/Text/input/SVG/svg-style-element-disabled.html b/Tests/LibWeb/Text/input/SVG/svg-style-element-disabled.html new file mode 100644 index 0000000000000..cb06b3482774a --- /dev/null +++ b/Tests/LibWeb/Text/input/SVG/svg-style-element-disabled.html @@ -0,0 +1,25 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/UIEvents/InputEvent-construction-target-ranges.html b/Tests/LibWeb/Text/input/UIEvents/InputEvent-construction-target-ranges.html new file mode 100644 index 0000000000000..3dc7cab20b4b9 --- /dev/null +++ b/Tests/LibWeb/Text/input/UIEvents/InputEvent-construction-target-ranges.html @@ -0,0 +1,26 @@ + + +
hello
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/events-008.html b/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/events-008.html new file mode 100644 index 0000000000000..c65c58edb500e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/events-008.html @@ -0,0 +1,57 @@ + + + +CSS Transitions Test: TransitionEvent and animation property + + + + +
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/idlharness.html b/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/idlharness.html new file mode 100644 index 0000000000000..3bba058df513a --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/idlharness.html @@ -0,0 +1,24 @@ + +css-transitions IDL tests + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/transitionevent-interface.html b/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/transitionevent-interface.html index b72e21d50a883..e6faffdfb2348 100644 --- a/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/transitionevent-interface.html +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-transitions/transitionevent-interface.html @@ -5,7 +5,8 @@ - + +
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-view-transitions/document-active-view-transition.html b/Tests/LibWeb/Text/input/wpt-import/css/css-view-transitions/document-active-view-transition.html new file mode 100644 index 0000000000000..3e1707997d527 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-view-transitions/document-active-view-transition.html @@ -0,0 +1,47 @@ + + +View Transition: document.activeViewTransition attribute + + + + + + + + +
+ + diff --git a/Tests/LibWeb/Text/input/wpt-import/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html b/Tests/LibWeb/Text/input/wpt-import/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html new file mode 100644 index 0000000000000..d2cca1f73d7eb --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html @@ -0,0 +1,47 @@ + + +Synthetic popstate events + + +
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/input-events/idlharness.window.html b/Tests/LibWeb/Text/input/wpt-import/input-events/idlharness.window.html new file mode 100644 index 0000000000000..5f7fb97719d30 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/input-events/idlharness.window.html @@ -0,0 +1,9 @@ + + + + + + + +
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/input-events/idlharness.window.js b/Tests/LibWeb/Text/input/wpt-import/input-events/idlharness.window.js new file mode 100644 index 0000000000000..3a9a34837e889 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/input-events/idlharness.window.js @@ -0,0 +1,14 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +idl_test( + ['input-events'], + ['uievents', 'dom'], + idl_array => { + idl_array.add_objects({ + InputEvent: ['new InputEvent("foo")'], + }); + } +); diff --git a/Tests/LibWeb/Text/input/wpt-import/interfaces/css-transitions.idl b/Tests/LibWeb/Text/input/wpt-import/interfaces/css-transitions.idl new file mode 100644 index 0000000000000..00713629f1e29 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/interfaces/css-transitions.idl @@ -0,0 +1,25 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: CSS Transitions Module Level 1 (https://drafts.csswg.org/css-transitions-1/) + +[Exposed=Window] +interface TransitionEvent : Event { + constructor(CSSOMString type, optional TransitionEventInit transitionEventInitDict = {}); + readonly attribute CSSOMString propertyName; + readonly attribute double elapsedTime; + readonly attribute CSSOMString pseudoElement; +}; + +dictionary TransitionEventInit : EventInit { + CSSOMString propertyName = ""; + double elapsedTime = 0.0; + CSSOMString pseudoElement = ""; +}; + +partial interface mixin GlobalEventHandlers { + attribute EventHandler ontransitionrun; + attribute EventHandler ontransitionstart; + attribute EventHandler ontransitionend; + attribute EventHandler ontransitioncancel; +}; diff --git a/Tests/LibWeb/Text/input/wpt-import/interfaces/input-events.idl b/Tests/LibWeb/Text/input/wpt-import/interfaces/input-events.idl new file mode 100644 index 0000000000000..6a2147b93e640 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/interfaces/input-events.idl @@ -0,0 +1,14 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Input Events Level 2 (https://w3c.github.io/input-events/) + +partial interface InputEvent { + readonly attribute DataTransfer? dataTransfer; + sequence getTargetRanges(); +}; + +partial dictionary InputEventInit { + DataTransfer? dataTransfer = null; + sequence targetRanges = []; +};