From ce74ff7c22983e25d55829db543c2fc4f4d00a64 Mon Sep 17 00:00:00 2001 From: "peter%propagandism.org" Date: Thu, 30 Oct 2003 12:32:41 +0000 Subject: [PATCH] Fix for bug 215465 (CSS :hover rules not working when using XML/XSLT along with an alternernate CSS). Fix by bz, r=sicking, sr=peterv. git-svn-id: svn://10.0.0.236/trunk@148562 18797224-902f-48f8-a5cc-f745e15eee43 --- .../transformiix/source/xslt/txMozillaXMLOutput.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp b/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp index 280e5ed1dc7..f13438992d8 100644 --- a/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp @@ -841,9 +841,15 @@ txTransformNotifier::ScriptEvaluated(nsresult aResult, NS_IMETHODIMP txTransformNotifier::StyleSheetLoaded(nsICSSStyleSheet* aSheet, PRBool aNotify) { - // aSheet might not be in our list if the load was done synchronously - mStylesheets.RemoveObject(aSheet); - SignalTransformEnd(); + // Check that the stylesheet was in the mStylesheets array, if not it is an + // alternate and we don't want to call SignalTransformEnd since we don't + // wait on alternates before calling OnTransformDone and so the load of the + // alternate could finish after we called OnTransformDone already. + // See http://bugzilla.mozilla.org/show_bug.cgi?id=215465. + if (mStylesheets.RemoveObject(aSheet)) { + SignalTransformEnd(); + } + return NS_OK; }