WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
126591
vw units don't look at the right viewport in print media
https://bugs.webkit.org/show_bug.cgi?id=126591
Summary
vw units don't look at the right viewport in print media
Brad
Reported
2014-01-07 12:56:51 PST
VW units are supposed to be based on the width of the initial containing block (which is divided into 100 VW units). But when printed, the ICB is the page area (the printable area of the piece of paper). Webkit seems to be using the width of the window on the monitor instead as its reference for print VWs. What's more, it does this even when the page is inside an iframe: it uses the width of the outer window instead of the width of the iframe. 1VW should instead be 1/100 of the print area of the page.
Attachments
Patch
(9.38 KB, patch)
2014-07-06 21:10 PDT
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Safari Technology Preview 152 Print in PDF
(10.09 KB, application/pdf)
2022-08-31 15:25 PDT
,
Ahmad Saleem
no flags
Details
Chrome Canary 107 Print Output
(12.84 KB, application/pdf)
2022-08-31 15:26 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Brad
Comment 1
2014-01-07 12:58:06 PST
Correction: 1VW should instead be 1/100 of the WIDTH of the print area of the page.
Benjamin Poulain
Comment 2
2014-07-06 21:10:44 PDT
Created
attachment 234476
[details]
Patch
Benjamin Poulain
Comment 3
2014-07-06 21:17:42 PDT
Dave, Antti, Dean, could you please have a look at this first patch? I need to add tests and fix the exports, but I would like some early feedback. Something I know nothing about is the other type of pagination. I have no idea how the layout works for epub or paginated UIWebView.
Frances de Waal
Comment 4
2015-08-07 05:09:16 PDT
Not sure if this is related, but if font-size is set with vw it will not be printed at all in a webkit browser.
Chris Rebert
Comment 5
2015-09-10 01:29:53 PDT
(In reply to
comment #4
)
> Not sure if this is related, but if font-size is set with vw it will not be > printed at all in a webkit browser.
That sounds like
https://code.google.com/p/chromium/issues/detail?id=382313
Chris Rebert
Comment 6
2016-04-11 22:22:05 PDT
Still reproduces in recent Nightly.
Ahmad Saleem
Comment 7
2022-08-31 15:25:38 PDT
Created
attachment 462057
[details]
Safari Technology Preview 152 Print in PDF
Ahmad Saleem
Comment 8
2022-08-31 15:26:52 PDT
Created
attachment 462058
[details]
Chrome Canary 107 Print Output It is same for Firefox Nightly 106.
Ahmad Saleem
Comment 9
2022-08-31 15:27:15 PDT
I am able to reproduce this bug in STP 152 and please refer to attached PDF for reference. Thanks!
Radar WebKit Bug Importer
Comment 10
2022-08-31 16:06:25 PDT
<
rdar://problem/99408675
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug