Backing out unapproved checkin for bug 97227. a=brendan,blizzard

This commit is contained in:
dbaron%fas.harvard.edu 2001-08-31 03:45:20 +00:00
Родитель 127076b934
Коммит 5434e861aa
30 изменённых файлов: 44 добавлений и 85 удалений

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

@ -339,8 +339,7 @@ public:
NS_IMETHOD_(PRBool) EventCaptureRegistration(PRInt32 aCapturerIncrement) = 0;
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows=PR_TRUE,
PRBool aUpdateViews=PR_FALSE) = 0;
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows=PR_TRUE) = 0;
NS_IMETHOD GetAndIncrementContentID(PRInt32* aID) = 0;

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

@ -3259,7 +3259,7 @@ nsDocument::GetFileSpec(nsIFile * *aFileSpec)
}
NS_IMETHODIMP
nsDocument::FlushPendingNotifications(PRBool aFlushReflows, PRBool aUpdateViews)
nsDocument::FlushPendingNotifications(PRBool aFlushReflows)
{
if (aFlushReflows) {
@ -3268,7 +3268,7 @@ nsDocument::FlushPendingNotifications(PRBool aFlushReflows, PRBool aUpdateViews)
for (i = 0; i < count; i++) {
nsIPresShell* shell = NS_STATIC_CAST(nsIPresShell*, mPresShells[i]);
if (shell) {
shell->FlushPendingNotifications(aUpdateViews);
shell->FlushPendingNotifications();
}
}
}

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

@ -454,8 +454,7 @@ public:
NS_IMETHOD StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule);
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows = PR_TRUE,
PRBool aUpdateViews = PR_FALSE);
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows = PR_TRUE);
NS_IMETHOD GetAndIncrementContentID(PRInt32* aID);
NS_IMETHOD GetBindingManager(nsIBindingManager** aResult);
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager);

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

@ -3925,7 +3925,7 @@ void nsEventStateManager::FlushPendingEvents(nsIPresContext* aPresContext) {
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
if (nsnull != shell) {
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
nsCOMPtr<nsIViewManager> viewManager;
shell->GetViewManager(getter_AddRefs(viewManager));
if (viewManager) {

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

@ -3984,7 +3984,7 @@ HTMLContentSink::ScrollToRef()
mDocument->GetShellAt(i, getter_AddRefs(shell));
if (shell) {
// Scroll to the anchor
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
// Check an empty string which might be caused by the UTF-8 conversion
if (!ref.IsEmpty())

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

@ -276,7 +276,7 @@ nsXMLContentSink::ScrollToRef()
mDocument->GetShellAt(i, getter_AddRefs(shell));
if (shell) {
// Scroll to the anchor
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
// Check an empty string which might be caused by the UTF-8 conversion
if (!ref.IsEmpty())

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

@ -2013,7 +2013,7 @@ nsXULDocument::FindNext(const nsAReadableString &aSearchStr,
NS_IMETHODIMP
nsXULDocument::FlushPendingNotifications(PRBool aFlushReflows, PRBool aUpdateViews)
nsXULDocument::FlushPendingNotifications(PRBool aFlushReflows)
{
if (aFlushReflows) {
@ -2022,7 +2022,7 @@ nsXULDocument::FlushPendingNotifications(PRBool aFlushReflows, PRBool aUpdateVie
for (i = 0; i < count; i++) {
nsIPresShell* shell = NS_STATIC_CAST(nsIPresShell*, mPresShells[i]);
if (shell) {
shell->FlushPendingNotifications(aUpdateViews);
shell->FlushPendingNotifications();
}
}
}

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

@ -298,7 +298,7 @@ public:
NS_IMETHOD FindNext(const nsAReadableString &aSearchStr, PRBool aMatchCase, PRBool aSearchDown, PRBool &aIsFound);
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows = PR_TRUE, PRBool aUpdateViews = PR_FALSE);
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows = PR_TRUE);
NS_IMETHOD GetAndIncrementContentID(PRInt32* aID);

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

@ -1579,7 +1579,7 @@ static void EnsureReflowFlushAndPaint(nsIDocShell* aDocShell)
return;
// Flush pending reflows.
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
// Unsuppress painting.
presShell->UnsuppressPainting();

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

@ -220,7 +220,7 @@ inLayoutUtils::GetScreenOrigin(nsIDOMElement* aElement)
if (presShell) {
// Flush all pending notifications so that our frames are uptodate
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
nsCOMPtr<nsIPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));

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

@ -2915,7 +2915,7 @@ NS_IMETHODIMP mozXMLTermSession::ScrollToBottomLeft(void)
if (NS_FAILED(result) || !presShell)
return NS_ERROR_FAILURE;
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
// Get DOM Window
nsCOMPtr<nsIDocShell> docShell;

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

@ -8127,7 +8127,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext,
treeRowGroup->RegenerateRowGroupInfo(0);
if (!treeRowGroup->IsBatching())
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
return NS_OK;
}
@ -8599,7 +8599,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
}
if (!treeRowGroup->IsBatching())
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
return NS_OK;
}
}
@ -9281,7 +9281,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext,
treeRowGroup->MarkDirtyChildren(state);
if (!treeRowGroup->IsBatching())
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
}
return NS_OK;
}

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

