Bug 74613 - [qt][wk2] Viewport info panel shows wrong current scale
Summary: [qt][wk2] Viewport info panel shows wrong current scale
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Brüning
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 09:06 PST by Michael Brüning
Modified: 2011-12-16 03:27 PST (History)
2 users (show)

See Also:


Attachments
Proposed patch. (4.62 KB, patch)
2011-12-15 09:24 PST, Michael Brüning
no flags Details | Formatted Diff | Diff
Update patch. (3.99 KB, patch)
2011-12-15 09:34 PST, Michael Brüning
kenneth: review+
Details | Formatted Diff | Diff
Updated patch. (6.71 KB, patch)
2011-12-16 02:08 PST, Michael Brüning
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Brüning 2011-12-15 09:06:26 PST
The viewport info panel in the qt MiniBrowser shows the item scale, not the css scale.
Comment 1 Michael Brüning 2011-12-15 09:24:07 PST
Created attachment 119438 [details]
Proposed patch.

Current scale is now calculated by dividing the item scale by the devicePixelRatio.
Comment 2 Michael Brüning 2011-12-15 09:34:58 PST
Created attachment 119440 [details]
Update patch.

Updated patch so it is limited to qwebviewport.cpp and qwebviewport_p.h and corrected whitespace error introduced in previous version's ChangeLog.
Comment 3 Kenneth Rohde Christiansen 2011-12-15 12:59:03 PST
Comment on attachment 119440 [details]
Update patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=119440&action=review

> Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp:49
> +    return m_webViewPrivate->pageView->scale() / m_webViewPrivate->interactionEngine->constraints().devicePixelRatio;

There are methods for doing this in the interaction engine class. Could you see if it is possible to use them?
Comment 4 Michael Brüning 2011-12-16 01:13:05 PST
> There are methods for doing this in the interaction engine class. Could you see if it is possible to use them?

Will check if that's possible...
Comment 5 Michael Brüning 2011-12-16 02:08:14 PST
Created attachment 119587 [details]
Updated patch.

Added method currentCSSScale to QtViewportInteractionEngine and changed QWebViewportInfo to use this to return the scale.

Also changed one place in QtViewportInteractionEngine to use this new method.
Comment 6 WebKit Review Bot 2011-12-16 03:27:51 PST
Comment on attachment 119587 [details]
Updated patch.

Clearing flags on attachment: 119587

Committed r103054: <http://trac.webkit.org/changeset/103054>
Comment 7 WebKit Review Bot 2011-12-16 03:27:56 PST
All reviewed patches have been landed.  Closing bug.