Closed
Bug 160212
Opened 22 years ago
Closed 22 years ago
Embedding needs flag to distinguish popup windows (unrequested windows) from regular windows
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: moconnell, Assigned: ccarlen)
Details
(Keywords: topembed+)
Attachments
(2 files)
14.36 KB,
patch
|
mikepinkerton
:
review+
jst
:
superreview+
jesup
:
approval+
|
Details | Diff | Splinter Review |
2.69 KB,
application/octet-stream
|
Details |
Need a chrome flag to determine if a window being created in CreateChromeWindow in
CWindowCreator is for an unrequested window.
The purpose of distinguishing is two fold. First, does the window need to be built using
an embedding application native window (this window has controls on it for features
dealing with history, bookmarking, etc). Second, should the window be excluded from the
embedding applications URL history.
Other embedding applications (Chimera) accomplished a similar task by exposing a new
API in nsPIDomWindow.h. But this probably isn't the preferred solution.
Assignee | ||
Comment 1•22 years ago
|
||
Chimera uses the code feature added from bug 136985 to determine whether a
window is an unrequested pop-up. I want something so that we dont have to expose
something like nsIPIDomWindow in order for embeddors to know this. While the
chrome flags passed to CreateChromeWindow describe *what* sort of window to
create, that isn't enough. The embeddor needs to know the context of the window
being opened (as part of a load or timeout task) I would rather we have a way of
explicitly telling the impl of nsIWindowCreator that it's making an unrequested
pop-up. What I have in mind in this:
Have window watcher use nsIPIDOMWindow to determine whether the window it's
asking to be created thru nsIWindowCreator is an unrequested pop-up.
If so,
(1) add this as a bit in the chrome flags it passes to
nsIWindowCreator::CreateChromeWindow(). The problem here is that the flags are
defined in nsIWebBrowserChrome which is frozen. Adding new bits, as long as the
meaning of other bits is arguably OK.
(2) If window watcher determines that the window it's asking to be created is an
unrequested popup, it QI's the impl of nsIWindowCreator to a new iface
(nsIWindowCreator2) and calls its method CreateVilePopupWindow(), which most
embedding apps will want to consult a pref and refuse to create it. If the QI
fails, it just calls nsIWindowCreator::CreateChromeWindow and the embedding app
unknowingly creates the vile popup.
Opinions on how to deal with this?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 2•22 years ago
|
||
Patch which creates nsIWindowCreator2
Assignee | ||
Comment 3•22 years ago
|
||
Updated•22 years ago
|
Attachment #93575 -
Flags: review+
Comment 4•22 years ago
|
||
Comment on attachment 93575 [details] [diff] [review]
patch
r=pink
Assignee | ||
Comment 5•22 years ago
|
||
Changing summary and component because this is true for all platforms.
Component: Embedding: Mac → Embedding: APIs
OS: MacOS X → All
Hardware: Macintosh → All
Summary: Mac embedding needs flag to distinguish popup windows (unrequested windows) from regular windows → Embedding needs flag to distinguish popup windows (unrequested windows) from regular windows
Comment 6•22 years ago
|
||
Could we see this change attached as text file(s) here please?
Comment 7•22 years ago
|
||
jst, uh, no, because the resource changes are binary.
Comment 8•22 years ago
|
||
Oh, duh, I thought that was the patch <mehidesincornerfeelingstupid/>
Comment 9•22 years ago
|
||
Comment on attachment 93575 [details] [diff] [review]
patch
sr=jst
Attachment #93575 -
Flags: superreview+
Assignee | ||
Comment 10•22 years ago
|
||
Thanks, guys, for quick reviews :-)
Comment 11•22 years ago
|
||
Comment on attachment 93575 [details] [diff] [review]
patch
Approved for trunk AND branch. Change mozilla1.0.1+ to fixed1.0.1 when fixed
on branch.
Attachment #93575 -
Flags: approval+
Updated•22 years ago
|
Keywords: mozilla1.0.1+
Target Milestone: --- → mozilla1.0.1
Assignee | ||
Comment 13•22 years ago
|
||
Checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 14•22 years ago
|
||
mdunn: pls verify this as fixed on the 1.0 branch, then replace the "fixed1.0.1"
keyword, with "verified1.0.1". thanks!
Comment 16•22 years ago
|
||
marking as verified
Status: RESOLVED → VERIFIED
Keywords: fixed1.0.1 → verified1.0.1
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
•