@ -295,9 +295,8 @@ public:
/**
* Flush all pending notifications such that the presentation is
* in sync with the content.
* @param aUpdateViews PR_TRUE causes the affected views to be refreshed immediately.
*/
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews) = 0;
NS_IMETHOD FlushPendingNotifications() = 0;
/**
* Post a request to handle a DOM event after Reflow has finished.

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

@ -866,7 +866,7 @@ public:
PRBool aProcessDummyLayoutRequest = PR_TRUE);
NS_IMETHOD CancelAllReflowCommands();
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews=PR_FALSE);
NS_IMETHOD FlushPendingNotifications();
/**
* Post a request to handle a DOM event after Reflow has finished.
@ -4868,21 +4868,13 @@ PresShell::IsSafeToFlush(PRBool& aIsSafeToFlush)
NS_IMETHODIMP
PresShell::FlushPendingNotifications(PRBool aUpdateViews)
PresShell::FlushPendingNotifications()
{
PRBool isSafeToFlush;
IsSafeToFlush(isSafeToFlush);
if (isSafeToFlush) {
if (aUpdateViews && mViewManager) {
mViewManager->BeginUpdateViewBatch();
}
ProcessReflowCommands(PR_FALSE);
if (aUpdateViews && mViewManager) {
mViewManager->EndUpdateViewBatch(NS_VMREFRESH_IMMEDIATE);
}
}
return NS_OK;

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

@ -295,9 +295,8 @@ public:
/**
* Flush all pending notifications such that the presentation is
* in sync with the content.
* @param aUpdateViews PR_TRUE causes the affected views to be refreshed immediately.
*/
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews) = 0;
NS_IMETHOD FlushPendingNotifications() = 0;
/**
* Post a request to handle a DOM event after Reflow has finished.

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

@ -668,7 +668,7 @@ nsComboboxControlFrame::ShowList(nsIPresContext* aPresContext, PRBool aShowList)
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
if (widget)
widget->CaptureRollupEvents((nsIRollupListener *)this, mDroppedDown, PR_TRUE);
@ -2064,7 +2064,7 @@ nsComboboxControlFrame::SelectionChanged()
nsCOMPtr<nsIPresShell> presShell;
mPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
}
}
return rv;

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

@ -4185,7 +4185,7 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
if (IsInDropDownMode() == PR_TRUE) {
nsCOMPtr<nsIPresShell> presShell;
mPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
}
REFLOW_DEBUG_MSG2(" After: %d\n", mSelectedIndex);
} else {

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

@ -866,7 +866,7 @@ public:
PRBool aProcessDummyLayoutRequest = PR_TRUE);
NS_IMETHOD CancelAllReflowCommands();
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews=PR_FALSE);
NS_IMETHOD FlushPendingNotifications();
/**
* Post a request to handle a DOM event after Reflow has finished.
@ -4868,21 +4868,13 @@ PresShell::IsSafeToFlush(PRBool& aIsSafeToFlush)
NS_IMETHODIMP
PresShell::FlushPendingNotifications(PRBool aUpdateViews)
PresShell::FlushPendingNotifications()
{
PRBool isSafeToFlush;
IsSafeToFlush(isSafeToFlush);
if (isSafeToFlush) {
if (aUpdateViews && mViewManager) {
mViewManager->BeginUpdateViewBatch();
}
ProcessReflowCommands(PR_FALSE);
if (aUpdateViews && mViewManager) {
mViewManager->EndUpdateViewBatch(NS_VMREFRESH_IMMEDIATE);
}
}
return NS_OK;

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

@ -668,7 +668,7 @@ nsComboboxControlFrame::ShowList(nsIPresContext* aPresContext, PRBool aShowList)
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
if (widget)
widget->CaptureRollupEvents((nsIRollupListener *)this, mDroppedDown, PR_TRUE);
@ -2064,7 +2064,7 @@ nsComboboxControlFrame::SelectionChanged()
nsCOMPtr<nsIPresShell> presShell;
mPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
}
}
return rv;

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

@ -3869,7 +3869,7 @@ nsGfxListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
if (IsInDropDownMode() == PR_TRUE && mComboboxFrame) {
nsCOMPtr<nsIPresShell> presShell;
mPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
}
REFLOW_DEBUG_MSG2(" After: %d\n", mSelectedIndex);
} else {

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

@ -4185,7 +4185,7 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
if (IsInDropDownMode() == PR_TRUE) {
nsCOMPtr<nsIPresShell> presShell;
mPresContext->GetShell(getter_AddRefs(presShell));
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
}
REFLOW_DEBUG_MSG2(" After: %d\n", mSelectedIndex);
} else {

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

@ -8127,7 +8127,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext,
treeRowGroup->RegenerateRowGroupInfo(0);
if (!treeRowGroup->IsBatching())
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
return NS_OK;
}
@ -8599,7 +8599,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
}
if (!treeRowGroup->IsBatching())
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
return NS_OK;
}
}
@ -9281,7 +9281,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext,
treeRowGroup->MarkDirtyChildren(state);
if (!treeRowGroup->IsBatching())
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
}
return NS_OK;
}

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

@ -305,7 +305,7 @@ nsPolygonFrame::AttributeChanged(nsIPresContext* aPresContext,
if (NS_SUCCEEDED(rv)) {
shell->AppendReflowCommand(reflowCmd);
NS_RELEASE(reflowCmd);
rv = shell->FlushPendingNotifications(PR_FALSE);
rv = shell->FlushPendingNotifications();
}
} else if (aAttribute == nsSVGAtoms::x) {
} else if (aAttribute == nsSVGAtoms::y) {

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

@ -156,7 +156,7 @@ nsBoxObject::GetOffsetRect(nsRect& aRect)
if(presShell) {
// Flush all pending notifications so that our frames are uptodate
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
// Get the Frame for our content
nsIFrame* frame = nsnull;
@ -267,7 +267,7 @@ nsBoxObject::GetScreenRect(nsRect& aRect)
if (presShell) {
// Flush all pending notifications so that our frames are uptodate
presShell->FlushPendingNotifications(PR_FALSE);
presShell->FlushPendingNotifications();
nsCOMPtr<nsIPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));

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

@ -755,7 +755,7 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag)
nsCOMPtr<nsIPresShell> shell;
mPresContext->GetShell(getter_AddRefs(shell));
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
}
nsRect curRect;
@ -776,7 +776,7 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag)
menuPopup->MarkDirty(state);
nsCOMPtr<nsIPresShell> shell;
mPresContext->GetShell(getter_AddRefs(shell));
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
}
ActivateMenu(PR_TRUE);

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

@ -1166,7 +1166,7 @@ if (realTimeDrag) {
}
viewManager->DisableRefresh();
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
viewManager->EnableRefresh(NS_VMREFRESH_NO_SYNC);
viewManager->UpdateView(view, damageRect, NS_VMREFRESH_IMMEDIATE);

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

@ -499,7 +499,7 @@ void nsXULTreeGroupFrame::OnContentRemoved(nsIPresContext* aPresContext,
MarkDirtyChildren(state);
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
}
PRBool nsXULTreeGroupFrame::ContinueReflow(nscoord height)

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

@ -642,7 +642,7 @@ nsXULTreeOuterGroupFrame::PositionChanged(PRInt32 aOldIndex, PRInt32& aNewIndex)
nsCOMPtr<nsIPresShell> shell;
mPresContext->GetShell(getter_AddRefs(shell));
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
smoother->mDelta = newTwipIndex > oldTwipIndex ? rowDelta : -rowDelta;
@ -707,7 +707,7 @@ nsXULTreeOuterGroupFrame::InternalPositionChanged(PRBool aUp, PRInt32 aDelta, PR
nsCOMPtr<nsIPresShell> shell;
mPresContext->GetShell(getter_AddRefs(shell));
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
PRInt32 visibleRows = 0;
if (mRowHeight)
@ -775,7 +775,7 @@ nsXULTreeOuterGroupFrame::InternalPositionChanged(PRBool aUp, PRInt32 aDelta, PR
nsBoxLayoutState state(mPresContext);
mScrolling = PR_TRUE;
MarkDirtyChildren(state);
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
mScrolling = PR_FALSE;
VerticalScroll(mYPosition);

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

@ -414,7 +414,7 @@ nsWebCrawler::OnStateChange(nsIWebProgress* aWebProgress,
nsCOMPtr<nsIPresShell> shell = dont_AddRef(GetPresShell());
if (shell) {
// Force the presentation shell to flush any pending reflows
shell->FlushPendingNotifications(PR_FALSE);
shell->FlushPendingNotifications();
// Force the view manager to update itself
nsCOMPtr<nsIViewManager> vm;

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

@ -40,10 +40,6 @@
#include "nsIXULBrowserWindow.h"
#include "nsPIDOMWindow.h"
// Needed for nsIDocument::FlushPendingNotifications(...)
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
// CIDs
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
@ -342,24 +338,7 @@ NS_IMETHODIMP nsContentTreeOwner::SetStatus(PRUint32 aStatusType, const PRUnicha
}
}
//
// Force pending notifications to be processed immediately... This
// causes the status message to be displayed synchronously.
//
// XXX: This is nasty because we have to drill down to the nsIDocument to
// force the flushing...
//
nsCOMPtr<nsIDOMDocument> domDoc;
nsCOMPtr<nsIDocument> doc;
domWindow->GetDocument(getter_AddRefs(domDoc));
doc = do_QueryInterface(domDoc);
if (doc) {
doc->FlushPendingNotifications(PR_TRUE, PR_TRUE);
}
return NS_OK;
return NS_OK;
}
NS_IMETHODIMP nsContentTreeOwner::SetWebBrowser(nsIWebBrowser* aWebBrowser)