- Truncate descriptions
Activity
FYI: upstream
- https://bugzilla.mozilla.org/show_bug.cgi?id=1532859 RFP makes Google Spreadsheet text blur
- https://bugzilla.mozilla.org/show_bug.cgi?id=1533787 RFP causes icons on some sites (including Gmail) to be blurry
- https://bugzilla.mozilla.org/show_bug.cgi?id=1537955 RFP makes PDFs rendering blurred
- https://bugzilla.mozilla.org/show_bug.cgi?id=1554751 Ethan's meta ticket for blurry stuff
The tldr for why this happens is that RFP spoofs your monitor's DPI and as a result things which render to canvas and take the screen DPI into account (google docs, js pdf renderers, etc) will have the wrong value and so the contents of the canvas element's backing frame buffer will be stretched or squished to the page content's logical size.
So for example suppose you have a high DPI screen and a page has a canvas element with logical dimensions of 100x100 but the web app would normally take DPI into account and request the framebuffer be 200x200 to match your monitor's physical dimensions. With RFP enabled, the page now thinks the physical dimensions are the same as the logical dimensions and request a 100x100 framebuffer, whose contents are now stretched to fit the 200x200 physical dimensions, resulting in blurriness.
Replying to pospeselr:
The tldr for why this happens is that RFP spoofs your monitor's DPI and as a result things which render to canvas and take the screen DPI into account (google docs, js pdf renderers, etc) will have the wrong value and so the contents of the canvas element's backing frame buffer will be stretched or squished to the page content's logical size.
So for example suppose you have a high DPI screen and a page has a canvas element with logical dimensions of 100x100 but the web app would normally take DPI into account and request the framebuffer be 200x200 to match your monitor's physical dimensions. With RFP enabled, the page now thinks the physical dimensions are the same as the logical dimensions and request a 100x100 framebuffer, whose contents are now stretched to fit the 200x200 physical dimensions, resulting in blurriness.
Are we missing a "Is this a privileged context and thus no RFP"-check here somewhere?
Replying to gk:
Are we missing a "Is this a privileged context and thus no RFP"-check here somewhere?
I don't know why it took you spoon-feeding this to me; but yeah. I investigated and sure enough I think the fix is pretty simple.
I put a patch up at https://bugzilla.mozilla.org/show_bug.cgi?id=1537955
Replying to cypherpunks:
Are we missing a "Is this a privileged context and thus no RFP"-check here somewhere?
Can that be exploited as an RFP bypass?
I don't think so; but if you can figure out a way to run javascript inside a pdf or inject it into an iframe whose url is a pdf then yeah.