Note: There are a few cases of duplicates in user autocompletion which are being worked on.

nsIWebBrowser needs to be root of all embedding listener registration

VERIFIED FIXED in mozilla0.9

Status

()

Core
Embedding: APIs
P1
normal
VERIFIED FIXED
17 years ago
16 years ago

People

(Reporter: Judson Valeski, Assigned: Judson Valeski)

Tracking

({embed})

Trunk
mozilla0.9
x86
Windows 98
embed
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3-])

Attachments

(1 attachment)

(Assignee)

Description

17 years ago
addWebBrowserListener should be the common listener registration location.

nsIWebProgressListener, nsIURIContentListener, etc.
(Assignee)

Updated

17 years ago
Keywords: embed

Updated

17 years ago
Keywords: nsbeta3
(Assignee)

Updated

17 years ago
Whiteboard: [nsbeta3+]
(Assignee)

Updated

17 years ago
Target Milestone: --- → M18
(Assignee)

Updated

17 years ago
Priority: P3 → P1

Comment 1

17 years ago
per email with Jud, changing nsbeta3+ to nsbeta3- on all "embed" keyword bugs
since embedding changes will not be made in the mn6 branch. If you feel this bug
fix needs to go into mn6 branch, please list the reasons/user impact/risk and
nominate for rtm. Thanks.
Whiteboard: [nsbeta3+] → [nsbeta3-]
(Assignee)

Updated

17 years ago
Target Milestone: M18 → mozilla0.6
(Assignee)

Updated

17 years ago
Target Milestone: mozilla0.6 → mozilla0.8

Comment 2

17 years ago
Updating QA Contact
QA Contact: jrgm → mdunn
(Assignee)

Updated

17 years ago
Blocks: 64833
(Assignee)

Comment 3

17 years ago
I've pulled out the old, unused registration impl, and added the new one (as 
discussed in npm.embedding -> "nsIWebBrowser" in the subject). nsWebBrowser no 
longer supports nsIWebProgress. My only concern here is that people are using 
nsWebBrowser's GetDOMWindow() method (which is part of nsIWebProgress). I see 
two potential use problems.

1. nsWebBrowser, as a nsIWebProgress, is being passed around in 
nsIWebProgressListener callbacks. Those callbacks then use GetDOMWindow().
2. People are QI'ing nsWebBrowser for nsIWebProgress and directly using 
GetDOMWindow().

I think #2 is easy to fix, as you can get a nsIDOMWindow off of nsIWebBrowser 
itself. #1 seems hard, but is only an issue if nsWebBrowser is ever registered 
as a nsIWebProgress (which it currently is not).

attatching patch.
(Assignee)

Comment 4

17 years ago
Created attachment 22812 [details] [diff] [review]
new listener registration iface + impl.
(Assignee)

Comment 5

17 years ago
after poking around a bit more, nsWebBrowser doesn't register itself as a 
progress listener, so I suspect I'm in the clear (unless someone's using it 
internally as a listener :-/); thoughts?

All the current GetDOMWindow() calls are done inside a webprogresslistener 
callback for usage case #2 isn't an issue.

Comment 6

17 years ago
This patch looks great... (r=rpotts) or (sr=rpotts) - whichever you want :-)

-- rick
(Assignee)

Comment 7

17 years ago
fix is in.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 8

17 years ago
Verified fixed -- source changed
Status: RESOLVED → VERIFIED
(Assignee)

Comment 9

17 years ago
reopening. change of direction here. the singleton listeners should still
register using the Add|Remove listener methods on nsIWebBrowser. The multi
listener semantics can be mainted by maintaining a list of registered listeners
in the nsWebBrowser impl. The nsWebBrowser would make itself a singleton
listener when necessary, and fan out the listener callbacks to multiple
listeners if necessary.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

17 years ago
Target Milestone: mozilla0.8 → mozilla0.9
(Assignee)

Updated

17 years ago
Blocks: 70229
(Assignee)

Comment 10

17 years ago
closing, again. see http://www.mozilla.org/projects/embedding/listeners.html for
usage info.
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → FIXED

Comment 11

17 years ago
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein

Comment 12

16 years ago
nsIWebBrowser::addWebBrowserListener() is the definitive way to register 
listeners. I tried other add listener methods (e.g. addProgressListener()) and 
they didn't work in MFCEmbed. (I've since found out they're private methods).
Status: RESOLVED → VERIFIED

Updated

16 years ago
No longer blocks: 64833
You need to log in before you can comment on or make changes to this bug.