Closed Bug 1379728 Opened 8 years ago Closed 8 years ago

onclose event handler is buggy for HTML

Categories

(Core :: DOM: Core & HTML, enhancement)

53 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

This was added for HTML in bug 1322938, but the patches there added this bit to EventNameList.h: EVENT(close, eClose, EventNameType_HTML, eBasicEventClass) but left in place this bit: NON_IDL_EVENT(close, eWindowClose, EventNameType_XUL, eBasicEventClass) As a result, in nsContentUtils::InitializeEventTable we end up clobbering the former definition with the latter one, and the mType in the table ends up EventNameType_XUL, not EventNameType_HTML. This means "onclose" is not treated as an event handler attribute in HTML, which causes http://w3c-test.org/html/webappapis/scripting/events/event-handler-all-global-events.html to fail the "onclose" bits.
Attachment #8884973 - Flags: review?(bugs) → review+
Attachment #8884972 - Flags: review?(bugs) → review+
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/efa1a50149e5 part 1. Remove the double-definition of the 'close' event from EventNameList.h. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/e3bb0b805eca part 2. Add assertions to ensure we don't multiple-define events in our event name list. r=smaug
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: