Closed
Bug 854836
Opened 11 years ago
Closed 11 years ago
Changing a property of MouseEvent to be [Unforgeable] doesn't regenerate MouseEventBinding.cpp
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: smaug, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
https://bug637248.bugzilla.mozilla.org/attachment.cgi?id=729463 works with events which are Events, but if one creates for example MouseEvent, it is still possible to set .isTrusted.
![]() |
||
Comment 1•11 years ago
|
||
This should work. Note http://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py#674 And I just spot-checked that SVGDocumentBinding has the "location" bits in it... Olli, can you post the testcase you were using to test this?
![]() |
||
Comment 2•11 years ago
|
||
Note, though, that this will only work for objects that are actually on WebIDL bindings, which nsDOMMouseEvent doesn't seem to be; I don't see it calling SetIsDOMBinding() anywhere.
Comment 3•11 years ago
|
||
Just converting MouseEvent to WebIDL will fix the issue?
Reporter | ||
Comment 4•11 years ago
|
||
MouseEvent uses WebIDL
Reporter | ||
Comment 5•11 years ago
|
||
Testcase was (execute in web console) var e = new Event("foo"); e.isTrusted = true; e.isTrusted; vs. var e = new MouseEvent("foo"); e.isTrusted = true; e.isTrusted;
Reporter | ||
Comment 6•11 years ago
|
||
Looks like MouseEvent doesn't really have isTrusted when isTrusted is marked Unforgeable.
![]() |
||
Comment 7•11 years ago
|
||
The issue is that adding [Unforgeable] on Event doesn't recreate MouseEventBinding.cpp. Removing that file and building makes things work. It _also_ doesn't recreate UIEventBinding.cpp. This confuses me, becaise UIEventBinding.cpp.pp has: UIEventBinding.cpp: /Users/bzbarsky/mozilla/inbound/mozilla/dom/webidl/Event.webidl UIEventBinding.cpp: /Users/bzbarsky/mozilla/inbound/mozilla/dom/webidl/UIEvent.webidl Kyle, what's going on there? Seems like changing Event.webidl should rebuild UIEventBinding.cpp here!
Flags: needinfo?(khuey)
![]() |
||
Comment 8•11 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #7) > The issue is that adding [Unforgeable] on Event doesn't recreate > MouseEventBinding.cpp. Removing that file and building makes things work. Crazy question: is that with a parallel or non-parallel build? Does it work with the other kind of build?
![]() |
||
Comment 9•11 years ago
|
||
This is obviously a parallel build. ;) But doing it with MAKEFLAGS="" doesn't help.
Comment 10•11 years ago
|
||
Sometimes rebuilding dom/bindings doesn't update files correctly. Need a new bug?
![]() |
||
Comment 11•11 years ago
|
||
That's what this bug is about at the moment.
The build problems should be fixed now.
Flags: needinfo?(khuey)
Updated•11 years ago
|
Attachment #729536 -
Attachment is patch: false
Attachment #729536 -
Attachment mime type: text/plain → text/html
![]() |
||
Comment 13•11 years ago
|
||
I'm going to mark this worksforme, since it does.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Summary: [Unforgeable] doesn't unforgeable-ize properties in the instances of inheriting interfaces → Changing a property of MouseEvent to be [Unforgeable] doesn't regenerate MouseEventBinding.cpp
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•