PrintPreview should only be allowed on nsIWebBrowserPrint when retrieved through the docshell.

NEW
Unassigned

Status

()

Core
Print Preview
P3
normal
5 months ago
2 months ago

People

(Reporter: bobowen, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(firefox57 wontfix)

Details

(Reporter)

Description

5 months ago
Once we get rid of non-WebExtensions addons we should be able to turn the warning at [1] into a full assertion.

We generally only hit this when we have retrieved the nsIWebBrowserPrint interface through nsGlobalWindow and not nsDocShell::GetPrintPreview.
It's possible that this is currently used by addons, but not after Fx57.

There are at least two tests that also do this:
layout/base/tests/chrome/test_printpreview_bug396024.xul
layout/base/tests/chrome/test_printpreview_bug482976.xul

So, these should be changed to use the docshell or otherwise rewritten.

[1] https://hg.mozilla.org/mozilla-central/file/a0b5515b13eb/layout/base/nsDocumentViewer.cpp#l4050
(Reporter)

Updated

5 months ago
Blocks: 1347507

Updated

2 months ago
Priority: -- → P3

Updated

2 months ago
status-firefox57: --- → wontfix
You need to log in before you can comment on or make changes to this bug.