Bug 110218

Summary: [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
Product: WebKit Reporter: Michael Brüning <michael.bruning>
Component: New BugsAssignee: Michael Brüning <michael.bruning>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, bdakin, cmarcelo, gyuyoung.kim, hausmann, jturcotte, kenneth, menard, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch darin: review+

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>