[Webkit-unassigned] [Bug 87874] [chromium] Expose device scale factor in WebPluginContainer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 30 12:25:22 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=87874





--- Comment #5 from Josh Horwich <jhorwich at chromium.org>  2012-05-30 12:25:22 PST ---
(In reply to comment #3)
> What's this for?

Context is allowing Pepper to expose the scale factor (between pixels on the display device and "DIPs" aka Density-Independent 'Pixels') to Pepper plugins that wish to render at display device resolution in cases where 1 DIP != 1 physical pixel.

Pepper today sends information to plugins in DIPs so existing plugins, or plugins that don't wish to render in device native resolution for whatever reason, will continue to have their output scaled to the correct size in cases where the scale factor between device pixels and DIPs is not 1.

http://code.google.com/p/chromium/issues/detail?id=114673 is the issue on the chromium tracker that this patch will help in addressing.

(In reply to comment #4)
As for calling it "defaultDeviceScaleFactor" vs "deviceScaleFactor" - I had named it without the 'default' qualifier because I believe Pepper plugins care about the actual scale factor, not whether it is the default or not.

I suppose it gets a bit confusing since, at least in the current implementation, "page zoom" does not result in a change to scale factor in any way, but rather an expansion of the number of pixels (DIPs) a plugin is given - for example if I have a plugin with "width=400" and I zoom the page to "125%" the plugin sees a DidChangeView with a width of 500. This is great for plugins that reasonably handle scaling (e.g. render things in terms of percentages of their view area) as it results in still-crisp output and actually zoomed content. It is less ideal for plugins that use fixed-size (in terms of pixels) assets or fixed locations for rendering as it results in a user-initiated page zoom not generating larger (easier-to-read) plugin contents. This patch or my planned chromium-side patch would not change this behavior - I'm just pointing it out for completeness - e.g. that I want Pepper to have access to the scale factor between device pixels and DIPs, not the page zoom.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list