Bug 370303: Cleanup in layout/forms. r+sr=roc.

git-svn-id: svn://10.0.0.236/trunk@220186 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sharparrow1%yahoo.com
2007-02-15 10:58:31 +00:00
parent 94b87aa7a6
commit db1730f015
10 changed files with 23 additions and 236 deletions

View File

@@ -70,10 +70,6 @@
#include "nsIContent.h"
#include "nsIAtom.h"
#include "nsPresContext.h"
#ifdef USE_QI_IN_SUPPRESS_EVENT_HANDLERS
#include "nsIPrintContext.h"
#include "nsIPrintPreviewContext.h"
#endif // USE_QI_IN_SUPPRESS_EVENT_HANDLERS
#include "nsGkAtoms.h"
#include "nsLayoutUtils.h"
#include "nsIComponentManager.h"
@@ -1058,31 +1054,10 @@ SuppressEventHandlers(nsPresContext* aPresContext)
// Right now we only suppress event handlers and controller manipulation
// when in a print preview or print context!
#ifdef USE_QI_IN_SUPPRESS_EVENT_HANDLERS
// Using QI to see if we're printing or print previewing is more
// accurate, but a bit more heavy weight then just checking
// the pagination bool, which will return the right answer to us
// with the current implementation.
nsCOMPtr<nsIPrintContext> printContext = do_QueryInterface(aPresContext);
if (printContext)
suppressHandlers = PR_TRUE;
else
{
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext = do_QueryInterface(aPresContext);
if (printPreviewContext)
suppressHandlers = PR_TRUE;
}
#else
// In the current implementation, we only paginate when
// printing or in print preview.
suppressHandlers = aPresContext->IsPaginated();
#endif
}
return suppressHandlers;