Closed Bug 1666827 Opened 4 years ago Closed 4 years ago

Clicking on a link in the preview browser will navigate the preview browser

Categories

(Core :: Print Preview, defect, P1)

defect

Tracking

()

VERIFIED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- verified
firefox83 --- verified
firefox84 --- verified

People

(Reporter: mstriemer, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [print2020_v82])

Attachments

(5 files, 1 obsolete file)

Attached video navigate-in-preview.mp4

STR

  1. Open a page with a link on it (maybe https://en.wikipedia.org/wiki/Firefox)
  2. Start a print
  3. Click on a link in the preview browser

Expected results: Nothing happens
Actual results: The preview browser is navigated

Mozregression pointed to this pushlog https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=be24fd0c7bc5f87b103ef59141bcf539bf07c635&tochange=168ce28f004948c7b2646d5f613c1bda7af62de6

Flags: needinfo?(emilio)

Set release status flags based on info from the regressing bug 1663826

Sounds like this is an Emilio fix…

Component: Printing → Print Preview
Product: Toolkit → Core
Assignee: nobody → jwatt
Status: NEW → ASSIGNED

This should make it work on fission, plus is simpler than the
alternative of traversing the whole docshell tree and then undo it.

It also is going to make easier the actual fix for this bug.

This prevents e.g. navigating the print preview document.

I can try to come up with a test for this, though testing for something
not happening is always a bit more annoying... :)

Depends on D91438

See Also: → 1667400
Attachment #9177873 - Attachment is obsolete: true
Assignee: jwatt → emilio
Flags: needinfo?(emilio)

Just a (likely unnecessary) reminder to land this when you can. :-)

Flags: needinfo?(emilio)

I need to add tests per the phab comments.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da2d1fb17ef6 Make nsDocShell::mIsPrintPreview a flag in the top browsing context. r=smaug https://hg.mozilla.org/integration/autoland/rev/6d531a160b56 Mark browsing contexts where we host static documents as "printing". r=smaug

Backed out for failing browser-chrome's browser_preview_navigate.js:

https://hg.mozilla.org/integration/autoland/rev/cb70b150fd87570545760dfd06078d3201b44e30

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel%2Crunnable&revision=ce43b034a221733e6d7c797ed8c6609a28d6ec9d&selectedTaskRun=aa4nw5j0THypBa0--OBNtQ.0
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=316898111&repo=autoland
[task 2020-09-28T11:20:56.550Z] 11:20:56 INFO - TEST-PASS | toolkit/components/printing/tests/browser_preview_navigate.js | There shouldn't be any print preview browser -
[task 2020-09-28T11:20:56.552Z] 11:20:56 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "data:text/html,<a href="https://example.com">Navigate away</a>" line: 0}]
[task 2020-09-28T11:20:56.552Z] 11:20:56 INFO - waiting for print
[task 2020-09-28T11:20:56.552Z] 11:20:56 INFO - waiting for preview to finish
[task 2020-09-28T11:20:56.552Z] 11:20:56 INFO - waiting for useless click
[task 2020-09-28T11:20:56.552Z] 11:20:56 INFO - Buffered messages logged at 11:20:12
[task 2020-09-28T11:20:56.553Z] 11:20:56 INFO - waiting for useful click
[task 2020-09-28T11:20:56.553Z] 11:20:56 INFO - waiting for tab to open
[task 2020-09-28T11:20:56.553Z] 11:20:56 INFO - Buffered messages finished
[task 2020-09-28T11:20:56.553Z] 11:20:56 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_preview_navigate.js | Test timed out -

Flags: needinfo?(emilio)

grr....

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Comment on attachment 9177898 [details]
Bug 1666827 - Make nsDocShell::mIsPrintPreview a flag in the top browsing context. r=smaug

Beta/Release Uplift Approval Request

  • User impact if declined: print preview can be navigated away
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple-ish refactoring.
  • String changes made/needed: none
Flags: needinfo?(emilio)
Attachment #9177898 - Flags: approval-mozilla-beta?
Attachment #9177899 - Flags: approval-mozilla-beta?
Flags: qe-verify+

(I still need to make sure I land those tests)

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
QA Whiteboard: [qa-triaged]

Comment on attachment 9177898 [details]
Bug 1666827 - Make nsDocShell::mIsPrintPreview a flag in the top browsing context. r=smaug

print preview fix, for 82.0b6

Attachment #9177898 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9177899 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

This doesn't graft cleanly to beta due to conflicts with bug 1557645, please provide a rebased patch.

Attached patch Beta patch.Splinter Review
Flags: needinfo?(jcristau)
Flags: needinfo?(jcristau)
See Also: → 1668769

Reproduced with Fx 83.0a1 (2020-09-23) on Windows 10.
Verified fixed with Fx 82.0.2, Fx 83.0b7 and 84.0a1 (20201101092255) on Windows 10, Ubuntu 18 and macOS 10.15. Note that the behavior mentioned in 1668769 is still reproducible with the latest builds.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Has Regression Range: --- → yes
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: