[webkit-dev] Possible device scale factor emulation approaches?
Alexander Pavlov
apavlov at chromium.org
Wed Dec 5 07:16:08 PST 2012
Hello, WebKit folks,
I'm working on emulating the device scale factor with Web Inspector. My
goal is to let web developers see their pages on "normal" (device pixel
ratio == 1) monitors the way they would look on e.g. retina screens.
Page::setDeviceScaleFactor() is not something we can use, since it will
have the reverse effect when used by platform-specific compositor code
(which I saw on Chromium, and its compositor is far from being ready for
such abnormal treatment.)
I took the approach of instrumenting the WebCore/css and WebCore/page code
relying on the page->deviceScaleFactor() value. This worked pretty well,
and you can see the respective patch at
https://bugs.webkit.org/attachment.cgi?id=172046&action=prettypatch (
https://bugs.webkit.org/show_bug.cgi?id=100762), but now I'm wondering if
there are better ways to implement this without instrumenting lots of
page->deviceScaleFactor() call sites.
Comments, ideas, suggestions, please?
--
Regards,
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121205/b44c7bb7/attachment.html>
More information about the webkit-dev
mailing list