Closed Bug 1068037 Opened 10 years ago Closed 3 years ago

improve how nsPluginInstanceOwner registers to receive events

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jaas, Unassigned)

Details

Attachments

(1 file)

nsPluginInstanceOwner adds the following event listeners:

  mContent->AddEventListener(NS_LITERAL_STRING("focus"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("blur"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("mouseup"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("mousedown"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("mousemove"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("click"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("dblclick"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("mouseover"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("mouseout"), this, false, false);
  mContent->AddEventListener(NS_LITERAL_STRING("keypress"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("keydown"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("keyup"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("drop"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragdrop"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("drag"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragenter"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragover"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragleave"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragexit"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragstart"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("draggesture"), this, true);
  mContent->AddEventListener(NS_LITERAL_STRING("dragend"), this, true);

I was curious about why the difference between different events when it comes to the last two boolean arguments, relating to capture and untrusted events.

After talking to smaug, it seems like we should have all of these event registrations looking like this:

  mContent->AddSystemEventListener(NS_LITERAL_STRING("eventname"), this, false, false);

This means false for capture, false for untrusted events, and register as system event listener instead of default group.
Attached patch fix v1.0Splinter Review
Just saving my work, still need to test this.
Assignee: jaas → nobody
Resolving as wont fix, plugin support deprecated in Firefox 85.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: