Changed some of the member functions to conform to XP-COM conventions for

returning a nsresult
This commit is contained in:
troy%netscape.com 1998-12-29 04:56:31 +00:00
Родитель 583682a5c1
Коммит 487a0952b3
4 изменённых файлов: 36 добавлений и 28 удалений

Просмотреть файл

@ -74,10 +74,10 @@ public:
NS_IMETHOD ExitReflowLock() = 0;
// Make shell be a document observer
virtual void BeginObservingDocument() = 0;
NS_IMETHOD BeginObservingDocument() = 0;
// Make shell stop being a document observer
virtual void EndObservingDocument() = 0;
NS_IMETHOD EndObservingDocument() = 0;
/**
* Perform the initial reflow. Constructs the frame for the root content
@ -135,9 +135,9 @@ public:
NS_IMETHOD SetPlaceholderFrameFor(nsIFrame* aFrame,
nsIFrame* aPlaceholderFrame) = 0;
virtual void AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
virtual void ProcessReflowCommands() = 0;
NS_IMETHOD ProcessReflowCommands() = 0;
virtual void ClearFrameRefs(nsIFrame* aFrame) = 0;
/**

Просмотреть файл

@ -233,8 +233,8 @@ public:
virtual nsresult GetSelection(nsISelection **aSelection);
NS_IMETHOD EnterReflowLock();
NS_IMETHOD ExitReflowLock();
virtual void BeginObservingDocument();
virtual void EndObservingDocument();
NS_IMETHOD BeginObservingDocument();
NS_IMETHOD EndObservingDocument();
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight);
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight);
NS_IMETHOD StyleChangeReflow();
@ -245,8 +245,8 @@ public:
nsIFrame*& aPlaceholderFrame) const;
NS_IMETHOD SetPlaceholderFrameFor(nsIFrame* aFrame,
nsIFrame* aPlaceholderFrame);
virtual void AppendReflowCommand(nsIReflowCommand* aReflowCommand);
virtual void ProcessReflowCommands();
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand);
NS_IMETHOD ProcessReflowCommands();
virtual void ClearFrameRefs(nsIFrame*);
NS_IMETHOD CreateRenderingContext(nsIFrame *aFrame, nsIRenderingContext *&aContext);
@ -566,21 +566,23 @@ PresShell::GetSelection(nsISelection **aSelection)
// Make shell be a document observer
void
NS_IMETHODIMP
PresShell::BeginObservingDocument()
{
if (nsnull != mDocument) {
mDocument->AddObserver(this);
}
return NS_OK;
}
// Make shell stop being a document observer
void
NS_IMETHODIMP
PresShell::EndObservingDocument()
{
if (nsnull != mDocument) {
mDocument->RemoveObserver(this);
}
return NS_OK;
}
NS_IMETHODIMP
@ -826,19 +828,19 @@ PresShell::EndReflow(nsIDocument *aDocument, nsIPresShell* aShell)
return NS_OK;
}
void
NS_IMETHODIMP
PresShell::AppendReflowCommand(nsIReflowCommand* aReflowCommand)
{
#ifdef NS_DEBUG
if (mInVerifyReflow) {
return;
return NS_OK;
}
#endif
mReflowCommands.AppendElement(aReflowCommand);
NS_ADDREF(aReflowCommand);
return mReflowCommands.AppendElement(aReflowCommand);
}
void
NS_IMETHODIMP
PresShell::ProcessReflowCommands()
{
if (0 != mReflowCommands.Count()) {
@ -899,6 +901,8 @@ PresShell::ProcessReflowCommands()
}
#endif
}
return NS_OK;
}
void

Просмотреть файл

@ -74,10 +74,10 @@ public:
NS_IMETHOD ExitReflowLock() = 0;
// Make shell be a document observer
virtual void BeginObservingDocument() = 0;
NS_IMETHOD BeginObservingDocument() = 0;
// Make shell stop being a document observer
virtual void EndObservingDocument() = 0;
NS_IMETHOD EndObservingDocument() = 0;
/**
* Perform the initial reflow. Constructs the frame for the root content
@ -135,9 +135,9 @@ public:
NS_IMETHOD SetPlaceholderFrameFor(nsIFrame* aFrame,
nsIFrame* aPlaceholderFrame) = 0;
virtual void AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
virtual void ProcessReflowCommands() = 0;
NS_IMETHOD ProcessReflowCommands() = 0;
virtual void ClearFrameRefs(nsIFrame* aFrame) = 0;
/**

Просмотреть файл

@ -233,8 +233,8 @@ public:
virtual nsresult GetSelection(nsISelection **aSelection);
NS_IMETHOD EnterReflowLock();
NS_IMETHOD ExitReflowLock();
virtual void BeginObservingDocument();
virtual void EndObservingDocument();
NS_IMETHOD BeginObservingDocument();
NS_IMETHOD EndObservingDocument();
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight);
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight);
NS_IMETHOD StyleChangeReflow();
@ -245,8 +245,8 @@ public:
nsIFrame*& aPlaceholderFrame) const;
NS_IMETHOD SetPlaceholderFrameFor(nsIFrame* aFrame,
nsIFrame* aPlaceholderFrame);
virtual void AppendReflowCommand(nsIReflowCommand* aReflowCommand);
virtual void ProcessReflowCommands();
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand);
NS_IMETHOD ProcessReflowCommands();
virtual void ClearFrameRefs(nsIFrame*);
NS_IMETHOD CreateRenderingContext(nsIFrame *aFrame, nsIRenderingContext *&aContext);
@ -566,21 +566,23 @@ PresShell::GetSelection(nsISelection **aSelection)
// Make shell be a document observer
void
NS_IMETHODIMP
PresShell::BeginObservingDocument()
{
if (nsnull != mDocument) {
mDocument->AddObserver(this);
}
return NS_OK;
}
// Make shell stop being a document observer
void
NS_IMETHODIMP
PresShell::EndObservingDocument()
{
if (nsnull != mDocument) {
mDocument->RemoveObserver(this);
}
return NS_OK;
}
NS_IMETHODIMP
@ -826,19 +828,19 @@ PresShell::EndReflow(nsIDocument *aDocument, nsIPresShell* aShell)
return NS_OK;
}
void
NS_IMETHODIMP
PresShell::AppendReflowCommand(nsIReflowCommand* aReflowCommand)
{
#ifdef NS_DEBUG
if (mInVerifyReflow) {
return;
return NS_OK;
}
#endif
mReflowCommands.AppendElement(aReflowCommand);
NS_ADDREF(aReflowCommand);
return mReflowCommands.AppendElement(aReflowCommand);
}
void
NS_IMETHODIMP
PresShell::ProcessReflowCommands()
{
if (0 != mReflowCommands.Count()) {
@ -899,6 +901,8 @@ PresShell::ProcessReflowCommands()
}
#endif
}
return NS_OK;
}
void