add patches
authorMartin Schlemmer <azarah@gentoo.org>
Sun, 13 Oct 2002 13:00:34 +0000 (13:00 +0000)
committerMartin Schlemmer <azarah@gentoo.org>
Sun, 13 Oct 2002 13:00:34 +0000 (13:00 +0000)
net-www/mozilla/ChangeLog
net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch [new file with mode: 0644]
net-www/mozilla/files/mozilla-1.0.1-nsrange.patch [new file with mode: 0644]
net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch [new file with mode: 0644]
net-www/mozilla/files/mozilla-1.0.1-referrer.patch [new file with mode: 0644]
net-www/mozilla/files/mozilla-1.0.1-xuldom.patch [new file with mode: 0644]
net-www/mozilla/mozilla-1.0.1-r1.ebuild

index 2ab3c73cc3de042fb4ac12df8e846dc3e13a1bf9..34987616d4af21d7faabd19ce474d5a3587cb94b 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for net-www/mozilla
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/ChangeLog,v 1.39 2002/10/03 19:17:12 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/ChangeLog,v 1.40 2002/10/13 13:00:34 azarah Exp $
+
+  13 Oct 2002; Martin Schlemmer <azarah@gentoo.org> :
+  Add five patches from Mandrake (actually for moz-1.1 that I hacked
+  to work for 1.0.1) that fixes various crashes.  This seems to fix
+  the "crash on form submit bug" (bug #4715).
 
 *mozilla-1.0.1-r1 (03 Oct 2002)
   03 Oct 2002; Martin Schlemmer <azarah@gentoo.org> :
diff --git a/net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch b/net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch
new file mode 100644 (file)
index 0000000..b0b0c26
--- /dev/null
@@ -0,0 +1,11 @@
+--- mozilla/content/base/src/nsSelection.cpp.orig      2002-07-02 23:53:18.000000000 +0200
++++ mozilla/content/base/src/nsSelection.cpp   2002-08-30 10:51:00.000000000 +0200
+@@ -2696,7 +2696,7 @@
+       pos.mContentOffset = contentOffsetEnd;
+       result = VisualSelectFrames(aPresContext, newFrame, pos);
+       if (NS_FAILED(result))
+-        result = HandleClick(newContent, startPos, contentOffsetEnd, PR_FALSE,
++        result = HandleClick(newContent, startPos, contentOffsetEnd, PR_TRUE,
+                            PR_FALSE, beginOfContent);
+       mHint = saveHint;
+     }
diff --git a/net-www/mozilla/files/mozilla-1.0.1-nsrange.patch b/net-www/mozilla/files/mozilla-1.0.1-nsrange.patch
new file mode 100644 (file)
index 0000000..f50d0e0
--- /dev/null
@@ -0,0 +1,104 @@
+--- mozilla/content/base/src/nsRange.h.nsrange 2002-07-10 07:10:09.000000000 +0200
++++ mozilla/content/base/src/nsRange.h 2002-08-27 17:18:47.000000000 +0200
+@@ -209,6 +209,8 @@
+   // the range spec after the removal of nodes within the range.
+   static nsresult CollapseRangeAfterDelete(nsIDOMRange *aRange);
+ 
++  static PRInt32  GetNodeLength(nsIDOMNode *aNode);
++
+   nsresult      DoSetRange(nsIDOMNode* aStartN, PRInt32 aStartOffset,
+                              nsIDOMNode* aEndN, PRInt32 aEndOffset);
+ 
+--- mozilla/content/base/src/nsRange.cpp.nsrange       2002-07-16 15:09:01.000000000 +0200
++++ mozilla/content/base/src/nsRange.cpp       2002-08-27 17:53:01.000000000 +0200
+@@ -635,6 +635,33 @@
+   return res;
+ }
+ 
++// Get the length of aNode                                                      
++PRInt32 nsRange::GetNodeLength(nsIDOMNode *aNode)
++{
++  if (!aNode)
++    return 0;                                                                   
++
++  PRUint16 nodeType;
++  PRUint32 len = -1;
++  
++  aNode->GetNodeType(&nodeType);
++  if( (nodeType == nsIDOMNode::CDATA_SECTION_NODE) ||
++      (nodeType == nsIDOMNode::TEXT_NODE) )
++  {
++    nsCOMPtr<nsIDOMText> textText = do_QueryInterface(aNode);
++    if (textText)
++      textText->GetLength(&len);
++  }
++  else
++    {
++      nsCOMPtr<nsIDOMNodeList> childList;
++      nsresult res = aNode->GetChildNodes(getter_AddRefs(childList));
++      if (NS_SUCCEEDED(res) && childList)
++        childList->GetLength(&len);
++    }
++  return len;
++}
++
+ // It's important that all setting of the range start/end points 
+ // go through this function, which will do all the right voodoo
+ // for content notification of range ownership.  
+@@ -990,6 +990,10 @@
+   if(IsDetached())
+     return NS_ERROR_DOM_INVALID_STATE_ERR;
+ 
++  PRInt32 len = GetNodeLength(aParent);
++  if ( (aOffset < 0) || (len < 0) || (aOffset > len) )
++    return NS_ERROR_DOM_INDEX_SIZE_ERR;
++
+   nsresult res;
+   
+   if (!aParent) return NS_ERROR_NULL_POINTER;
+@@ -1020,6 +1051,7 @@
+ 
+   if(IsDetached())
+     return NS_ERROR_DOM_INVALID_STATE_ERR;
++
+   if (nsnull == aSibling)// Not the correct one to throw, but spec doesn't say what is
+     return NS_ERROR_DOM_NOT_OBJECT_ERR;
+ 
+@@ -1157,6 +1189,10 @@
+   if(IsDetached())
+     return NS_ERROR_DOM_INVALID_STATE_ERR;
+ 
++  PRInt32 len = GetNodeLength(aParent);
++  if ( (aOffset < 0) || (len < 0) || (aOffset > len) )
++    return NS_ERROR_DOM_INDEX_SIZE_ERR;
++
+   nsresult res;
+   
+   if (!aParent) return NS_ERROR_NULL_POINTER;
+@@ -2229,23 +2265,9 @@
+       this->InsertNode(aN);
+ 
+     // re-define the range so that it contains the same content as it did before
+-    tEndContainer->GetNodeType(&tEndNodeType);
+-    if( (nsIDOMNode::CDATA_SECTION_NODE == tEndNodeType) ||
+-       (nsIDOMNode::TEXT_NODE == tEndNodeType) )
+-    {
+-      nsCOMPtr<nsIDOMText> tEndContainerText = do_QueryInterface(tEndContainer);
+-      PRUint32 tInt;
+-      tEndContainerText->GetLength(&tInt);
+-      tEndOffset = tInt;
+-    }
+-    else
+-    {
+-      nsCOMPtr<nsIDOMNodeList>tChildList;
+-      res = tEndContainer->GetChildNodes(getter_AddRefs(tChildList));
+-      PRUint32 tInt;
+-      tChildList->GetLength(&tInt);
+-      tEndOffset = tInt;
+-    }
++    tEndOffset = GetNodeLength(tEndContainer);
++    if (tEndOffset == -1)  // failure code
++      return NS_ERROR_FAILURE;
+     this->DoSetRange(tStartContainer, 0, tEndContainer, tEndOffset);
+   }
+   this->SelectNode(aN);
diff --git a/net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch b/net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch
new file mode 100644 (file)
index 0000000..c31d2bb
--- /dev/null
@@ -0,0 +1,11 @@
+--- mozilla/layout/base/src/nsPresContext.cpp.orig     2002-06-25 23:16:00.000000000 +0200
++++ mozilla/layout/base/src/nsPresContext.cpp  2002-08-28 10:41:22.000000000 +0200
+@@ -161,6 +161,8 @@
+   mStopChrome = PR_TRUE;
+ 
+   mShell = nsnull;
++  mLinkHandler = nsnull;
++  mContainer = nsnull;
+ 
+   mDefaultColor = NS_RGB(0x00, 0x00, 0x00);
+   mDefaultBackgroundColor = NS_RGB(0xFF, 0xFF, 0xFF);
diff --git a/net-www/mozilla/files/mozilla-1.0.1-referrer.patch b/net-www/mozilla/files/mozilla-1.0.1-referrer.patch
new file mode 100644 (file)
index 0000000..8e8326d
--- /dev/null
@@ -0,0 +1,317 @@
+Index: content/html/content/src/nsHTMLImageElement.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/content/html/content/src/nsHTMLImageElement.cpp,v\r
+retrieving revision 1.121\r
+diff -u -r1.121 nsHTMLImageElement.cpp\r
+--- mozilla/content/html/content/src/nsHTMLImageElement.cpp    24 Aug 2002 14:40:45 -0000      1.121\r
++++ mozilla/content/html/content/src/nsHTMLImageElement.cpp    17 Sep 2002 04:07:27 -0000\r
+@@ -957,12 +957,17 @@\r
+ \r
+         nsCOMPtr<nsIDocument> doc;\r
+         nsCOMPtr<nsILoadGroup> loadGroup;\r
++        nsCOMPtr<nsIURI> documentURI;\r
+         shell->GetDocument(getter_AddRefs(doc));\r
+         if (doc) {\r
+           doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));\r
++\r
++          // Get the documment URI for the referrer.\r
++          doc->GetDocumentURL(getter_AddRefs(documentURI));\r
+         }\r
+ \r
+-        il->LoadImage(uri, nsnull, loadGroup, this, sup, nsIRequest::LOAD_NORMAL,\r
++        // XXX: initialDocumentURI is NULL!\r
++        il->LoadImage(uri, nsnull, documentURI, loadGroup, this, context, nsIRequest::LOAD_NORMAL,\r
+                       nsnull, nsnull, getter_AddRefs(mRequest));\r
+       }\r
+     }\r
+Index: content/xbl/src/nsXBLResourceLoader.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/content/xbl/src/nsXBLResourceLoader.cpp,v\r
+retrieving revision 1.7\r
+diff -u -r1.7 nsXBLResourceLoader.cpp\r
+--- mozilla/content/xbl/src/nsXBLResourceLoader.cpp    7 Sep 2002 17:08:43 -0000       1.7\r
++++ mozilla/content/xbl/src/nsXBLResourceLoader.cpp    17 Sep 2002 04:07:29 -0000\r
+@@ -127,9 +127,11 @@\r
+         if (!il) continue;\r
+       }\r
+ \r
+-      // Now kick off the image load\r
++      // Now kick off the image load...\r
++      // Passing NULL for pretty much everything -- cause we don't care!\r
++      // XXX: initialDocumentURI is NULL! \r
+       nsCOMPtr<imgIRequest> req;\r
+-      il->LoadImage(url, nsnull, nsnull, nsnull, nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(req));\r
++      il->LoadImage(url, nsnull, nsnull, nsnull, nsnull, nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(req));\r
+     }\r
+     else if (curr->mType == nsXBLAtoms::stylesheet) {\r
+       if (!cssLoader) {\r
+Index: layout/base/src/nsImageLoader.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/layout/base/src/nsImageLoader.cpp,v\r
+retrieving revision 3.11\r
+diff -u -r3.11 nsImageLoader.cpp\r
+--- mozilla/layout/base/src/nsImageLoader.cpp  26 Apr 2002 20:44:37 -0000      3.11\r
++++ mozilla/layout/base/src/nsImageLoader.cpp  17 Sep 2002 04:07:48 -0000\r
+@@ -92,8 +92,6 @@\r
+     return NS_ERROR_FAILURE;\r
+ \r
+   nsCOMPtr<nsILoadGroup> loadGroup;\r
+-  nsCOMPtr<nsIURI> uri;\r
+-  nsCOMPtr<nsIURI> baseURI;\r
+ \r
+   nsCOMPtr<nsIPresShell> shell;\r
+   nsresult rv = mPresContext->GetShell(getter_AddRefs(shell));\r
+@@ -106,6 +104,10 @@\r
+   // Get the document's loadgroup\r
+   doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));\r
+ \r
++  // Get the document URI (for the referrer).\r
++  nsCOMPtr<nsIURI> documentURI;\r
++  doc->GetDocumentURL(getter_AddRefs(documentURI));\r
++\r
+   if (mRequest) {\r
+     nsCOMPtr<nsIURI> oldURI;\r
+     mRequest->GetURI(getter_AddRefs(oldURI));\r
+@@ -119,7 +121,8 @@\r
+   nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));\r
+   if (NS_FAILED(rv)) return rv;\r
+ \r
+-  return il->LoadImage(aURI, nsnull, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this), \r
++  // XXX: initialDocumentURI is NULL!\r
++  return il->LoadImage(aURI, nsnull, documentURI, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this), \r
+                        nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(mRequest));\r
+ }\r
+ \r
+Index: layout/html/base/src/nsBulletFrame.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/layout/html/base/src/nsBulletFrame.cpp,v\r
+retrieving revision 1.79\r
+diff -u -r1.79 nsBulletFrame.cpp\r
+--- mozilla/layout/html/base/src/nsBulletFrame.cpp     12 Jul 2002 20:46:19 -0000      1.79\r
++++ mozilla/layout/html/base/src/nsBulletFrame.cpp     17 Sep 2002 04:07:49 -0000\r
+@@ -134,6 +134,16 @@\r
+     nsCOMPtr<nsIURI> imgURI;\r
+     NS_NewURI(getter_AddRefs(imgURI), myList->mListStyleImage, nsnull, baseURI);\r
+ \r
++    // Get the document URI for the referrer...\r
++    nsCOMPtr<nsIURI> documentURI;\r
++    nsCOMPtr<nsIDocument> doc;\r
++    if (mContent) {\r
++      (void) mContent->GetDocument(*getter_AddRefs(doc));\r
++      if (doc) {\r
++        doc->GetDocumentURL(getter_AddRefs(documentURI));\r
++      }\r
++    }\r
++\r
+     if (!mListener) {\r
+       nsBulletListener *listener;\r
+       NS_NEWXPCOM(listener, nsBulletListener);\r
+@@ -144,7 +154,8 @@\r
+       NS_RELEASE(listener);\r
+     }\r
+ \r
+-    il->LoadImage(imgURI, nsnull, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));\r
++    // XXX: initialDocumentURI is NULL !\r
++    il->LoadImage(imgURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));\r
+   }\r
+ \r
+   return NS_OK;\r
+@@ -1529,7 +1540,19 @@\r
+         nsCOMPtr<nsILoadGroup> loadGroup;\r
+         GetLoadGroup(aPresContext, getter_AddRefs(loadGroup));\r
+ \r
+-        il->LoadImage(newURI, nsnull, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));\r
++        // Get the document URI for the referrer...\r
++        nsCOMPtr<nsIURI> documentURI;\r
++        nsCOMPtr<nsIDocument> doc;\r
++        if (mContent) {\r
++          (void) mContent->GetDocument(*getter_AddRefs(doc));\r
++          if (doc) {\r
++            doc->GetDocumentURL(getter_AddRefs(documentURI));\r
++          }\r
++        }\r
++\r
++\r
++        // XXX: initialDocumentURI is NULL !\r
++        il->LoadImage(newURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));\r
+       }\r
+     }\r
+   }\r
+Index: layout/html/base/src/nsImageFrame.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/layout/html/base/src/nsImageFrame.cpp,v\r
+retrieving revision 1.248\r
+diff -u -r1.248 nsImageFrame.cpp\r
+--- mozilla/layout/html/base/src/nsImageFrame.cpp      3 Sep 2002 22:49:51 -0000       1.248\r
++++ mozilla/layout/html/base/src/nsImageFrame.cpp      17 Sep 2002 04:07:49 -0000\r
+@@ -2001,8 +2001,19 @@\r
+ \r
+   nsCOMPtr<nsIURI> baseURI;\r
+   rv = aPresContext->GetBaseURL(getter_AddRefs(baseURI));\r
++\r
++  // Get the document URI for the referrer...\r
++  nsCOMPtr<nsIURI> documentURI;\r
++  nsCOMPtr<nsIDocument> doc;\r
++  if (mContent) {\r
++    (void) mContent->GetDocument(*getter_AddRefs(doc));\r
++    if (doc) {\r
++      doc->GetDocumentURL(getter_AddRefs(documentURI));\r
++    }\r
++  }\r
++\r
+   nsCOMPtr<imgIRequest> tempRequest;\r
+-  return il->LoadImage(uri, baseURI, loadGroup, mListener, aPresContext, loadFlags, nsnull, aRequest, getter_AddRefs(tempRequest));\r
++  return il->LoadImage(uri, baseURI, documentURI, loadGroup, mListener, aPresContext, loadFlags, nsnull, aRequest, getter_AddRefs(tempRequest));\r
+ }\r
+ \r
+ #define INTERNAL_GOPHER_LENGTH 16 /* "internal-gopher-" length */\r
+Index: layout/xul/base/src/nsImageBoxFrame.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp,v\r
+retrieving revision 1.39\r
+diff -u -r1.39 nsImageBoxFrame.cpp\r
+--- mozilla/layout/xul/base/src/nsImageBoxFrame.cpp    23 May 2002 00:00:32 -0000      1.39\r
++++ mozilla/layout/xul/base/src/nsImageBoxFrame.cpp    17 Sep 2002 04:07:54 -0000\r
+@@ -456,7 +456,18 @@\r
+   nsCOMPtr<nsILoadGroup> loadGroup;\r
+   GetLoadGroup(aPresContext, getter_AddRefs(loadGroup));\r
+ \r
+-  il->LoadImage(srcURI, nsnull, loadGroup, mListener, aPresContext, mLoadFlags, nsnull, nsnull, getter_AddRefs(mImageRequest));\r
++  // Get the document URI for the referrer...\r
++  nsCOMPtr<nsIURI> documentURI;\r
++  nsCOMPtr<nsIDocument> doc;\r
++  if (mContent) {\r
++    (void) mContent->GetDocument(*getter_AddRefs(doc));\r
++    if (doc) {\r
++      doc->GetDocumentURL(getter_AddRefs(documentURI));\r
++    }\r
++  }\r
++\r
++  // XXX: initialDocumentURI is NULL!\r
++  il->LoadImage(srcURI, nsnull, documentURI, loadGroup, mListener, aPresContext, mLoadFlags, nsnull, nsnull, getter_AddRefs(mImageRequest));\r
+ \r
+   aResize = PR_TRUE;\r
+ }\r
+Index: layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp,v\r
+retrieving revision 1.136\r
+diff -u -r1.136 nsTreeBodyFrame.cpp\r
+--- mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp   7 Sep 2002 05:37:42 -0000       1.136\r
++++ mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp   17 Sep 2002 04:07:54 -0000\r
+@@ -1862,8 +1862,14 @@\r
+ \r
+     nsresult rv;\r
+     nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));\r
++\r
++    // Get the documment URI for the referrer.\r
++    nsCOMPtr<nsIURI> documentURI;\r
++    doc->GetDocumentURL(getter_AddRefs(documentURI));\r
++\r
+     mImageGuard = PR_TRUE;\r
+-    rv = il->LoadImage(srcURI, nsnull, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));\r
++    // XXX: initialDocumentURI is NULL!\r
++    rv = il->LoadImage(srcURI, nsnull, documentURI, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));\r
+     mImageGuard = PR_FALSE;\r
+ \r
+     // In a case it was already cached.\r
+Index: modules/libpr0n/public/imgILoader.idl\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/modules/libpr0n/public/imgILoader.idl,v\r
+retrieving revision 1.8\r
+diff -u -r1.8 imgILoader.idl\r
+--- mozilla/modules/libpr0n/public/imgILoader.idl      23 Mar 2002 13:21:27 -0000      1.8\r
++++ mozilla/modules/libpr0n/public/imgILoader.idl      17 Sep 2002 04:08:04 -0000\r
+@@ -48,6 +48,8 @@\r
+   /**\r
+    * Start the load and decode of an image.\r
+    * @param aURI the URI to load\r
++   * @param aInitialDocumentURI the URI that 'initiated' the load -- used for 3rd party cookie blocking\r
++   * @param aReferrerURI the 'referring' URI\r
+    * @param aLoadGroup Loadgroup to put the image load into\r
+    * @param aObserver the observer\r
+    * @param aCX some random data\r
+@@ -57,9 +59,14 @@\r
+    * @param aRequest A newly created, unused imgIRequest object or NULL for one to\r
+                      be created for you.\r
+    */\r
+-  imgIRequest loadImage(in nsIURI aURI, in nsIURI parentURL, in nsILoadGroup aLoadGroup,\r
+-                        in imgIDecoderObserver aObserver, in nsISupports aCX,\r
+-                        in nsLoadFlags aLoadFlags, in nsISupports cacheKey,\r
++  imgIRequest loadImage(in nsIURI aURI,\r
++                        in nsIURI aInitialDocumentURL,\r
++                        in nsIURI aReferrerURI,\r
++                        in nsILoadGroup aLoadGroup,\r
++                        in imgIDecoderObserver aObserver,\r
++                        in nsISupports aCX,\r
++                        in nsLoadFlags aLoadFlags,\r
++                        in nsISupports cacheKey,\r
+                         in imgIRequest aRequest);\r
+ \r
+   /**\r
+Index: modules/libpr0n/src/imgLoader.cpp\r
+===================================================================\r
+RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.cpp,v\r
+retrieving revision 1.50\r
+diff -u -r1.50 imgLoader.cpp\r
+--- mozilla/modules/libpr0n/src/imgLoader.cpp  12 Sep 2002 08:42:39 -0000      1.50\r
++++ mozilla/modules/libpr0n/src/imgLoader.cpp  17 Sep 2002 04:08:04 -0000\r
+@@ -112,11 +112,18 @@\r
+   return 1;\r
+ }\r
+ \r
+-/* 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); */\r
++/* 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); */\r
+ \r
+-NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsIURI *parentURI, nsILoadGroup *aLoadGroup,\r
+-                                   imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags,\r
+-                                   nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval)\r
++NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, \r
++                                   nsIURI *initialDocumentURI,\r
++                                   nsIURI *referrerURI,\r
++                                   nsILoadGroup *aLoadGroup,\r
++                                   imgIDecoderObserver *aObserver,\r
++                                   nsISupports *aCX,\r
++                                   nsLoadFlags aLoadFlags,\r
++                                   nsISupports *cacheKey,\r
++                                   imgIRequest *aRequest,\r
++                                   imgIRequest **_retval)\r
+ {\r
+   NS_ASSERTION(aURI, "imgLoader::LoadImage -- NULL URI pointer");\r
+ \r
+@@ -301,7 +308,7 @@\r
+ \r
+     nsCOMPtr<nsIHttpChannel> newHttpChannel = do_QueryInterface(newChannel);\r
+     if (newHttpChannel) {\r
+-      newHttpChannel->SetDocumentURI(parentURI);\r
++      newHttpChannel->SetDocumentURI(initialDocumentURI);\r
+     }\r
+ \r
+     if (aLoadGroup) {\r
+@@ -348,24 +355,8 @@\r
+       nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(newChannel));\r
+ \r
+       if (httpChannel) {\r
+-        nsresult rv;\r
+-        // Get the defloadRequest from the loadgroup\r
+-        nsCOMPtr<nsIRequest> defLoadRequest;\r
+-        rv = aLoadGroup->GetDefaultLoadRequest(getter_AddRefs(defLoadRequest));\r
+-\r
+-        if (NS_SUCCEEDED(rv) && defLoadRequest) {\r
+-          nsCOMPtr<nsIChannel> reqChannel(do_QueryInterface(defLoadRequest));\r
+-\r
+-          if (reqChannel) {\r
+-            // Get the referrer from the loadchannel\r
+-            nsCOMPtr<nsIURI> referrer;\r
+-            rv = reqChannel->GetURI(getter_AddRefs(referrer));\r
+-            if (NS_SUCCEEDED(rv)) {\r
+-              // Set the referrer\r
+-              httpChannel->SetReferrer(referrer, nsIHttpChannel::REFERRER_INLINES);\r
+-            }\r
+-          }   \r
+-        }\r
++        // Set the referrer\r
++        httpChannel->SetReferrer(referrerURI, nsIHttpChannel::REFERRER_INLINES);\r
+       }\r
+     }\r
+ \r
diff --git a/net-www/mozilla/files/mozilla-1.0.1-xuldom.patch b/net-www/mozilla/files/mozilla-1.0.1-xuldom.patch
new file mode 100644 (file)
index 0000000..143ad0c
--- /dev/null
@@ -0,0 +1,14 @@
+--- mozilla/content/xul/content/src/nsXULElement.cpp.orig      2002-08-24 02:08:08.000000000 +0200
++++ mozilla/content/xul/content/src/nsXULElement.cpp   2002-08-27 16:27:35.000000000 +0200
+@@ -993,6 +993,11 @@
+     if (NS_FAILED(rv))
+         return rv;
+ 
++    // We can't insert an ancestor or ourself.
++    if (IsAncestor(aNewChild, this)) {
++        return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
++    }
++
+     nsCOMPtr<nsIContent> newcontent = do_QueryInterface(aNewChild);
+     NS_ASSERTION(newcontent != nsnull, "not an nsIContent");
+     if (! newcontent)
index ca8437453c9e18c0e9c530ac49c3cf39dc67de71..a5a9baa6ba40b9f96cb3a211b00992e9221ffe82 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0.1-r1.ebuild,v 1.7 2002/10/12 19:50:32 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0.1-r1.ebuild,v 1.8 2002/10/13 13:00:34 azarah Exp $
 
 IUSE="mozxmlterm moznomail java mozp3p crypt ipv6 gtk2 mozinterfaceinfo ssl ldap mozaccess mozctl gnome mozsvg"
 
@@ -91,6 +91,14 @@ src_unpack() {
        # Apply the bytecode patch for freetype2
        patch -p1 < ${FILESDIR}/mozilla-ft-bytecode.patch || die
 
+       # Some patches from Mandrake to fix various crashes.  This
+       # seems to fix the "crash on submit bug".
+       patch -p1 < ${FILESDIR}/${P}-nsrange.patch || die
+       patch -p1 < ${FILESDIR}/${P}-bidiselection.patch || die
+       patch -p1 < ${FILESDIR}/${P}-referrer.patch || die
+       patch -p1 < ${FILESDIR}/${P}-prefcrash.patch || die
+       patch -p1 < ${FILESDIR}/${P}-xuldom.patch || die
+
        # Unpack the enigmail plugin
        if [ -n "`use crypt`" -a -z "`use moznomail`" ] && \
           [ "${NO_MAIL}" != "YES" -a "${NO_MAIL}" != "yes" ]