Commit a19ee72
Bug 1980356: Don't block in window.print() if there's a registered mozPrintCallback (e.g. for PDF.js) and if any sort of print dialog might be up. a=RyanVM DONTBUILD
Before this patch, we would unconditionally block in window.print() if the user
had the system print dialog enabled. That was problematic because it prevents
mozPrintCallback from doing asynchronous work, as described in the nearby
code-comment, and this resulted in PDFs printing blank for such users if they
used the "print" button (which triggered window.print()).
This patch makes the print.prefer_system_dialog codepath share the same logic
flow as the regular-print-preview codepath -- now we will *not* block if
there's a registered print callback (which allows the callback's microtasks to
proceed while the print dialog is still up).
Original Revision: https://phabricator.services.mozilla.com/D261296
Differential Revision: https://phabricator.services.mozilla.com/D2627011 parent 67e874e commit a19ee72
File tree
3 files changed
+73
-11
lines changed- dom/base
- testing/web-platform/mozilla
- meta/dom
- tests/dom
3 files changed
+73
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5158 | 5158 | | |
5159 | 5159 | | |
5160 | 5160 | | |
5161 | | - | |
5162 | | - | |
5163 | | - | |
5164 | | - | |
5165 | | - | |
5166 | | - | |
5167 | | - | |
| 5161 | + | |
| 5162 | + | |
5168 | 5163 | | |
5169 | 5164 | | |
| 5165 | + | |
5170 | 5166 | | |
5171 | 5167 | | |
5172 | | - | |
| 5168 | + | |
| 5169 | + | |
| 5170 | + | |
| 5171 | + | |
| 5172 | + | |
| 5173 | + | |
| 5174 | + | |
| 5175 | + | |
| 5176 | + | |
| 5177 | + | |
5173 | 5178 | | |
5174 | 5179 | | |
5175 | | - | |
5176 | | - | |
5177 | | - | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
5178 | 5184 | | |
5179 | 5185 | | |
5180 | 5186 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments