зеркало из https://github.com/mozilla/pjs.git
Fix to make printing OBJECTs safer bug 73846 a=av sr=waterson
This commit is contained in:
Родитель
14a5173f4b
Коммит
6c7b4a707c
|
@ -64,6 +64,7 @@
|
|||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIPrintContext.h"
|
||||
|
||||
// XXX For temporary paint code
|
||||
#include "nsIStyleContext.h"
|
||||
|
@ -674,6 +675,13 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
|
|||
if(child != nsnull)
|
||||
return HandleImage(aPresContext, aMetrics, aReflowState, aStatus, child);
|
||||
|
||||
// determine if we are a printcontext
|
||||
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
|
||||
if (thePrinterContext) {
|
||||
// we are printing bail for now
|
||||
return rv;
|
||||
}
|
||||
|
||||
// if mInstance is null, we need to determine what kind of object we are and instantiate ourselves
|
||||
if(!mInstanceOwner)
|
||||
{
|
||||
|
@ -1324,6 +1332,14 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext,
|
|||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer)
|
||||
{
|
||||
// determine if we are a printcontext
|
||||
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
|
||||
if (thePrinterContext) {
|
||||
// we are printing bail for now
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
if ((disp != nsnull) && !disp->IsVisibleOrCollapsed()) {
|
||||
return NS_OK;
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIPrintContext.h"
|
||||
|
||||
// XXX For temporary paint code
|
||||
#include "nsIStyleContext.h"
|
||||
|
@ -674,6 +675,13 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
|
|||
if(child != nsnull)
|
||||
return HandleImage(aPresContext, aMetrics, aReflowState, aStatus, child);
|
||||
|
||||
// determine if we are a printcontext
|
||||
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
|
||||
if (thePrinterContext) {
|
||||
// we are printing bail for now
|
||||
return rv;
|
||||
}
|
||||
|
||||
// if mInstance is null, we need to determine what kind of object we are and instantiate ourselves
|
||||
if(!mInstanceOwner)
|
||||
{
|
||||
|
@ -1324,6 +1332,14 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext,
|
|||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer)
|
||||
{
|
||||
// determine if we are a printcontext
|
||||
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
|
||||
if (thePrinterContext) {
|
||||
// we are printing bail for now
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
if ((disp != nsnull) && !disp->IsVisibleOrCollapsed()) {
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче