RESOLVED FIXED 97214
[Qt] Abstract as much devicePixelRatio logic as possible behind PageViewportController
https://bugs.webkit.org/show_bug.cgi?id=97214
Summary [Qt] Abstract as much devicePixelRatio logic as possible behind PageViewportC...
Jocelyn Turcotte
Reported 2012-09-20 07:51:56 PDT
[Qt] Abstract as much devicePixelRatio logic as possible behind PageViewportController
Attachments
Patch (22.58 KB, patch)
2012-09-20 07:59 PDT, Jocelyn Turcotte
no flags
Patch (22.59 KB, patch)
2012-09-25 07:05 PDT, Jocelyn Turcotte
no flags
Jocelyn Turcotte
Comment 1 2012-09-20 07:59:05 PDT
Andras Becsi
Comment 2 2012-09-20 09:16:07 PDT
Comment on attachment 164918 [details] Patch Nice improvement, LGTM.
Kenneth Rohde Christiansen
Comment 3 2012-09-20 23:38:39 PDT
Comment on attachment 164918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164918&action=review > Source/WebKit2/ChangeLog:21 > + Other related changes: > + - Make sure that the controller and it's client are only exchanging effective scales > + (cssScale * devicePixelRatio) > + - Remove members duplicating m_rawAttributes values > + - Use a separate member for the minimum scale to fit the page, separate from the viewport arguments > + - Make sure that the minimum scale to fit is adjusted if the contents size isn't > + updated after the viewport attributes changed > + - Make the scale conversion functions private to discourage this logic from spreading in the client > + nice! > Source/WebKit2/UIProcess/PageViewportController.h:87 > + float devicePixelRatio() const { return m_rawAttributes.devicePixelRatio; } FYI devicePixelRatio should be removed from ViewportAttributes and gotten from elsewhere, it just havent been done yet > Source/WebKit2/UIProcess/PageViewportController.h:115 > + float m_minimumScaleToFit; so this is viewort scale? m_minimumViewportScaleToFit?
Jocelyn Turcotte
Comment 4 2012-09-21 03:11:40 PDT
(In reply to comment #3) > > Source/WebKit2/UIProcess/PageViewportController.h:87 > > + float devicePixelRatio() const { return m_rawAttributes.devicePixelRatio; } > > FYI devicePixelRatio should be removed from ViewportAttributes and gotten from elsewhere, it just havent been done yet Ok I'll have PageViewportController::devicePixelRatio fetch m_webPageProxy->pageScaleFactor() instead then. > > > Source/WebKit2/UIProcess/PageViewportController.h:115 > > + float m_minimumScaleToFit; > > so this is viewort scale? m_minimumViewportScaleToFit? No this is the same as m_rawAttributes, "css/document" scale.
Jocelyn Turcotte
Comment 5 2012-09-25 07:05:21 PDT
Created attachment 165606 [details] Patch Patch to commit
WebKit Review Bot
Comment 6 2012-09-25 08:05:40 PDT
Comment on attachment 165606 [details] Patch Clearing flags on attachment: 165606 Committed r129508: <http://trac.webkit.org/changeset/129508>
WebKit Review Bot
Comment 7 2012-09-25 08:05:44 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.