Closed
Bug 60489
Opened 25 years ago
Closed 25 years ago
Context menu notifications do not get received from subframes
Categories
(Core Graveyard :: Embedding: APIs, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: adamlock, Assigned: adamlock)
Details
Attachments
(1 file)
This means the context menu listener interface does not call out to the embedder
when the user clicks inside <FRAME> and <IFRAME> sections. This appears to be a
DOM event bubbling issue (i.e DOM events do not bubble up from a frame to it's
parent frame unless the parent is chrome).
I have a patch for this problem, but I'm reworking it to use the new window
root object so I can add chrome DOM event listeners that don't get blown away
every time the document is changed.
Comment 3•25 years ago
|
||
I think we should just add an API to nsPIDOMWindow called GetWindowRoot, e.g.,
NS_IMETHOD GetWindowRoot(nsIWindowRoot** aResult)=0;
Then it could contain all of this code you had to write. I envision you (and
others) having to get the window root often, so we really should move that into
a simple function that can be invoked from any DOM window.
+ nsCOMPtr<nsIDOMWindow> domWindow;
+ mWebBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
+ NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE);
+
+ nsCOMPtr<nsPIDOMWindow> domWindowPrivate = do_QueryInterface(domWindow);
+ NS_ENSURE_TRUE(domWindowPrivate, NS_ERROR_FAILURE);
+ nsCOMPtr<nsIDOMWindowInternal> rootWindow;
+ domWindowPrivate->GetPrivateRoot(getter_AddRefs(rootWindow));
+ NS_ENSURE_TRUE(rootWindow, NS_ERROR_FAILURE);
+ nsCOMPtr<nsIChromeEventHandler> chromeHandler;
+ nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(rootWindow));
+ piWin->GetChromeEventHandler(getter_AddRefs(chromeHandler));
+ NS_ENSURE_TRUE(chromeHandler, NS_ERROR_FAILURE);
The code above could then be used as the body of the function.
sr=hyatt. Changes checked in without the new helper method.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 6•24 years ago
|
||
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•