mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
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:
parent
11f9d07fca
commit
56c2710b00
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user