bug 88685 part 2 remove USE_IMG2 ifdefs, r=caillon sr=tor
git-svn-id: svn://10.0.0.236/trunk@130657 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
274e6a552f
commit
609a122f4e
@ -89,12 +89,10 @@
|
||||
#include "nsITheme.h"
|
||||
#include "nsITimelineService.h"
|
||||
#include "nsITimerInternal.h"
|
||||
#ifdef USE_IMG2
|
||||
#include "imgIRequest.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "imgIContainerObserver.h"
|
||||
#include "imgILoader.h"
|
||||
#endif
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiPresUtils.h"
|
||||
@ -1786,7 +1784,6 @@ nsTreeBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsTreeColumn* aCol)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_IMG2
|
||||
nsresult
|
||||
nsTreeBodyFrame::GetImage(PRInt32 aRowIndex, const PRUnichar* aColID, PRBool aUseContext,
|
||||
nsIStyleContext* aStyleContext, imgIContainer** aResult)
|
||||
@ -1880,7 +1877,6 @@ nsTreeBodyFrame::GetImage(PRInt32 aRowIndex, const PRUnichar* aColID, PRBool aUs
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
nsRect nsTreeBodyFrame::GetImageSize(PRInt32 aRowIndex, const PRUnichar* aColID, PRBool aUseContext,
|
||||
nsIStyleContext* aStyleContext)
|
||||
@ -1929,7 +1925,6 @@ nsRect nsTreeBodyFrame::GetImageSize(PRInt32 aRowIndex, const PRUnichar* aColID,
|
||||
else
|
||||
needHeight = PR_TRUE;
|
||||
|
||||
#ifdef USE_IMG2
|
||||
// We have to load image even though we already have a size.
|
||||
// Don't change this, otherwise things start to go crazy.
|
||||
nsCOMPtr<imgIContainer> image;
|
||||
@ -1953,7 +1948,6 @@ nsRect nsTreeBodyFrame::GetImageSize(PRInt32 aRowIndex, const PRUnichar* aColID,
|
||||
r.height += NSIntPixelsToTwips(height, p2t);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return r;
|
||||
@ -2669,7 +2663,6 @@ nsTreeBodyFrame::PaintImage(PRInt32 aRowIndex,
|
||||
AdjustForBorderPadding(imageContext, imageRect);
|
||||
AdjustForBorderPadding(imageContext, imageSize);
|
||||
|
||||
#ifdef USE_IMG2
|
||||
// Get the image for drawing.
|
||||
nsCOMPtr<imgIContainer> image;
|
||||
GetImage(aRowIndex, aColumn->GetID().get(), PR_FALSE, imageContext, getter_AddRefs(image));
|
||||
@ -2694,7 +2687,6 @@ nsTreeBodyFrame::PaintImage(PRInt32 aRowIndex,
|
||||
// Paint the image.
|
||||
aRenderingContext.DrawImage(image, &imageSize, &p);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -3739,7 +3731,6 @@ nsTreeBodyFrame::ScrollCallback(nsITimer *aTimer, void *aClosure)
|
||||
// The ImageListener implementation
|
||||
// ==============================================================================
|
||||
|
||||
#ifdef USE_IMG2
|
||||
NS_IMPL_ISUPPORTS3(nsTreeImageListener, imgIDecoderObserver, imgIContainerObserver, nsITreeImageListener)
|
||||
|
||||
nsTreeImageListener::nsTreeImageListener(nsITreeBoxObject* aTree, const PRUnichar* aColID)
|
||||
@ -3820,4 +3811,3 @@ nsTreeImageListener::Invalidate()
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -52,9 +52,7 @@
|
||||
#include "nsITimer.h"
|
||||
#include "nsIReflowCallback.h"
|
||||
|
||||
#ifdef USE_IMG2
|
||||
#include "imgIDecoderObserver.h"
|
||||
#endif
|
||||
|
||||
class nsSupportsHashtable;
|
||||
|
||||
@ -199,7 +197,6 @@ private:
|
||||
PRInt32 mColIndex;
|
||||
};
|
||||
|
||||
#ifdef USE_IMG2
|
||||
// The interface for our image listener.
|
||||
// {90586540-2D50-403e-8DCE-981CAA778444}
|
||||
#define NS_ITREEIMAGELISTENER_IID \
|
||||
@ -235,7 +232,6 @@ private:
|
||||
nsString mColID;
|
||||
nsITreeBoxObject* mTree;
|
||||
};
|
||||
#endif
|
||||
|
||||
// The actual frame that paints the cells and rows.
|
||||
class nsTreeBodyFrame : public nsLeafBoxFrame, public nsITreeBoxObject, public nsICSSPseudoComparator,
|
||||
@ -381,11 +377,9 @@ protected:
|
||||
nsresult GetItemWithinCellAt(PRInt32 aX, const nsRect& aCellRect, PRInt32 aRowIndex,
|
||||
nsTreeColumn* aColumn, PRUnichar** aChildElt);
|
||||
|
||||
#ifdef USE_IMG2
|
||||
// Fetch an image from the image cache.
|
||||
nsresult GetImage(PRInt32 aRowIndex, const PRUnichar* aColID, PRBool aUseContext,
|
||||
nsIStyleContext* aStyleContext, imgIContainer** aResult);
|
||||
#endif
|
||||
|
||||
// Returns the size of a given image. This size *includes* border and
|
||||
// padding. It does not include margins.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user