Bug 110218 - [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
Summary: [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Brüning
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 07:02 PST by Michael Brüning
Modified: 2013-05-14 04:31 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.13 KB, patch)
2013-02-19 07:03 PST, Michael Brüning
no flags Details | Formatted Diff | Diff
Patch (4.13 KB, patch)
2013-02-19 07:22 PST, Michael Brüning
darin: review+
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 2013-02-19 07:02:17 PST
[WK2] Make WebPageProxy use deviceScaleFactor() in creationParamaters().
Comment 1 Michael Brüning 2013-02-19 07:03:11 PST
Created attachment 189081 [details]
Patch
Comment 2 Michael Brüning 2013-02-19 07:10:15 PST
CCing Beth as she was the last author working on this in WebPageProxy as well as Simon and Kenneth for Qt resp. EFL.
Comment 3 Andras Becsi 2013-02-19 07:19:08 PST
Comment on attachment 189081 [details]
Patch

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

> Source/WebKit2/UIProcess/WebPageProxy.cpp:-3732
> -    parameters.deviceScaleFactor = m_intrinsicDeviceScaleFactor;

As Jocelyn pointed out earlier in the first patch to https://bugs.webkit.org/show_bug.cgi?id=97908, the custom device scale factor was designed to only be used temporary.
Maybe we should add C API for setting the intrinsic device scale factor and use that at least for the Qt case, where we get the scale factor from the underlying platform window?
Comment 4 Michael Brüning 2013-02-19 07:22:55 PST
Created attachment 189086 [details]
Patch

Fixed typo in bug title and ChangeLog text.
Comment 5 Michael Brüning 2013-02-19 07:44:25 PST
(In reply to comment #3)
> (From update of attachment 189081 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=189081&action=review
> 
> > Source/WebKit2/UIProcess/WebPageProxy.cpp:-3732
> > -    parameters.deviceScaleFactor = m_intrinsicDeviceScaleFactor;
> 
> As Jocelyn pointed out earlier in the first patch to https://bugs.webkit.org/show_bug.cgi?id=97908, the custom device scale factor was designed to only be used temporary.
> Maybe we should add C API for setting the intrinsic device scale factor and use that at least for the Qt case, where we get the scale factor from the underlying platform window?

Hm, while there is no real technical reason to use the custom scale factor for temporary views only, I agree that using it like we do in this patch pretty much renders the intrinsic device scale factor pointless / makes it a de-facto constant in the Efl and Qt ports. I am fine with adding the C API for setting the intrinsic scale too if this is preferable from the API owners' point of view. Let's wait for comments :).
Comment 6 Andras Becsi 2013-02-19 08:02:45 PST
(In reply to comment #5)
> (In reply to comment #3)
> > (From update of attachment 189081 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=189081&action=review
> > 
> > > Source/WebKit2/UIProcess/WebPageProxy.cpp:-3732
> > > -    parameters.deviceScaleFactor = m_intrinsicDeviceScaleFactor;
> > 
> > As Jocelyn pointed out earlier in the first patch to https://bugs.webkit.org/show_bug.cgi?id=97908, the custom device scale factor was designed to only be used temporary.
> > Maybe we should add C API for setting the intrinsic device scale factor and use that at least for the Qt case, where we get the scale factor from the underlying platform window?
> 
> Hm, while there is no real technical reason to use the custom scale factor for temporary views only, I agree that using it like we do in this patch pretty 
much renders the intrinsic device scale factor pointless / makes it a de-facto constant in the Efl and Qt ports. I am fine with adding the C API for setting the intrinsic scale too if this is preferable from the API owners' point of view. Let's wait for comments :).

I think the point of the custom device pixel ratio would be to temporarily set a device pixel ratio that's different from the intrinsic one for example for testing purposes.
Qt right now does not have a mechanism to set a custom scale factor different from the underlying platform window, thus I think we should set the intrinsic device pixel ratio instead of misusing the custom one.
Comment 7 Michael Brüning 2013-05-14 04:31:37 PDT
Committed r150063: <http://trac.webkit.org/changeset/150063>