Closed Bug 1437283 Opened 7 years ago Closed 7 years ago

aPreventDefault argument of sendCrossProcessKeyEvent is mis-handled (and unused)

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1134542

People

(Reporter: heycam, Assigned: heycam)

Details

Attachments

(3 obsolete files)

nsIFrameLoader.sendCrossProcessKeyEvent is used to dispatch a key event to a remote browser. It has an optional aPreventDefault argument, which isn't used. That argument's value ends up getting accidentally passed as the value of nsContentUtils::SendKeyEvent's aAdditionalFlags argument: https://searchfox.org/mozilla-central/rev/7ed2a637dc305e90fed6ffb041c6b8fa162b66bd/dom/ipc/TabChild.cpp#2142-2143 The actual aPreventDefault argument for nsContentUtils::SendKeyEvent is the last one, but anyway is an outparam into which is stored whether preventDefault() was called on the event. Since it's unused, let's clean up this mess by removing the argument altogether. That lets us do some other simplifications, since nsIDOMWindowUtils.sendKeyEvent is also unused.
Assignee: nobody → cam
Status: NEW → ASSIGNED
nsIDOMWindowUtils.sendKeyEvent is about to be removed. And I think the nsIFrameLoader variant too.
(In reply to Olli Pettay [:smaug] from comment #5) > nsIDOMWindowUtils.sendKeyEvent is about to be removed. Ah, I'm removing it too in the part 2 patch of this bug. :-) Feel free to dupe this bug against another one if it's already got patches for this.
I was thinking bug 1134542. Is there still more to do here?
No, that bug removes even more than I have here. I guess I must have forgotten / overlooked Masayuki's dev-platform mail about this!
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Attachment #8949993 - Attachment is obsolete: true
Attachment #8949993 - Flags: review?(bzbarsky)
Attachment #8949994 - Attachment is obsolete: true
Attachment #8949994 - Flags: review?(bzbarsky)
Attachment #8949995 - Attachment is obsolete: true
Attachment #8949995 - Flags: review?(bzbarsky)
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: