Repository navigation
fix: invalid printer settings when settings passed - #52367
Conversation
Assisted-by: Claude Opus 4.8
480091f to
768f298
Compare
dsanders11
left a comment
There was a problem hiding this comment.
FYI, I think this is going to merge conflict with #52375 which is bringing in https://chromium-review.googlesource.com/c/chromium/src/+/8044283 that refactors PrintViewManagerBase slightly.
Given the backport targets for this, I think it might be cleanest to wait for the roll to land, then fix the merge conflict in this PR and backport? Just flagging this as an area of friction.
changes to the printing.patch are not necessary for this fix and will hamper backports and/or conflict with chromium upgrades.
|
@dsanders11 good point. I dropped the printing patch change from this PR since it was just a cleanup. I'll followup with another PR to cleanup the printing patch after this and the chromium bump merge. |
|
Release Notes Persisted
|
|
I have automatically backported this PR to "43-x-y", please check out #52381 |
|
I have automatically backported this PR to "44-x-y", please check out #52382 |
Description of Change
PrintViewManagerElectron::GetPrintPreviewParamsandPrintViewManagerElectron::UpdatePrintSettingsbut these methods returned a nullptr which ended up treating every settings request as invalid.This PR properly implements those methods and drops unneeded code from our printing patch.
Additionally, a test has been added for this regression which uses a silent virtual printer to test.
Checklist
npm testpassesRelease Notes
Notes: Fixed webContents.print() returning "Invalid printer settings" when print options are provided.