head	1.3;
access;
symbols
	RELEASE_5_0_0:1.2;
locks; strict;
comment	@# @;


1.3
date	2003.01.21.16.36.12;	author marcus;	state dead;
branches;
next	1.2;

1.2
date	2002.10.22.03.42.20;	author marcus;	state Exp;
branches;
next	1.1;

1.1
date	2002.10.18.02.48.10;	author marcus;	state Exp;
branches;
next	;


desc
@@


1.3
log
@At last, the long awaited update to 1.2.1.  Let the bloodbath begin!

* Update to 1.2.1
* Add optional GTK2 and Xft support
* Re-enable optimizations [1]
* Disable JavaScript debugger by default [1]
* Add calendar support [2]

PR:	45789, 45969 [2]
Submitted by:	Joe Kelsey <joek@@zircon.staff.flyingcroc.net> [2]
Suggested by:	David Schultz <dschultz@@uclink.Berkeley.EDU>
@
text
@Index: content/html/content/src/nsHTMLImageElement.cpp
===================================================================
RCS file: /cvsroot/mozilla/content/html/content/src/nsHTMLImageElement.cpp,v
retrieving revision 1.121
diff -u -r1.121 nsHTMLImageElement.cpp
--- content/html/content/src/nsHTMLImageElement.cpp	24 Aug 2002 14:40:45 -0000	1.121
+++ content/html/content/src/nsHTMLImageElement.cpp	17 Sep 2002 04:07:27 -0000
@@@@ -886,12 +886,17 @@@@
 
         nsCOMPtr<nsIDocument> doc;
         nsCOMPtr<nsILoadGroup> loadGroup;
+        nsCOMPtr<nsIURI> documentURI;
         shell->GetDocument(getter_AddRefs(doc));
         if (doc) {
           doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
+
+          // Get the documment URI for the referrer.
+          doc->GetDocumentURL(getter_AddRefs(documentURI));
         }
 
-        il->LoadImage(uri, nsnull, loadGroup, this, context, nsIRequest::LOAD_NORMAL,
+        // XXX: initialDocumentURI is NULL!
+        il->LoadImage(uri, nsnull, documentURI, loadGroup, this, context, nsIRequest::LOAD_NORMAL,
                       nsnull, nsnull, getter_AddRefs(mRequest));
       }
     }
Index: content/xbl/src/nsXBLResourceLoader.cpp
===================================================================
RCS file: /cvsroot/mozilla/content/xbl/src/nsXBLResourceLoader.cpp,v
retrieving revision 1.7
diff -u -r1.7 nsXBLResourceLoader.cpp
--- content/xbl/src/nsXBLResourceLoader.cpp	7 Sep 2002 17:08:43 -0000	1.7
+++ content/xbl/src/nsXBLResourceLoader.cpp	17 Sep 2002 04:07:29 -0000
@@@@ -127,9 +127,11 @@@@
         if (!il) continue;
       }
 
-      // Now kick off the image load
+      // Now kick off the image load...
+      // Passing NULL for pretty much everything -- cause we don't care!
+      // XXX: initialDocumentURI is NULL! 
       nsCOMPtr<imgIRequest> req;
-      il->LoadImage(url, nsnull, nsnull, nsnull, nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(req));
+      il->LoadImage(url, nsnull, nsnull, nsnull, nsnull, nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(req));
     }
     else if (curr->mType == nsXBLAtoms::stylesheet) {
       if (!cssLoader) {
Index: layout/base/src/nsImageLoader.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/src/nsImageLoader.cpp,v
retrieving revision 3.11
diff -u -r3.11 nsImageLoader.cpp
--- layout/base/src/nsImageLoader.cpp	26 Apr 2002 20:44:37 -0000	3.11
+++ layout/base/src/nsImageLoader.cpp	17 Sep 2002 04:07:48 -0000
@@@@ -92,8 +92,6 @@@@
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsILoadGroup> loadGroup;
-  nsCOMPtr<nsIURI> uri;
-  nsCOMPtr<nsIURI> baseURI;
 
   nsCOMPtr<nsIPresShell> shell;
   nsresult rv = mPresContext->GetShell(getter_AddRefs(shell));
@@@@ -106,6 +104,10 @@@@
   // Get the document's loadgroup
   doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
 
+  // Get the document URI (for the referrer).
+  nsCOMPtr<nsIURI> documentURI;
+  doc->GetDocumentURL(getter_AddRefs(documentURI));
+
   if (mRequest) {
     nsCOMPtr<nsIURI> oldURI;
     mRequest->GetURI(getter_AddRefs(oldURI));
@@@@ -119,7 +121,8 @@@@
   nsCOMPtr<imgILoader> il(do_GetService("@@mozilla.org/image/loader;1", &rv));
   if (NS_FAILED(rv)) return rv;
 
-  return il->LoadImage(aURI, nsnull, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this), 
+  // XXX: initialDocumentURI is NULL!
+  return il->LoadImage(aURI, nsnull, documentURI, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this), 
                        nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(mRequest));
 }
 
Index: layout/html/base/src/nsBulletFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/nsBulletFrame.cpp,v
retrieving revision 1.79
diff -u -r1.79 nsBulletFrame.cpp
--- layout/html/base/src/nsBulletFrame.cpp	12 Jul 2002 20:46:19 -0000	1.79
+++ layout/html/base/src/nsBulletFrame.cpp	17 Sep 2002 04:07:49 -0000
@@@@ -134,6 +134,16 @@@@
     nsCOMPtr<nsIURI> imgURI;
     NS_NewURI(getter_AddRefs(imgURI), myList->mListStyleImage, nsnull, baseURI);
 
+    // Get the document URI for the referrer...
+    nsCOMPtr<nsIURI> documentURI;
+    nsCOMPtr<nsIDocument> doc;
+    if (mContent) {
+      (void) mContent->GetDocument(*getter_AddRefs(doc));
+      if (doc) {
+        doc->GetDocumentURL(getter_AddRefs(documentURI));
+      }
+    }
+
     if (!mListener) {
       nsBulletListener *listener;
       NS_NEWXPCOM(listener, nsBulletListener);
@@@@ -144,7 +154,8 @@@@
       NS_RELEASE(listener);
     }
 
-    il->LoadImage(imgURI, nsnull, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
+    // XXX: initialDocumentURI is NULL !
+    il->LoadImage(imgURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
   }
 
   return NS_OK;
@@@@ -1529,7 +1540,19 @@@@
         nsCOMPtr<nsILoadGroup> loadGroup;
         GetLoadGroup(aPresContext, getter_AddRefs(loadGroup));
 
-        il->LoadImage(newURI, nsnull, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
+        // Get the document URI for the referrer...
+        nsCOMPtr<nsIURI> documentURI;
+        nsCOMPtr<nsIDocument> doc;
+        if (mContent) {
+          (void) mContent->GetDocument(*getter_AddRefs(doc));
+          if (doc) {
+            doc->GetDocumentURL(getter_AddRefs(documentURI));
+          }
+        }
+
+
+        // XXX: initialDocumentURI is NULL !
+        il->LoadImage(newURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
       }
     }
   }
Index: layout/html/base/src/nsImageFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/nsImageFrame.cpp,v
retrieving revision 1.248
diff -u -r1.248 nsImageFrame.cpp
--- layout/html/base/src/nsImageFrame.cpp	3 Sep 2002 22:49:51 -0000	1.248
+++ layout/html/base/src/nsImageFrame.cpp	17 Sep 2002 04:07:49 -0000
@@@@ -2001,8 +2001,19 @@@@
 
   nsCOMPtr<nsIURI> baseURI;
   rv = aPresContext->GetBaseURL(getter_AddRefs(baseURI));
+
+  // Get the document URI for the referrer...
+  nsCOMPtr<nsIURI> documentURI;
+  nsCOMPtr<nsIDocument> doc;
+  if (mContent) {
+    (void) mContent->GetDocument(*getter_AddRefs(doc));
+    if (doc) {
+      doc->GetDocumentURL(getter_AddRefs(documentURI));
+    }
+  }
+
   nsCOMPtr<imgIRequest> tempRequest;
-  return il->LoadImage(uri, baseURI, loadGroup, mListener, aPresContext, loadFlags, nsnull, aRequest, getter_AddRefs(tempRequest));
+  return il->LoadImage(uri, baseURI, documentURI, loadGroup, mListener, aPresContext, loadFlags, nsnull, aRequest, getter_AddRefs(tempRequest));
 }
 
 #define INTERNAL_GOPHER_LENGTH 16 /* "internal-gopher-" length */
Index: layout/xul/base/src/nsImageBoxFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp,v
retrieving revision 1.39
diff -u -r1.39 nsImageBoxFrame.cpp
--- layout/xul/base/src/nsImageBoxFrame.cpp	23 May 2002 00:00:32 -0000	1.39
+++ layout/xul/base/src/nsImageBoxFrame.cpp	17 Sep 2002 04:07:54 -0000
@@@@ -456,7 +456,18 @@@@
   nsCOMPtr<nsILoadGroup> loadGroup;
   GetLoadGroup(aPresContext, getter_AddRefs(loadGroup));
 
-  il->LoadImage(srcURI, nsnull, loadGroup, mListener, aPresContext, mLoadFlags, nsnull, nsnull, getter_AddRefs(mImageRequest));
+  // Get the document URI for the referrer...
+  nsCOMPtr<nsIURI> documentURI;
+  nsCOMPtr<nsIDocument> doc;
+  if (mContent) {
+    (void) mContent->GetDocument(*getter_AddRefs(doc));
+    if (doc) {
+      doc->GetDocumentURL(getter_AddRefs(documentURI));
+    }
+  }
+
+  // XXX: initialDocumentURI is NULL!
+  il->LoadImage(srcURI, nsnull, documentURI, loadGroup, mListener, aPresContext, mLoadFlags, nsnull, nsnull, getter_AddRefs(mImageRequest));
 
   aResize = PR_TRUE;
 }
Index: layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp,v
retrieving revision 1.136
diff -u -r1.136 nsTreeBodyFrame.cpp
--- layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp	7 Sep 2002 05:37:42 -0000	1.136
+++ layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp	17 Sep 2002 04:07:54 -0000
@@@@ -1862,8 +1862,14 @@@@
 
     nsresult rv;
     nsCOMPtr<imgILoader> il(do_GetService("@@mozilla.org/image/loader;1", &rv));
+
+    // Get the documment URI for the referrer.
+    nsCOMPtr<nsIURI> documentURI;
+    doc->GetDocumentURL(getter_AddRefs(documentURI));
+
     mImageGuard = PR_TRUE;
