Bug 399852. Experimental relanding to collect data from centos5.

This commit is contained in:
jag@tty.nl 2008-02-19 01:52:34 -08:00
Родитель 518856f1c7
Коммит ccd449c858
1 изменённых файлов: 18 добавлений и 1 удалений

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

@ -52,6 +52,7 @@
#include "nsHashKeys.h"
#include "nsThreadUtils.h"
#include "nsPageContentFrame.h"
#include "nsIViewManager.h"
class nsIDocument;
struct nsFrameItems;
@ -73,6 +74,19 @@ struct nsFindFrameHint
nsFindFrameHint() : mPrimaryFrameForPrevSibling(nsnull) { }
};
// Class which makes an nsIPresShell's ViewManager supress
// focus/blur events. This prevents the frame tree from being changed
// by focus handlers etc while *we* are trying to change it.
// Fix for bug 399852.
class nsFocusEventSuppressor
{
public:
void Suppress(nsIPresShell *aPresShell);
void Unsuppress();
private:
nsCOMPtr<nsIViewManager> mViewManager;
};
typedef void (PR_CALLBACK nsLazyFrameConstructionCallback)
(nsIContent* aContent, nsIFrame* aFrame, void* aArg);
@ -148,7 +162,7 @@ public:
PRInt32 aModType,
PRUint32 aStateMask);
void BeginUpdate() { ++mUpdateCount; }
void BeginUpdate();
void EndUpdate();
void RecalcQuotesAndCounters();
@ -162,6 +176,9 @@ public:
nsresult ProcessRestyledFrames(nsStyleChangeList& aRestyleArray);
private:
nsFocusEventSuppressor mFocusSuppressor;
// Note: It's the caller's responsibility to make sure to wrap a
// ProcessOneRestyle call in a view update batch.
// This function does not call ProcessAttachedQueue() on the binding manager.