Closed Bug 15345 Opened 25 years ago Closed 23 years ago

Remove DocLoaderObservers from all implementors...

Categories

(Core :: DOM: Navigation, defect, P3)

All
Windows NT
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.1

People

(Reporter: rpotts, Assigned: jud)

References

Details

Attachments

(20 files)

9.37 KB, patch
Details | Diff | Splinter Review
9.88 KB, patch
Details | Diff | Splinter Review
18.34 KB, patch
Details | Diff | Splinter Review
24.32 KB, patch
Details | Diff | Splinter Review
30.31 KB, patch
Details | Diff | Splinter Review
11.45 KB, patch
Details | Diff | Splinter Review
5.19 KB, patch
Details | Diff | Splinter Review
17.56 KB, patch
Details | Diff | Splinter Review
19.41 KB, text/plain
Details
5.52 KB, patch
Details | Diff | Splinter Review
4.97 KB, patch
Details | Diff | Splinter Review
5.46 KB, patch
Details | Diff | Splinter Review
19.08 KB, patch
Details | Diff | Splinter Review
5.76 KB, patch
Details | Diff | Splinter Review
17.00 KB, patch
Details | Diff | Splinter Review
17.23 KB, patch
Details | Diff | Splinter Review
19.25 KB, patch
Details | Diff | Splinter Review
11.43 KB, patch
Details | Diff | Splinter Review
110.96 KB, patch
Details | Diff | Splinter Review
3.84 KB, patch
Details | Diff | Splinter Review
Remove the DocLoaderObserver mechanism from the WebShell.  Any code requiring
these notifications should register as a DocLoaderObserver on the corresponding
DocLoader...
Travis should verify this with the new design.
Assignee: rpotts → travis
Target Milestone: M13
Depends on: 13374
Target Milestone: M13 → M15
Move to M15 for later evaluation.
Actually, no can't remove this one at this time.  Mscott is scheduled to do the 
work for supporting broadcasting the nsIWebProgress messages and then we can 
start converting things over to listen to them instead of the old ones.
Status: NEW → ASSIGNED
Updating QA Contact.
QA Contact: leger → travis
Move to M16 for now ...
Target Milestone: M15 → M16
Depends on: 33156
No longer depends on: 13374
M16 has been out for a while now, these bugs target milestones need to be 
updated.
rick, mscott. is this still an issue?
Yeah someone still needs to finish cleaning this up.
Travis no longer works here. reassigning ownerless bugs to docshell owner,
valeski for further triage.
Assignee: travis → valeski
Status: ASSIGNED → NEW
Keywords: embed
-> potts.
Assignee: valeski → rpotts
I've just attached a patch which removes the dependency on
nsIDocumentLoaderObserver from nsWebShellWindow.cpp.

Basically, I moved the code from OnEndDocumentLoad(...) into OnStateChange(...)
Rick these changes look great and it looks like it simplified some of the logic
in the on end document load method a bit. sr=mscott
I've attached a patch which removes the nsIDocumentLoaderObserver from
nsBrowserWindow...

Basically, I've re-factored the code from OnStartDocumentLoad and
OnStopDocumentLoad into two helper methods - StartDocumentLoad(...) and
EndDocumentLoad(...)

sr=mscott on rick's latest patch.
....snzzz...wha! mmmm yes. OK, I've looked over the patch. Can't find anything 
wrong with it. I'm looking forward to a whole new batch of endload ordering 
problems, and glad to have been invited to the party. r=danm.
I've just checked in the changes for nsWebShellWindow and nsBrowserInstance...

Now, I'm moving on to nsWebShell and nsEditorShell :-)
I've just added a patch that whacks nsEditorShell too :-)

This patch seems rather big, so here's a run down of what I did.
- Basically, I refactored the code in OnStartDocumentLoad(...) and
  OnEndDOcumentLoad(...) into 4 helper methods called StartPageLoad()
  EndPageLoad(), StartDocumentLoad() and EndDocumentLoad().
- These new methods are called at the appropriate time in OnStateChange(...)
- Also, it turns out that nsIDocumentLoaderObserver::OnProgressURLLoad(...) and
  OnStatusURLLoad(...) are *never* called!!

I've tested the patch with normal and frameset documents..  However, I haven't
tried it out with documents that have a meta-charset tag.

So far, everything seems fine.
I've changed the summary to better reflect the scope of this bug...
Summary: Webshell/Docloader cleanup - Remove DocLoaderObservers from WebShell... → Remove DocLoaderObservers from all implementors...
I've just attached a patch that removes the nsWebShell as a
nsIDocumentLoaderObserver...  Here's a summary of the changes:
- Added EndPageLoad(...) helper method to nsDocShell.

- Moved "document done" work in nsDocShell from OnStateChange(...) into
  EndPageLoad(...)