-    rv = il->LoadImage(srcURI, nsnull, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
+    // XXX: initialDocumentURI is NULL!
+    rv = il->LoadImage(srcURI, nsnull, documentURI, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
     mImageGuard = PR_FALSE;
 
     // In a case it was already cached.
Index: modules/libpr0n/public/imgILoader.idl
===================================================================
RCS file: /cvsroot/mozilla/modules/libpr0n/public/imgILoader.idl,v
retrieving revision 1.8
diff -u -r1.8 imgILoader.idl
--- modules/libpr0n/public/imgILoader.idl	23 Mar 2002 13:21:27 -0000	1.8
+++ modules/libpr0n/public/imgILoader.idl	17 Sep 2002 04:08:04 -0000
@@@@ -48,6 +48,8 @@@@
   /**
    * Start the load and decode of an image.
    * @@param aURI the URI to load
+   * @@param aInitialDocumentURI the URI that 'initiated' the load -- used for 3rd party cookie blocking
+   * @@param aReferrerURI the 'referring' URI
    * @@param aLoadGroup Loadgroup to put the image load into
    * @@param aObserver the observer
    * @@param aCX some random data
@@@@ -57,9 +59,14 @@@@
    * @@param aRequest A newly created, unused imgIRequest object or NULL for one to
                      be created for you.
    */
-  imgIRequest loadImage(in nsIURI aURI, in nsIURI parentURL, in nsILoadGroup aLoadGroup,
-                        in imgIDecoderObserver aObserver, in nsISupports aCX,
-                        in nsLoadFlags aLoadFlags, in nsISupports cacheKey,
+  imgIRequest loadImage(in nsIURI aURI,
+                        in nsIURI aInitialDocumentURL,
+                        in nsIURI aReferrerURI,
+                        in nsILoadGroup aLoadGroup,
+                        in imgIDecoderObserver aObserver,
+                        in nsISupports aCX,
+                        in nsLoadFlags aLoadFlags,
+                        in nsISupports cacheKey,
                         in imgIRequest aRequest);
 
   /**
Index: modules/libpr0n/src/imgLoader.cpp
===================================================================
RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.cpp,v
retrieving revision 1.50
diff -u -r1.50 imgLoader.cpp
--- modules/libpr0n/src/imgLoader.cpp	12 Sep 2002 08:42:39 -0000	1.50
+++ modules/libpr0n/src/imgLoader.cpp	17 Sep 2002 04:08:04 -0000
@@@@ -112,11 +112,18 @@@@
   return 1;
 }
 
-/* imgIRequest loadImage (in nsIURI aURI, in nsIURI parentURI, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest); */
+/* imgIRequest loadImage (in nsIURI aURI, in nsIURI initialDocumentURI, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest); */
 
-NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsIURI *parentURI, nsILoadGroup *aLoadGroup,
-                                   imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags,
-                                   nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval)
+NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, 
+                                   nsIURI *initialDocumentURI,
+                                   nsIURI *referrerURI,
+                                   nsILoadGroup *aLoadGroup,
+                                   imgIDecoderObserver *aObserver,
+                                   nsISupports *aCX,
+                                   nsLoadFlags aLoadFlags,
+                                   nsISupports *cacheKey,
+                                   imgIRequest *aRequest,
+                                   imgIRequest **_retval)
 {
   NS_ASSERTION(aURI, "imgLoader::LoadImage -- NULL URI pointer");
 
@@@@ -301,7 +308,7 @@@@
 
     nsCOMPtr<nsIHttpChannel> newHttpChannel = do_QueryInterface(newChannel);
     if (newHttpChannel) {
-      newHttpChannel->SetDocumentURI(parentURI);
+      newHttpChannel->SetDocumentURI(initialDocumentURI);
     }
 
     if (aLoadGroup) {
@@@@ -348,24 +355,8 @@@@
       nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(newChannel));
 
       if (httpChannel) {
-        nsresult rv;
-        // Get the defloadRequest from the loadgroup
-        nsCOMPtr<nsIRequest> defLoadRequest;
-        rv = aLoadGroup->GetDefaultLoadRequest(getter_AddRefs(defLoadRequest));
-
-        if (NS_SUCCEEDED(rv) && defLoadRequest) {
-          nsCOMPtr<nsIChannel> reqChannel(do_QueryInterface(defLoadRequest));
-
-          if (reqChannel) {
-            // Get the referrer from the loadchannel
-            nsCOMPtr<nsIURI> referrer;
-            rv = reqChannel->GetURI(getter_AddRefs(referrer));
-            if (NS_SUCCEEDED(rv)) {
-              // Set the referrer
-              httpChannel->SetReferrer(referrer, nsIHttpChannel::REFERRER_INLINES);
-            }
-          }   
-        }
+        // Set the referrer
+        httpChannel->SetReferrer(referrerURI, nsIHttpChannel::REFERRER_INLINES);
       }
     }
 
@


1.2
log
@This commit includes:

* mozilla-*vendor ports (currently for Mozilla 1.0.1)
* mozilla* ports (currently for Mozilla 1.1)
* mozilla-*devel ports (currently for Mozilla 1.2b)

Special thanks goes to trevor for auto-generating plist patches, cy for
pointing out that the Mozilla startup scripts need to be tailored for
each version of Mozilla, grog for suggesting that some verbage needs to
be added to explain the Java plugin messages at startup, and John
Merryweather Cooper for suggesting a common plugin directory. Of course,
thanks also goes to the user community for suggestions and support.

These ports offer:

* Complete coexistence with each other
* A universal ${PREFIX}/lib/browser_plugins directory
* Auto-generated plists for ease of maintenance
* More accurate pkg-descr's
* A pkg-message pointing users to java/jdk13 for the Java plugin

PR:	42870 42941
Reviewed by:	ports gnome
@
text
@@


1.1
log
@Add modified patch from Mozilla CVS to correct the recent security hole.
Un-forbid the port.
@
text
@d1 8
a8 3
--- content/html/content/src/nsHTMLImageElement.cpp.orig	Tue Jun 18 20:17:56 2002
+++ content/html/content/src/nsHTMLImageElement.cpp	Thu Oct 17 22:16:00 2002
@@@@ -957,12 +957,17 @@@@
d12 1
a12 1
+	nsCOMPtr<nsIURI> documentURI;
d17 2
a18 2
+	  // Get the documment URI for the referrer.
+	  doc->GetDocumentURL(getter_AddRefs(documentURI));
d21 3
a23 3
-        il->LoadImage(uri, nsnull, loadGroup, this, sup, nsIRequest::LOAD_NORMAL,
+	// XXX: initialDocumentURI is NULL!
+	il->LoadImage(uri, nsnull, documentURI, loadGroup, this, context, nsIRequest::LOAD_NORMAL,
d27 9
a35 3
--- content/xbl/src/nsXBLResourceLoader.cpp.orig	Tue Apr  9 22:30:27 2002
+++ content/xbl/src/nsXBLResourceLoader.cpp	Thu Oct 17 22:17:21 2002
@@@@ -126,8 +126,10 @@@@
d38 2
a39 1
       // Now kick off the image load
d41 1
a41 1
+      // XXX: initialDocumentURI is NULL!
d48 7
a54 2
--- layout/base/src/nsImageLoader.cpp.orig	Fri Apr 26 19:05:07 2002
+++ layout/base/src/nsImageLoader.cpp	Thu Oct 17 22:19:28 2002
d81 1
a81 1
+  return il->LoadImage(aURI, nsnull, documentURI, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this),
d85 8
a92 3
--- layout/html/base/src/nsBulletFrame.cpp.orig	Fri Jun  7 20:04:28 2002
+++ layout/html/base/src/nsBulletFrame.cpp	Thu Oct 17 22:22:58 2002
@@@@ -135,6 +135,16 @@@@
d100 4
a103 4
+	(void) mContent->GetDocument(*getter_AddRefs(doc));
+	if (doc) {
+	    doc->GetDocumentURL(getter_AddRefs(documentURI));
+	}
d109 1
a109 1
@@@@ -145,7 +155,8 @@@@
d119 1
a119 1
@@@@ -1481,7 +1492,18 @@@@
d124 9
a132 9
+	// Get the document URI for the referrer...
+	nsCOMPtr<nsIURI> documentURI;
+	nsCOMPtr<nsIDocument> doc;
+	if (mContent) {
+	    (void) mContent->GetDocument(*getter_AddRefs(doc));
+	    if (doc) {
+		doc->GetDocumentURL(getter_AddRefs(documentURI));
+	    }
+	}
d134 3
a136 2
+	// XXX: initialDocumentURI is NULL !
+	il->LoadImage(newURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
d140 8
a147 3
--- layout/html/base/src/nsImageFrame.cpp.orig	Fri Jun 21 19:01:22 2002
+++ layout/html/base/src/nsImageFrame.cpp	Thu Oct 17 22:24:47 2002
@@@@ -1980,8 +1980,19 @@@@
d156 4
a159 4
+      (void) mContent->GetDocument(*getter_AddRefs(doc));
+      if (doc) {
+	  doc->GetDocumentURL(getter_AddRefs(documentURI));
+      }
d168 8
a175 3
--- layout/xul/base/src/nsImageBoxFrame.cpp.orig	Tue Apr  9 23:01:17 2002
+++ layout/xul/base/src/nsImageBoxFrame.cpp	Thu Oct 17 22:26:39 2002
@@@@ -457,7 +457,19 @@@@
d184 4
a187 4
+      (void) mContent->GetDocument(*getter_AddRefs(doc));
+      if (doc) {
+	  doc->GetDocumentURL(getter_AddRefs(documentURI));
+      }
a191 1
+
d195 40
a234 3
--- modules/libpr0n/public/imgILoader.idl.orig	Tue Apr  9 23:09:00 2002
+++ modules/libpr0n/public/imgILoader.idl	Thu Oct 17 22:30:35 2002
@@@@ -57,9 +57,14 @@@@
d241 8
a248 8
+   imgIRequest loadImage(in nsIURI aURI,
+   			in nsIURI aInitialDocumentURL,
+			in nsIURI aReferrerURI,
+			in nsILoadGroup aLoadGroup,
+			in imgIDecoderObserver aObserver,
+			in nsISupports aCX,
+			in nsLoadFlags aLoadFlags,
+			in nsISupports cacheKey,
d252 8
a259 3
--- modules/libpr0n/src/imgLoader.cpp.orig	Mon Jun 10 18:07:05 2002
+++ modules/libpr0n/src/imgLoader.cpp	Thu Oct 17 22:33:23 2002
@@@@ -111,11 +111,17 @@@@
d264 1
d269 10
a278 10
+NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI,
+				nsIURI *initialDocumentURI,
+				nsIURI *referrerURI,
+				nsILoadGroup *aLoadGroup,
+				imgIDecoderObserver *aObserver,
+				nsISupports *aCX,
+				nsLoadFlags aLoadFlags,
+				nsISupports *cacheKey,
+				imgIRequest *aRequest,
+				imgIRequest **_retval)
d282 1
a282 1
@@@@ -298,7 +304,7 @@@@
d287 1
a287 1
+	newHttpChannel->SetDocumentURI(initialDocumentURI);
d291 1
a291 1
@@@@ -343,24 +349,8 @@@@
d313 2
a314 2
+	  // Set the referrer
+	  httpChannel->SetReferrer(referrerURI, nsIHttpChannel::REFERRER_INLINES);
a317 18
--- layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp.orig	Tue Jun 25 00:00:35 2002
+++ layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp	Thu Oct 17 22:28:04 2002
@@@@ -1725,8 +1725,14 @@@@
 
     nsresult rv;
     nsCOMPtr<imgILoader> il(do_GetService("@@mozilla.org/image/loader;1", &rv));
+
+    // Get the documment URI for the referrer.
+    nsCOMPtr<nsIURI> documentURI;
+    doc->GetDocumentURL(getter_AddRefs(documentURI));
+
     mImageGuard = PR_TRUE;
-    rv = il->LoadImage(srcURI, nsnull, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
+    // XXX: initialDocumentURI is NULL!
+    rv = il->LoadImage(srcURI, nsnull, documentURI, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
     mImageGuard = PR_FALSE;
 
     // In a case it was already cached.
@

