[wpt-sync] Sync PR 63110 - HTML: fix event handlers and no browsing context
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63110 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63110
Details from upstream follow.
Anne van Kesteren <annevk@annevk.nl> wrote:
HTML: fix event handlers and no browsing context
The event handler IDL attribute setter is not affected by the lack of a browsing context. Determining the target of an event handler returns the event target itself unless it is a
bodyorframesetelement whose name is aWindowEventHandlersmember or in theWindow-reflecting body element event handler set, so for adivit never returns null.That is what implementations do, and
event-handler-attributes-windowless-body.htmlalready asserts as much for handlers that are not shadowed, on a windowlessbodyelement in aDOMParserdocument — so these two files currently contradict each other.Also:
- The content attribute body assigned to a local variable of
run_checksthat it cannot see, so the handler running would have gone unnoticed.new Document()is an XML document, soinnerHTMLused the XML fragment parsing algorithm and left thedivin no namespace, where it has noonclickIDL attribute at all.Follow-up to #56715, see https://github.com/whatwg/html/issues/12014.
/cc @zcorpan
| Assignee | ||
Comment 1•1 month ago
|
||
PR 63110 applied with additional changes from upstream: e6ba3d7abea784a1f03347bccaad76e7a6347eae
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=99416
| Assignee | ||
Comment 3•1 month ago
|
||
CI Results
Ran 8 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 51 tests and 1 subtests
Status Summary
Firefox
OK : 1[GitHub] 48[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 49[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt] 50[Gecko-linux2404-64-debug] 51[Gecko-android-em-14-x86_64-debug-geckoview]
PASS : 1194[Gecko-android-em-14-x86_64-lite-opt-geckoview] 1195[Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 1328[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt] 1463[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug]
FAIL : 3[GitHub] 29[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 30[Gecko-android-em-14-x86_64-opt-geckoview] 31[Gecko-android-em-14-x86_64-lite-opt-geckoview] 35[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt] 39[Gecko-linux2404-64-debug] 40[Gecko-android-em-14-x86_64-debug-geckoview]
ERROR: 1[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt] 2[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug]
Chrome
OK : 1
FAIL : 3
Safari
OK : 1
FAIL : 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/webappapis/scripting/events/event-handler-onmove-02.tentative.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview],SKIP[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]- Window move event:
FAIL
- Window move event:
- /html/webappapis/scripting/events/compile-event-handler-settings-objects.html [wpt.fyi]
- The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document:
FAIL[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-opt],PASS[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug]
- The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document:
- /html/webappapis/scripting/events/event-handler-attributes-body-alt.html [wpt.fyi]
- shadowed pagereveal (document.createElement("body")):
FAIL - shadowed pageswap (document.createElement("body")):
FAIL - shadowed pagereveal removal (document.createElement("body")):
FAIL - shadowed pageswap removal (document.createElement("body")):
FAIL
- shadowed pagereveal (document.createElement("body")):
- /html/webappapis/scripting/events/event-handler-attributes-body-window.html [wpt.fyi]:
ERROR[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-linux2404-64-debug]- shadowed pagereveal (document.body):
FAIL - shadowed pageswap (document.body):
FAIL - shadowed pagereveal removal (document.body):
FAIL - shadowed pageswap removal (document.body):
FAIL - shadowed pageswap on body fires when event dispatched on window:
FAIL
- shadowed pagereveal (document.body):
- /html/webappapis/scripting/events/event-handler-attributes-frameset-alt.html [wpt.fyi]
- shadowed pagereveal (document.createElement("frameset")):
FAIL - shadowed pageswap (document.createElement("frameset")):
FAIL - shadowed pagereveal removal (document.createElement("frameset")):
FAIL - shadowed pageswap removal (document.createElement("frameset")):
FAIL
- shadowed pagereveal (document.createElement("frameset")):
- /html/webappapis/scripting/events/event-handler-attributes-frameset-window.html [wpt.fyi]:
ERROR[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug],OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-opt]- shadowed pagereveal (document.body):
FAIL - shadowed pageswap (document.body):
FAIL - shadowed pagereveal removal (document.body):
FAIL - shadowed pageswap removal (document.body):
FAIL - shadowed pageswap on body fires when event dispatched on window:
FAIL
- shadowed pagereveal (document.body):
- /html/webappapis/scripting/events/event-handler-attributes-no-bc.html [wpt.fyi]
- template contents:
FAIL(Chrome:FAIL, Safari:FAIL) - new Document():
FAIL(Chrome:FAIL, Safari:FAIL) - DOMParser():
FAIL(Chrome:FAIL, Safari:FAIL)
- template contents:
- /html/webappapis/scripting/events/event-handler-attributes-window-frameset.html [wpt.fyi]
- shadowed pagereveal (window):
FAIL - shadowed pageswap (window):
FAIL - shadowed pagereveal removal (window):
FAIL - shadowed pageswap removal (window):
FAIL
- shadowed pagereveal (window):
- /html/webappapis/scripting/events/event-handler-attributes-window.html [wpt.fyi]
- shadowed pagereveal (window):
FAIL - shadowed pageswap (window):
FAIL - shadowed pagereveal removal (window):
FAIL - shadowed pageswap removal (window):
FAIL
- shadowed pagereveal (window):
- /html/webappapis/scripting/events/event-handler-attributes-windowless-body.html [wpt.fyi]
- Return null when getting the pagereveal event handler of a windowless body:
FAIL - Ignore setting of pagereveal window event handlers on windowless body:
FAIL - Return null when getting the pageswap event handler of a windowless body:
FAIL - Ignore setting of pageswap window event handlers on windowless body:
FAIL - Return null when getting the pagereveal event handler of a windowless frameset:
FAIL - Ignore setting of pagereveal window event handlers on windowless frameset:
FAIL - Return null when getting the pageswap event handler of a windowless frameset:
FAIL - Ignore setting of pageswap window event handlers on windowless frameset:
FAIL
- Return null when getting the pagereveal event handler of a windowless body:
- /html/webappapis/scripting/events/event-handler-onmove-01.tentative.html [wpt.fyi]
- Window move event:
FAIL
- Window move event:
- /html/webappapis/scripting/events/event-handler-removal.window.html [wpt.fyi]
- Event handler set through content attribute should be re-activated even if content is the same.:
FAIL
- Event handler set through content attribute should be re-activated even if content is the same.:
Tests Disabled in Gecko Infrastructure
- /html/webappapis/scripting/events/event-handler-onmove-02.tentative.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview],SKIP[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
Description
•