new use of enumerator class changed IsDone to return NS_COMFALSE if not done

This commit is contained in:
mjudge%netscape.com 1998-12-03 21:44:54 +00:00
parent da56c11be1
commit 2d6a42cd38
7 changed files with 39 additions and 2 deletions

View File

@ -82,11 +82,13 @@ PRBool nsFrame::mDidDrag = PR_FALSE;
PRInt32 nsFrame::mStartPos = 0;
// Selection data is valid only from the Mouse Press to the Mouse Release
#if XP_NEW_SELECTION
#else
nsSelectionRange * nsFrame::mSelectionRange = nsnull;
nsISelection * nsFrame::mSelection = nsnull;
nsSelectionPoint * nsFrame::mStartSelectionPoint = nsnull;
nsSelectionPoint * nsFrame::mEndSelectionPoint = nsnull;
#endif
//----------------------------------------------------------------------
@ -601,7 +603,10 @@ NS_IMETHODIMP nsFrame::Paint(nsIPresContext& aPresContext,
nsIPresShell * shell = aPresContext.GetShell();
nsIDocument * doc = shell->GetDocument();
if (mSelectionRange == nsnull) { // Get Selection Object
#if XP_NEW_SELECTION
#else
nsISelection * selection;
#endif
doc->GetSelection(selection);
mSelectionRange = selection->GetRange();
@ -701,7 +706,10 @@ NS_IMETHODIMP nsFrame::HandlePress(nsIPresContext& aPresContext,
gDoc = shell->GetDocument();
#if XP_NEW_SELECTION
#else
nsISelection * selection;
#endif
gDoc->GetSelection(selection);
shell->CreateRenderingContext(this, acx);

View File

@ -351,11 +351,14 @@ protected:
static PRInt32 mStartPos;
// Selection data is valid only from the Mouse Press to the Mouse Release
#if XP_NEW_SELECTION
#else
static nsSelectionRange * mSelectionRange;
static nsISelection * mSelection;
static nsSelectionPoint * mStartSelectionPoint;
static nsSelectionPoint * mEndSelectionPoint;
#endif //XP_NEW_SELECTION
///////////////////////////////////

View File

@ -39,7 +39,10 @@
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
#include "nsXIFConverter.h"
#if XP_NEW_SELECTION
#else
#include "nsISelection.h"
#endif
#include "nsSelectionRange.h"
#include "nsHTMLAtoms.h"
@ -583,7 +586,10 @@ TextFrame::ComputeSelectionInfo(nsIRenderingContext& aRenderingContext,
aResult.mEndOffset = aTextLength;
aResult.mEmptySelection = PR_FALSE;
#if XP_NEW_SELECTION
#else
nsISelection * selection;
#endif
aDocument->GetSelection(selection);
nsSelectionRange * range = selection->GetRange();

View File

@ -21,6 +21,9 @@ LIBRARY_NAME=raptorhtmlbase_s
MODULE=raptor
REQUIRES=xpcom raptor js
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
CPPSRCS= \
nsAbsoluteFrame.cpp \

View File

@ -82,11 +82,13 @@ PRBool nsFrame::mDidDrag = PR_FALSE;
PRInt32 nsFrame::mStartPos = 0;
// Selection data is valid only from the Mouse Press to the Mouse Release
#if XP_NEW_SELECTION
#else
nsSelectionRange * nsFrame::mSelectionRange = nsnull;
nsISelection * nsFrame::mSelection = nsnull;
nsSelectionPoint * nsFrame::mStartSelectionPoint = nsnull;
nsSelectionPoint * nsFrame::mEndSelectionPoint = nsnull;
#endif
//----------------------------------------------------------------------
@ -601,7 +603,10 @@ NS_IMETHODIMP nsFrame::Paint(nsIPresContext& aPresContext,
nsIPresShell * shell = aPresContext.GetShell();
nsIDocument * doc = shell->GetDocument();
if (mSelectionRange == nsnull) { // Get Selection Object
#if XP_NEW_SELECTION
#else
nsISelection * selection;
#endif
doc->GetSelection(selection);
mSelectionRange = selection->GetRange();
@ -701,7 +706,10 @@ NS_IMETHODIMP nsFrame::HandlePress(nsIPresContext& aPresContext,
gDoc = shell->GetDocument();
#if XP_NEW_SELECTION
#else
nsISelection * selection;
#endif
gDoc->GetSelection(selection);
shell->CreateRenderingContext(this, acx);

View File

@ -351,11 +351,14 @@ protected:
static PRInt32 mStartPos;
// Selection data is valid only from the Mouse Press to the Mouse Release
#if XP_NEW_SELECTION
#else
static nsSelectionRange * mSelectionRange;
static nsISelection * mSelection;
static nsSelectionPoint * mStartSelectionPoint;
static nsSelectionPoint * mEndSelectionPoint;
#endif //XP_NEW_SELECTION
///////////////////////////////////

View File

@ -39,7 +39,10 @@
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
#include "nsXIFConverter.h"
#if XP_NEW_SELECTION
#else
#include "nsISelection.h"
#endif
#include "nsSelectionRange.h"
#include "nsHTMLAtoms.h"
@ -583,7 +586,10 @@ TextFrame::ComputeSelectionInfo(nsIRenderingContext& aRenderingContext,
aResult.mEndOffset = aTextLength;
aResult.mEmptySelection = PR_FALSE;
#if XP_NEW_SELECTION
#else
nsISelection * selection;
#endif
aDocument->GetSelection(selection);
nsSelectionRange * range = selection->GetRange();