fix: blank page when printing pdf (#43326)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
fa4dc3c760
commit
0c72474bd4
4 changed files with 92 additions and 17 deletions
|
@ -14,6 +14,11 @@ namespace gfx {
|
|||
class Size;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class RenderFrameHost;
|
||||
class WebContents;
|
||||
} // namespace content
|
||||
|
||||
namespace electron {
|
||||
|
||||
// This function returns the per-platform default printer's DPI.
|
||||
|
@ -24,6 +29,9 @@ gfx::Size GetDefaultPrinterDPI(const std::u16string& device_name);
|
|||
// sanity checking of device_name validity and so will crash on invalid names.
|
||||
bool IsDeviceNameValid(const std::u16string& device_name);
|
||||
|
||||
content::RenderFrameHost* GetRenderFrameHostToUse(
|
||||
content::WebContents* contents);
|
||||
|
||||
// This function returns a validated device name.
|
||||
// If the user passed one to webContents.print(), we check that it's valid and
|
||||
// return it or fail if the network doesn't recognize it. If the user didn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue