diff --git a/mozilla/gfx/src/photon/nsDrawingSurfacePh.cpp b/mozilla/gfx/src/photon/nsDrawingSurfacePh.cpp index 249829a1f60..7ac9da97b08 100644 --- a/mozilla/gfx/src/photon/nsDrawingSurfacePh.cpp +++ b/mozilla/gfx/src/photon/nsDrawingSurfacePh.cpp @@ -138,7 +138,7 @@ NS_IMETHODIMP nsDrawingSurfacePh :: Lock(PRInt32 aX, PRInt32 aY, PhDim_t dim; short bytes_per_pixel = 3; - image = PR_CALLOC( sizeof(PhImage_t) ); + image = (PhImage_t *) PR_CALLOC( sizeof(PhImage_t) ); if (image == NULL) { abort(); @@ -293,7 +293,7 @@ NS_IMETHODIMP nsDrawingSurfacePh :: Init( PhGC_t * &aGC, PRUint32 aWidth, abort(); } - mPixmap = PR_CALLOC(sizeof(PhImage_t) ); + mPixmap = (PhImage_t *) PR_CALLOC(sizeof(PhImage_t) ); if (mPixmap == NULL) { NS_ASSERTION(NULL, "nsDrawingSurfacePh::Init can't CALLOC pixmap, out of memory"); diff --git a/mozilla/gfx/src/photon/nsImagePh.cpp b/mozilla/gfx/src/photon/nsImagePh.cpp index b395ce68dd5..e657cf21992 100644 --- a/mozilla/gfx/src/photon/nsImagePh.cpp +++ b/mozilla/gfx/src/photon/nsImagePh.cpp @@ -163,8 +163,10 @@ nsresult nsImagePh :: Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth,nsMas mImage.size.w = mWidth; mImage.size.h = mHeight; mImage.palette_tag = 0; // REVISIT - A CRC value for PhRelay ??? +#ifdef PHOTON1_ONLY mImage.xscale = 1; // scaling is integral only mImage.yscale = 1; +#endif mImage.format = 0; // not used mImage.flags = 0; mImage.ghost_bpl = 0; @@ -485,8 +487,8 @@ NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsDrawingSurface /* Try to dump the image to a BMP file */ PR_LOG(PhGfxLog, PR_LOG_DEBUG,("nsImagePh::Draw2 Dump image to BMP\n")); - unsigned char *ptr; - ptr = mImage.image; + char *ptr; + ptr = (char *) mImage.image; PR_LOG(PhGfxLog, PR_LOG_DEBUG,("nsImagePh::Draw2 Dump image info w,h,d=(%d,%d,%d) mColorMap=<%p> \n", mWidth, mHeight, mDepth, mColorMap)); diff --git a/mozilla/gfx/src/photon/nsRegionPh.cpp b/mozilla/gfx/src/photon/nsRegionPh.cpp index 87acf2ef9d2..b136c5cbb96 100644 --- a/mozilla/gfx/src/photon/nsRegionPh.cpp +++ b/mozilla/gfx/src/photon/nsRegionPh.cpp @@ -304,10 +304,10 @@ void nsRegionPh :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRI { PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRegionPh::GetBoundingBox t=<%p> t->next=<%p>\n", t, t->next)); - *aX = min(*aX, tulx); - *aY = min(*aY, tuly); - bX = max(bX, tlrx); - bY = max(bY, tlry); + *aX = PR_MIN(*aX, tulx); + *aY = PR_MIN(*aY, tuly); + bX = PR_MAX(bX, tlrx); + bY = PR_MAX(bY, tlry); t = t->next; } diff --git a/mozilla/gfx/src/photon/nsRenderingContextPh.cpp b/mozilla/gfx/src/photon/nsRenderingContextPh.cpp index dfa62e9666d..e26ad643208 100644 --- a/mozilla/gfx/src/photon/nsRenderingContextPh.cpp +++ b/mozilla/gfx/src/photon/nsRenderingContextPh.cpp @@ -865,7 +865,8 @@ NS_IMETHODIMP nsRenderingContextPh :: CreateDrawingSurface(nsRect *aBounds, PRUi if (surf) { NS_ADDREF(surf); - surf->Init(mSurface->GetGC(), aBounds->width, aBounds->height, aSurfFlags); + PhGC_t *gc = mSurface->GetGC(); + surf->Init(gc, aBounds->width, aBounds->height, aSurfFlags); } else { diff --git a/mozilla/widget/src/photon/PtRawDrawContainer.cpp b/mozilla/widget/src/photon/PtRawDrawContainer.cpp index 9bd4b7da819..a9f894a6fed 100644 --- a/mozilla/widget/src/photon/PtRawDrawContainer.cpp +++ b/mozilla/widget/src/photon/PtRawDrawContainer.cpp @@ -1,6 +1,7 @@ /* PtRawDrawContainer.c - widget source file */ #include "PtRawDrawContainer.h" +#include /* prototype declarations */ PtWidgetClass_t *CreateRawDrawContainerClass( void ); diff --git a/mozilla/widget/src/photon/nsAppShell.cpp b/mozilla/widget/src/photon/nsAppShell.cpp index dae15b85d5a..a8dfb910a6d 100644 --- a/mozilla/widget/src/photon/nsAppShell.cpp +++ b/mozilla/widget/src/photon/nsAppShell.cpp @@ -106,7 +106,7 @@ EventQueueTokenQueue::~EventQueueTokenQueue() // are referenced by things that leak, so this assertion goes off a lot.) if (mHead) { - int err=PtAppRemoveFd(NULL,mHead->mQueue->GetEventQueueSelectFD()); + int err=PtAppRemoveFd(NULL,mHead->mToken); if (err==-1) { printf ("nsAppShell::~EventQueueTokenQueue Run Error calling PtAppRemoveFd\n"); diff --git a/mozilla/widget/src/photon/nsScrollbar.cpp b/mozilla/widget/src/photon/nsScrollbar.cpp index 89fb3476fa8..a21efa818c5 100644 --- a/mozilla/widget/src/photon/nsScrollbar.cpp +++ b/mozilla/widget/src/photon/nsScrollbar.cpp @@ -160,11 +160,14 @@ NS_METHOD nsScrollbar::SetPosition (PRUint32 aPos) { PtArg_t arg; +#ifdef PHOTON1_ONLY PtSetArg( &arg, Pt_ARG_SCROLL_POSITION, aPos, 0 ); if( PtSetResources( mWidget, 1, &arg ) == 0 ) { res = NS_OK; } +#endif + } return res; @@ -184,13 +187,14 @@ NS_METHOD nsScrollbar::GetPosition (PRUint32 & aPos) { PtArg_t arg; int *pos; - +#ifdef PHOTON1_ONLY PtSetArg( &arg, Pt_ARG_SCROLL_POSITION, &pos, 0 ); if( PtGetResources( mWidget, 1, &arg ) == 0 ) { aPos = *pos; res = NS_OK; } +#endif } PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsScrollbar::GetPosition position=<%d>\n", aPos)); @@ -325,7 +329,9 @@ NS_METHOD nsScrollbar::SetParameters (PRUint32 aMaxRange, PRUint32 aThumbSize, PtSetArg( &arg[0], Pt_ARG_MAXIMUM , aMaxRange, 0 ); PtSetArg( &arg[1], Pt_ARG_SLIDER_SIZE , aThumbSize, 0 ); +#ifdef PHOTON1_ONLY PtSetArg( &arg[2], Pt_ARG_SCROLL_POSITION , aPosition, 0 ); +#endif PtSetArg( &arg[3], Pt_ARG_INCREMENT, aLineIncrement, 0 ); if( PtSetResources( mWidget, 4, arg ) == 0 ) diff --git a/mozilla/widget/src/photon/nsWindow.cpp b/mozilla/widget/src/photon/nsWindow.cpp index 65c415e00b2..7fab87579ca 100644 --- a/mozilla/widget/src/photon/nsWindow.cpp +++ b/mozilla/widget/src/photon/nsWindow.cpp @@ -907,7 +907,7 @@ NS_METHOD nsWindow::ShowMenuBar( PRBool aShow) PhDim_t win_dim; PtWidget_t *menubar; - mMenuBar->GetNativeData( menubar ); + mMenuBar->GetNativeData( (void *) menubar ); if( mMenuBarVis ) {