From efe5b5c80c279b871e6491a14c4565607680e643 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sun, 13 Oct 2002 13:00:34 +0000 Subject: [PATCH] add patches --- net-www/mozilla/ChangeLog | 7 +- .../files/mozilla-1.0.1-bidiselection.patch | 11 + .../mozilla/files/mozilla-1.0.1-nsrange.patch | 104 ++++++ .../files/mozilla-1.0.1-prefcrash.patch | 11 + .../files/mozilla-1.0.1-referrer.patch | 317 ++++++++++++++++++ .../mozilla/files/mozilla-1.0.1-xuldom.patch | 14 + net-www/mozilla/mozilla-1.0.1-r1.ebuild | 10 +- 7 files changed, 472 insertions(+), 2 deletions(-) create mode 100644 net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch create mode 100644 net-www/mozilla/files/mozilla-1.0.1-nsrange.patch create mode 100644 net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch create mode 100644 net-www/mozilla/files/mozilla-1.0.1-referrer.patch create mode 100644 net-www/mozilla/files/mozilla-1.0.1-xuldom.patch diff --git a/net-www/mozilla/ChangeLog b/net-www/mozilla/ChangeLog index 2ab3c73cc3de..34987616d4af 100644 --- a/net-www/mozilla/ChangeLog +++ b/net-www/mozilla/ChangeLog @@ -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 : + 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 : 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 index 000000000000..b0b0c2626ec9 --- /dev/null +++ b/net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch @@ -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 index 000000000000..f50d0e0196c0 --- /dev/null +++ b/net-www/mozilla/files/mozilla-1.0.1-nsrange.patch @@ -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 textText = do_QueryInterface(aNode); ++ if (textText) ++ textText->GetLength(&len); ++ } ++ else ++ { ++ nsCOMPtr 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 tEndContainerText = do_QueryInterface(tEndContainer); +- PRUint32 tInt; +- tEndContainerText->GetLength(&tInt); +- tEndOffset = tInt; +- } +- else +- { +- nsCOMPtrtChildList; +- 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 index 000000000000..c31d2bbad50b --- /dev/null +++ b/net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch @@ -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 index 000000000000..8e8326d2f96f --- /dev/null +++ b/net-www/mozilla/files/mozilla-1.0.1-referrer.patch @@ -0,0 +1,317 @@ +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 +--- mozilla/content/html/content/src/nsHTMLImageElement.cpp 24 Aug 2002 14:40:45 -0000 1.121 ++++ mozilla/content/html/content/src/nsHTMLImageElement.cpp 17 Sep 2002 04:07:27 -0000 +@@ -957,12 +957,17 @@ + + nsCOMPtr doc; + nsCOMPtr loadGroup; ++ nsCOMPtr 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, sup, 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 +--- mozilla/content/xbl/src/nsXBLResourceLoader.cpp 7 Sep 2002 17:08:43 -0000 1.7 ++++ mozilla/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 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 +--- mozilla/layout/base/src/nsImageLoader.cpp 26 Apr 2002 20:44:37 -0000 3.11 ++++ mozilla/layout/base/src/nsImageLoader.cpp 17 Sep 2002 04:07:48 -0000 +@@ -92,8 +92,6 @@ + return NS_ERROR_FAILURE; + + nsCOMPtr loadGroup; +- nsCOMPtr uri; +- nsCOMPtr baseURI; + + nsCOMPtr 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 documentURI; ++ doc->GetDocumentURL(getter_AddRefs(documentURI)); ++ + if (mRequest) { + nsCOMPtr oldURI; + mRequest->GetURI(getter_AddRefs(oldURI)); +@@ -119,7 +121,8 @@ + nsCOMPtr 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 +--- mozilla/layout/html/base/src/nsBulletFrame.cpp 12 Jul 2002 20:46:19 -0000 1.79 ++++ mozilla/layout/html/base/src/nsBulletFrame.cpp 17 Sep 2002 04:07:49 -0000 +@@ -134,6 +134,16 @@ + nsCOMPtr imgURI; + NS_NewURI(getter_AddRefs(imgURI), myList->mListStyleImage, nsnull, baseURI); + ++ // Get the document URI for the referrer... ++ nsCOMPtr documentURI; ++ nsCOMPtr 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 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 documentURI; ++ nsCOMPtr 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 +--- mozilla/layout/html/base/src/nsImageFrame.cpp 3 Sep 2002 22:49:51 -0000 1.248 ++++ mozilla/layout/html/base/src/nsImageFrame.cpp 17 Sep 2002 04:07:49 -0000 +@@ -2001,8 +2001,19 @@ + + nsCOMPtr baseURI; + rv = aPresContext->GetBaseURL(getter_AddRefs(baseURI)); ++ ++ // Get the document URI for the referrer... ++ nsCOMPtr documentURI; ++ nsCOMPtr doc; ++ if (mContent) { ++ (void) mContent->GetDocument(*getter_AddRefs(doc)); ++ if (doc) { ++ doc->GetDocumentURL(getter_AddRefs(documentURI)); ++ } ++ } ++ + nsCOMPtr 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 +--- mozilla/layout/xul/base/src/nsImageBoxFrame.cpp 23 May 2002 00:00:32 -0000 1.39 ++++ mozilla/layout/xul/base/src/nsImageBoxFrame.cpp 17 Sep 2002 04:07:54 -0000 +@@ -456,7 +456,18 @@ + nsCOMPtr 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 documentURI; ++ nsCOMPtr 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 +--- mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp 7 Sep 2002 05:37:42 -0000 1.136 ++++ mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp 17 Sep 2002 04:07:54 -0000 +@@ -1862,8 +1862,14 @@ + + nsresult rv; + nsCOMPtr il(do_GetService("@mozilla.org/image/loader;1", &rv)); ++ ++ // Get the documment URI for the referrer. ++ nsCOMPtr 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 +--- mozilla/modules/libpr0n/public/imgILoader.idl 23 Mar 2002 13:21:27 -0000 1.8 ++++ mozilla/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 +--- mozilla/modules/libpr0n/src/imgLoader.cpp 12 Sep 2002 08:42:39 -0000 1.50 ++++ mozilla/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 newHttpChannel = do_QueryInterface(newChannel); + if (newHttpChannel) { +- newHttpChannel->SetDocumentURI(parentURI); ++ newHttpChannel->SetDocumentURI(initialDocumentURI); + } + + if (aLoadGroup) { +@@ -348,24 +355,8 @@ + nsCOMPtr httpChannel(do_QueryInterface(newChannel)); + + if (httpChannel) { +- nsresult rv; +- // Get the defloadRequest from the loadgroup +- nsCOMPtr defLoadRequest; +- rv = aLoadGroup->GetDefaultLoadRequest(getter_AddRefs(defLoadRequest)); +- +- if (NS_SUCCEEDED(rv) && defLoadRequest) { +- nsCOMPtr reqChannel(do_QueryInterface(defLoadRequest)); +- +- if (reqChannel) { +- // Get the referrer from the loadchannel +- nsCOMPtr 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); + } + } + 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 index 000000000000..143ad0c038b0 --- /dev/null +++ b/net-www/mozilla/files/mozilla-1.0.1-xuldom.patch @@ -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 newcontent = do_QueryInterface(aNewChild); + NS_ASSERTION(newcontent != nsnull, "not an nsIContent"); + if (! newcontent) diff --git a/net-www/mozilla/mozilla-1.0.1-r1.ebuild b/net-www/mozilla/mozilla-1.0.1-r1.ebuild index ca8437453c9e..a5a9baa6ba40 100644 --- a/net-www/mozilla/mozilla-1.0.1-r1.ebuild +++ b/net-www/mozilla/mozilla-1.0.1-r1.ebuild @@ -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" ] -- 2.26.2