- Moved mDocLoaderObserver notifications in nsWebShell into a termporary
  implementation of OnStateChange(...).  This code can be deleted once
  all of the callers on SetDocLoaderObserver have been fixed!

- Moved the rest of the OnEndDocumentLoad(... )code in nsWebShell into
  EndPageLoad(...)

- Tried to cleanup tabbing and curly-braces as I went :-)

- Remember, OnStatusURLLoad(...) and OnProgressURLLoad(...) are never called,
  so I ignored them in OnStateChange(...) :-)
sr=mscott for both the editor shell and webshell changes. Can you make sure
simon or someone else on the editor team scans through the editor shell changes
too just to be safe?

hey simon,

are you around to review the nsEditorShell patches?

-- rick
I need to do some testing with them before I give an r=
The nsEditorShell changes test out fine (loading framesets shows alert, changing 
charsets before editing works). r=sfraser
Just checked in the nsEditorShell changes...
Just checked in the changes to nsDocShell and nsWebShell...
travis is no longer @netscape.com
moving to docshell component and reassigning qa contact
Component: Browser-General → Embedding: Docshell
QA Contact: travis → adamlock
Milestone 0.8 has been released. We should either resolve this bug or update its
milestone.
Clearing very old milestone (M16) in hope of reevaluation.
Target Milestone: M16 → ---
Target Milestone: --- → mozilla0.9.1
-> valeski
Assignee: rpotts → valeski
security has a dead weight member var using it.

Index: src/nsSecureBrowserUIImpl.h
===================================================================
RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsSecureBrowserUIImpl.h,v
retrieving revision 1.7
diff -u -r1.7 nsSecureBrowserUIImpl.h
--- nsSecureBrowserUIImpl.h     2001/04/01 19:38:12     1.7
+++ nsSecureBrowserUIImpl.h     2001/04/25 23:34:13
@@ -30,7 +30,6 @@
 #include "nsXPIDLString.h"
 #include "nsString.h"
 #include "nsIObserver.h"
-#include "nsIDocumentLoaderObserver.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMWindowInternal.h"
 #include "nsIStringBundle.h"
@@ -70,7 +69,6 @@

   nsCOMPtr<nsIDOMWindowInternal> mWindow;
   nsCOMPtr<nsIDOMElement> mSecurityButton;
-  nsCOMPtr<nsIDocumentLoaderObserver> mOldWebShellObserver;
   nsCOMPtr<nsIStringBundle> mStringBundle;
   nsCOMPtr<nsIURI> mCurrentURI;
r=morse for the changes to the cookie service
Can I just verify that the various nsIWebProgressListener methods are called 
exactly where nsIDocumentLoaderObserver methods used to be?

If so r=adamlock for the ActiveX changes.
Adam, I verified that the calls are made right on top of one another, for the 
document level notification see 
http://lxr.mozilla.org/mozilla/source/uriloader/base/nsDocLoader.cpp#499 . 
You'll notice that they are paired. Thanks.
r=morse for the changes to the wallet service.
note: there are no uses of nsIDocumentLoaderObserver in the commercial tree.

This bug is going to address removal of nsIDocumentLoaderObservers. I've filed
78236 to address nsIDocLoader registration removal.
I ran the viewer/crawler regression tests
(http://www.mozilla.org/newlayout/regress.html) and w/ out combing the output,
everything seemed to be fine WRT loading start/stop notifications.
r=waterson on the nsWebCrawler.cpp stuff.
a note on the pics diffs. pics is not part of the default build, nor does it
build if you try to build it by hand (it lacks special #include files), so, my
changes have not been compiled there.
Blocks: 62589
r=rpotts for viewer/crawler patch.
sr=rpotts for viewer/crawler patch
mscott, please r= the mail/news changes.

nsIMsgPrintEngine.idl -
* it now derrives straight from nsISupports

nsMsgPrintEngine -
* now implements nsIWebProgressListener and weakref (required by the webprogress
impl)
* moved the OnStart[End]DocLoad handling logic into the webprogresslistener
equiv states in OnStateChange.
* registers itself as a nsIWebProgressLIstener by obtaining the nsIWebProgress
iface from the dochell.

nsMessenger -
* pulled the no longer needed loaderobserver member var.
* nsIMsgStatusFeedback impl no longer impls nsIDocLoaderObserver making the
entire SetDocLoaderObserver() call dead weight.

I tested printing of a mail message on windows and it printed fine (I had to
apply hyatt printing regression patch to 77733 to get printing to work at all
first).
webcrawler and viewer diffs have been checked in.
r=mscott for the mailnews change. assuming printing still works after your
changes =).
rpotts has sr'd this.
Keywords: embedpatch
fix is in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: