RESOLVED FIXED 70614
[Chromium] Expose deviceScaleFactor to WebKit API
https://bugs.webkit.org/show_bug.cgi?id=70614
Summary [Chromium] Expose deviceScaleFactor to WebKit API
Fady Samuel
Reported 2011-10-21 09:39:26 PDT
Fairly straightforward. One of the many small pieces that needs to fall into place to implement viewport meta tag in Chromium.
Attachments
Patch (3.47 KB, patch)
2011-11-03 16:17 PDT, Fady Samuel
no flags
Patch (3.45 KB, patch)
2011-11-04 10:07 PDT, Fady Samuel
no flags
Fady Samuel
Comment 1 2011-11-03 09:19:01 PDT
deviceScaleFactor is the same value as window.devicePixelRatio. This ratio is also determined by computeViewportAttributes (deviceDPI / targetDensityDPI). So the correct application of deviceScaleFactor is as follows: 1. Once the viewport attributes are computed, we call back into the renderer (render_view_impl.cc). The devicePixelratio is passed into the renderer. 2. The renderer sets WebKit's deviceScaleFactor along with the PageScaleFactor.
Fady Samuel
Comment 2 2011-11-03 16:17:33 PDT
WebKit Review Bot
Comment 3 2011-11-03 16:21:50 PDT
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Darin Fisher (:fishd, Google)
Comment 4 2011-11-03 22:41:33 PDT
Comment on attachment 113569 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113569&action=review > Source/WebKit/chromium/public/WebView.h:219 > + // Used by the viewport tag. The ratio of the current device's screen DPI to the target nit: comments like "Used by the viewport tag" could pretty quickly become stale. if someone else starts using the deviceScaleFactor information for something else, then they would most likely not think to update this comment. as this is API comments, it probably doesn't matter to the embedder how this field will be used. instead, they just need to know what the field means and what they may set its value to be. recommendation: leave out the "Used by the viewport tag" bit.
Fady Samuel
Comment 5 2011-11-04 10:07:51 PDT
Fady Samuel
Comment 6 2011-11-04 10:10:11 PDT
Comment on attachment 113672 [details] Patch Clearing flags on attachment: 113672 Committed r99291: <http://trac.webkit.org/changeset/99291>
Fady Samuel
Comment 7 2011-11-04 10:10:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.