Closed Bug 1803392 Opened 3 years ago Closed 2 years ago

Remove usage of temporary file when printing to PDF

Categories

(Remote Protocol :: Marionette, task, P1)

Default
task
Points:
1

Tracking

(firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: whimboo, Assigned: Sasha)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m6])

Attachments

(1 file)

Similar to the patch on bug 1724687 we should move away from using a temporary file for the print settings that we afterward have to read. This can now be changed by using a stream similar like:

    // Create a stream to write to.
    const stream = Cc["@mozilla.org/storagestream;1"].createInstance(Ci.nsIStorageStream);
    stream.init(4096, 0xffffffff);

    printSettings.outputDestination =
      Ci.nsIPrintSettings.kOutputDestinationStream;
    printSettings.outputStream = stream.getOutputStream(0);
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m6]
Blocks: 1806807
Product: Testing → Remote Protocol
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Attachment #9317578 - Attachment description: WIP: Bug 1803392 - Remove usage of temporary file when printing to PDF. → Bug 1803392 - Remove usage of temporary file when printing to PDF.
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b92093717dcd Remove usage of temporary file when printing to PDF. r=webdriver-reviewers,jdescottes

Backed out changeset b92093717dcd (Bug 1803392) for wp failures on block-page-break-inside-avoid-1-print.html.
Backout link
Push with failures <--> Wp
Failure Log

Flags: needinfo?(aborovova)

Missed to rename lazy.print.printToFile to lazy.print.printToEncodedString here: https://searchfox.org/mozilla-central/source/remote/marionette/reftest.sys.mjs#788.
Will fix it now.

Flags: needinfo?(aborovova)
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1fb5d59505f Remove usage of temporary file when printing to PDF. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: