When object tags are sub-documents they should be treated as IFrames for printing

Bug 128142
sr=attinasi r=dcone a=asa
This commit is contained in:
rods%netscape.com 2002-03-07 12:44:57 +00:00
parent 11f9d07fca
commit 56c2710b00
2 changed files with 6 additions and 2 deletions

View File

@ -137,6 +137,7 @@ static NS_DEFINE_IID(kPrinterEnumeratorCID, NS_PRINTER_ENUMERATOR_CID);
#include "nsIDOMHTMLFrameElement.h"
#include "nsIDOMHTMLFrameSetElement.h"
#include "nsIDOMHTMLIFrameElement.h"
#include "nsIDOMHTMLObjectElement.h"
// Print Preview
#include "nsIPrintPreviewContext.h"
@ -2988,8 +2989,9 @@ DocumentViewerImpl::MapContentForPO(PrintObject* aRootObject,
if (frame) {
po->mFrameType = eFrame;
} else {
nsCOMPtr<nsIDOMHTMLObjectElement> objElement(do_QueryInterface(aContent));
nsCOMPtr<nsIDOMHTMLIFrameElement> iFrame(do_QueryInterface(aContent));
if (iFrame) {
if (iFrame || objElement) {
po->mFrameType = eIFrame;
po->mPrintAsIs = PR_TRUE;
if (po->mParent) {

View File

@ -137,6 +137,7 @@ static NS_DEFINE_IID(kPrinterEnumeratorCID, NS_PRINTER_ENUMERATOR_CID);
#include "nsIDOMHTMLFrameElement.h"
#include "nsIDOMHTMLFrameSetElement.h"
#include "nsIDOMHTMLIFrameElement.h"
#include "nsIDOMHTMLObjectElement.h"
// Print Preview
#include "nsIPrintPreviewContext.h"
@ -2988,8 +2989,9 @@ DocumentViewerImpl::MapContentForPO(PrintObject* aRootObject,
if (frame) {
po->mFrameType = eFrame;
} else {
nsCOMPtr<nsIDOMHTMLObjectElement> objElement(do_QueryInterface(aContent));
nsCOMPtr<nsIDOMHTMLIFrameElement> iFrame(do_QueryInterface(aContent));
if (iFrame) {
if (iFrame || objElement) {
po->mFrameType = eIFrame;
po->mPrintAsIs = PR_TRUE;
if (po->mParent) {