Sei un pazzo!!

Questo è quello che posso definire un complimento

. Il mondo è pieno di gente malata... uno più uno meno

jimmy_page_89 ha scritto:mi daresti le patch? che lo provo anche io
Auguri...
non garantisco, e non mi assumo alcuna responsabilità.
Ho dovuto fare qualche modifica a qualcuna delle patch per farle funzionare e spero di non aver introdotto bachi.
Vanno applicate in ordine.
L'undicesima è un po' bacata, quindi ho dovuto aggiungere la dodicesima che è un pezzo della undicesima. Se applicando la dodicesima vi dice che è già applicata allora significa che l'undicesima (non sapete quanto ci ho sbattuto) è bacata solo per me.
Le modifiche delle patch (per trasparenza):
la 3:
- Codice: Seleziona tutto
--- orig/patch3v4-557877-Implementation_for_nsLayoutUtils.diff 2011-09-04 22:00:21.501119700 +0200
+++ patch3v4-557877-Implementation_for_nsLayoutUtils.diff 2011-09-04 22:03:49.436520149 +0200
@@ -108,12 +108,7 @@
diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
-@@ -1423,16 +1423,59 @@ public:
-
- /**
- * Checks if CSS 3D transforms are currently enabled.
- */
- static PRBool Are3DTransformsEnabled();
+@@ -1423,11 +1423,54 @@ public:
static void Shutdown();
la 9:
- Codice: Seleziona tutto
--- orig/patch9v4-557884-Implementation_for_xul_tree.diff 2011-09-04 22:00:21.501119700 +0200
+++ patch9v4-557884-Implementation_for_xul_tree.diff 2011-09-04 22:09:45.640066991 +0200
@@ -312,7 +312,7 @@
#include "nsDataHashtable.h"
#include "imgIRequest.h"
#include "imgIDecoderObserver.h"
- #include "nsScrollbarFrame.h"
+ #include "nsIScrollbarFrame.h"
#include "nsThreadUtils.h"
+#include "nsITreeImageListener.h"
la 11
- Codice: Seleziona tutto
--- orig/patch11v11-557886-Implementation_for_RasterImage.diff 2011-09-04 22:00:21.500119713 +0200
+++ patch11v11-557886-Implementation_for_RasterImage.diff 2011-09-04 23:35:02.920092206 +0200
@@ -153,7 +153,7 @@
+ return;
+ }
+
-+ EnsureAnimExists();
++ ensureAnimExists();
+
+ // only advance the frame if the current time is greater than or
+ // equal to the current frame's end time.
@@ -240,7 +240,8 @@
NS_ABORT_IF_FALSE(ShouldAnimate(), "Should not animate!");
- EnsureAnimExists();
+ if (!ensureAnimExists())
+ return NS_ERROR_OUT_OF_MEMORY;
- NS_ABORT_IF_FALSE(mAnim && !mAnim->timer, "Anim must exist and not have a timer yet");
-
@@ -437,10 +438,10 @@
diff --git a/modules/libpr0n/src/RasterImage.h b/modules/libpr0n/src/RasterImage.h
--- a/modules/libpr0n/src/RasterImage.h
+++ b/modules/libpr0n/src/RasterImage.h
-@@ -65,42 +65,61 @@
+@@ -65,41 +65,61 @@
#include "nsThreadUtils.h"
#include "DiscardTracker.h"
- #include "mozilla/TimeStamp.h"
++ #include "mozilla/TimeStamp.h"
#ifdef DEBUG
#include "imgIContainerDebug.h"
#endif
@@ -512,7 +513,7 @@
class imgDecodeWorker;
class Decoder;
- class RasterImage : public Image
+ class RasterImage : public mozilla::imagelib::Image
- , public nsITimerCallback
, public nsIProperties
, public nsSupportsWeakReference
@@ -552,12 +553,7 @@
* and just hand this back to the caller when it is time to draw the frame.
* NOTE: When clearing compositingFrame, remember to set
* lastCompositedFrameIndex to -1. Code assume that if
-@@ -347,49 +368,60 @@ private:
- nsAutoPtr<imgFrame> compositingFrame;
- /** the previous composited frame, for DISPOSE_RESTORE_PREVIOUS
- *
- * The Previous Frame (all frames composited up to the current) needs to be
- * stored in cases where the image specifies it wants the last frame back
+@@ -347,36 +368,47 @@ private:
* when it's done with the current frame.
*/
nsAutoPtr<imgFrame> compositingPrevFrame;
@@ -609,7 +605,6 @@
*/
void DeleteImgFrame(PRUint32 framenum);
- imgFrame* GetImgFrameNoDecode(PRUint32 framenum);
imgFrame* GetImgFrame(PRUint32 framenum);
imgFrame* GetDrawableImgFrame(PRUint32 framenum);
imgFrame* GetCurrentImgFrame();
@@ -617,29 +612,3 @@
PRUint32 GetCurrentImgFrameIndex() const;
+ mozilla::TimeStamp GetCurrentImgFrameEndTime() const;
- inline void EnsureAnimExists()
- {
- if (!mAnim) {
-
- // Create the animation context
- mAnim = new Anim();
-
-@@ -400,17 +432,17 @@ private:
- // data too. However, doing this is actually hard, because we're probably
- // calling ensureAnimExists mid-decode, and thus we're decoding out of
- // the source buffer. Since we're going to fix this anyway later, and
- // since we didn't kill the source data in the old world either, locking
- // is acceptable for the moment.
- LockImage();
- }
- }
--
-+
- /** Function for doing the frame compositing of animations
- *
- * @param aFrameToUse Set by DoComposite
- * (aNextFrame, compositingFrame, or compositingPrevFrame)
- * @param aDirtyRect Area that the display will need to update
- * @param aPrevFrame Last Frame seen/processed
- * @param aNextFrame Frame we need to incorperate/display
- * @param aNextFrameIndex Position of aNextFrame in mFrames list
e la 12 invece è nuova
- Codice: Seleziona tutto
--- modules/libpr0n/src/RasterImage.cpp 2011-09-04 23:31:05.305062784 +0200
+++ modules/libpr0n/src/RasterImage.cpp.1 2011-09-04 23:45:26.848292013 +0200
@@ -1428,131 +1428,6 @@
}
//******************************************************************************
-/* void notify(in nsITimer timer); */
-NS_IMETHODIMP
-RasterImage::Notify(nsITimer *timer)
-{
-#ifdef DEBUG
- mFramesNotified++;
-#endif
-
- // This should never happen since the timer is only set up in StartAnimation()
- // after mAnim is checked to exist.
- NS_ABORT_IF_FALSE(mAnim, "Need anim for Notify()");
- NS_ABORT_IF_FALSE(timer, "Need timer for Notify()");
- NS_ABORT_IF_FALSE(mAnim->timer == timer,
- "RasterImage::Notify() called with incorrect timer");
-
- if (!mAnimating || !ShouldAnimate())
- return NS_OK;
-
- nsCOMPtr<imgIContainerObserver> observer(do_QueryReferent(mObserver));
- if (!observer) {
- // the imgRequest that owns us is dead, we should die now too.
- NS_ABORT_IF_FALSE(mAnimationConsumers == 0,
- "If no observer, should have no consumers");
- if (mAnimating)
- StopAnimation();
- return NS_OK;
- }
-
- if (mFrames.Length() == 0)
- return NS_OK;
-
- imgFrame *nextFrame = nsnull;
- PRInt32 previousFrameIndex = mAnim->currentAnimationFrameIndex;
- PRUint32 nextFrameIndex = mAnim->currentAnimationFrameIndex + 1;
- PRInt32 timeout = 0;
-
- // Figure out if we have the next full frame. This is more complicated than
- // just checking for mFrames.Length() because decoders append their frames
- // before they're filled in.
- NS_ABORT_IF_FALSE(mDecoder || nextFrameIndex <= mFrames.Length(),
- "How did we get 2 indicies too far by incrementing?");
- bool haveFullNextFrame = !mDecoder || nextFrameIndex < mDecoder->GetCompleteFrameCount();
-
- // If we don't have the next full frame, it had better be in the pipe.
- NS_ABORT_IF_FALSE(haveFullNextFrame ||
- (mDecoder && mFrames.Length() > mDecoder->GetCompleteFrameCount()),
- "What is the next frame supposed to be?");
-
- // If we're done decoding the next frame, go ahead and display it now and
- // reinit the timer with the next frame's delay time.
- if (haveFullNextFrame) {
- if (mFrames.Length() == nextFrameIndex) {
- // End of Animation
-
- // If animation mode is "loop once", it's time to stop animating
- if (mAnimationMode == kLoopOnceAnimMode || mLoopCount == 0) {
- mAnimationFinished = PR_TRUE;
- EvaluateAnimation();
- return NS_OK;
- } else {
- // We may have used compositingFrame to build a frame, and then copied
- // it back into mFrames[..]. If so, delete composite to save memory
- if (mAnim->compositingFrame && mAnim->lastCompositedFrameIndex == -1)
- mAnim->compositingFrame = nsnull;
- }
-
- nextFrameIndex = 0;
- if (mLoopCount > 0)
- mLoopCount--;
- }
-
- if (!(nextFrame = mFrames[nextFrameIndex])) {
- // something wrong with the next frame, skip it
- mAnim->currentAnimationFrameIndex = nextFrameIndex;
- mAnim->timer->SetDelay(100);
- return NS_OK;
- }
- timeout = nextFrame->GetTimeout();
-
- } else {
- // Uh oh, the frame we want to show is currently being decoded (partial)
- // Wait a bit and try again
- mAnim->timer->SetDelay(100);
- return NS_OK;
- }
-
- if (timeout > 0)
- mAnim->timer->SetDelay(timeout);
- else {
- mAnimationFinished = PR_TRUE;
- EvaluateAnimation();
- }
-
- nsIntRect dirtyRect;
- imgFrame *frameToUse = nsnull;
-
- if (nextFrameIndex == 0) {
- frameToUse = nextFrame;
- dirtyRect = mAnim->firstFrameRefreshArea;
- } else {
- imgFrame *prevFrame = mFrames[previousFrameIndex];
- if (!prevFrame)
- return NS_OK;
-
- // Change frame and announce it
- if (NS_FAILED(DoComposite(&frameToUse, &dirtyRect, prevFrame,
- nextFrame, nextFrameIndex))) {
- // something went wrong, move on to next
- NS_WARNING("RasterImage::Notify(): Composing Frame Failed\n");
- nextFrame->SetCompositingFailed(PR_TRUE);
- mAnim->currentAnimationFrameIndex = nextFrameIndex;
- return NS_OK;
- } else {
- nextFrame->SetCompositingFailed(PR_FALSE);
- }
- }
- // Set currentAnimationFrameIndex at the last possible moment
- mAnim->currentAnimationFrameIndex = nextFrameIndex;
- // Refreshes the screen
- observer->FrameChanged(this, &dirtyRect);
-
- return NS_OK;
-}
-
-//******************************************************************************
// DoComposite gets called when the timer for animation get fired and we have to
// update the composited frame of the animation.
nsresult
Per qualche patch potrebbe esserre necessario aggiungere -l al comando patch