Closed
Bug 346404
Opened 18 years ago
Closed 18 years ago
nsIDOMWindowInternal::Open doesn't tell when the window was diverted into the current tab
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: zeniko, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
2.11 KB,
patch
|
Biesinger
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
See bug 344808 comment #15 where we currently use the length of the window's session history (alternatively we probably could also have checked that current window is the new one's opener). Shouldn't there be cleaner way of doing this?
Assignee | ||
Comment 1•18 years ago
|
||
There's no reasonable way for Open() to report this that I can see. More importantly, since the diverting is completely under the control of the embeddor the embeddor has to track this itself. Core code has no idea that the load was diverted.
Assignee | ||
Comment 2•18 years ago
|
||
In a bit more detail: The nsIWindowProvider implementation does provide this information to the window watcher. But the window watcher has no way to report this information back to anyone (frozen API, etc). The two ways I see of dealing with that are either to somehow allow asking the window watcher to open a window _and_ do a reasonable load (with postdata, etc) in it or to introduce some semi-private APIs for docshell to handle window opening. Though see my comments in bug 344808.
Comment 3•18 years ago
|
||
option 3: special success return code
Assignee | ||
Comment 4•18 years ago
|
||
That's still an API change to window watcher.
Comment 5•18 years ago
|
||
the interface doesn't promise returning NS_OK always. although maybe that'd still be too risky for branch...
Assignee | ||
Comment 6•18 years ago
|
||
You're assuming that no one but us implements window watcher. If we change the window watcher IDL such that we have to make behavior changes to our window watcher impl to match, then we break anyone else's window watcher impl. One could argue that others should not be implementing it, but there's no reason for someone to not override the contract to, say, examine all window open calls and then call into the default impl by CID... If they're not _very_ careful, changing the meaning of retvals here could break them.
Assignee | ||
Comment 7•18 years ago
|
||
Note that once this is fixed we should fix the code that was added for bug 344808 accordingly. And I feel that we should fix this one way or another for Gecko 1.9 -- either propagate this information, or remove the code that depends on it being propagated from docshell. The latter would probably mean that we'd need to deprecate the nsIWebNavigation flag or something.
Flags: blocking1.9a2?
Assignee | ||
Comment 8•18 years ago
|
||
Bug 332182 adds some functionality that could be used here.
Depends on: 332182
Assignee | ||
Comment 9•18 years ago
|
||
Christian, what do you think? Too hacky?
Attachment #233938 -
Flags: review?(cbiesinger)
Comment 10•18 years ago
|
||
Comment on attachment 233938 [details] [diff] [review] Maybe something like this? I actually kinda like this :)
Attachment #233938 -
Flags: review?(cbiesinger) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #233938 -
Flags: superreview?(jst)
Comment 11•18 years ago
|
||
Comment on attachment 233938 [details] [diff] [review] Maybe something like this? sr=jst
Attachment #233938 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Updated•18 years ago
|
Assignee: nobody → bzbarsky
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 12•18 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Flags: blocking1.9a2?
Updated•5 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•