Bug 111075

Summary: [WK2][EFL] WebView should own page position and scale factor
Product: WebKit Reporter: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Component: WebKit EFLAssignee: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, gyuyoung.kim, kenneth, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107657, 107662    
Attachments:
Description Flags
WIP
none
WIP 2
none
patch none

Description Mikhail Pozdnyakov 2013-02-28 06:38:18 PST
SSIA.
Comment 1 Mikhail Pozdnyakov 2013-02-28 07:00:14 PST
Created attachment 190721 [details]
WIP

The code looks better now and EwkView usage is decreased inside WebView. But on the other hand 1) having scale factors both inside view and page is confusing 2) maybe it's better to use "viewport position" than "page position"?
Comment 2 Kenneth Rohde Christiansen 2013-03-03 06:52:40 PST
Comment on attachment 190721 [details]
WIP

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

> Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:69
> +
> +void WKViewSetScaleFactor(WKViewRef viewRef, float scale)
> +{
> +    toImpl(viewRef)->setScaleFactor(scale);
> +}

Should this be SetPageScaleFactor for consistency?
Comment 3 Mikhail Pozdnyakov 2013-03-05 05:20:26 PST
(In reply to comment #2)
> (From update of attachment 190721 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=190721&action=review
> 
> > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:69
> > +
> > +void WKViewSetScaleFactor(WKViewRef viewRef, float scale)
> > +{
> > +    toImpl(viewRef)->setScaleFactor(scale);
> > +}
> 
> Should this be SetPageScaleFactor for consistency?

wouldn't it be confusing for the client considering the existing 'void WKPageSetScaleFactor(WKPageRef page, double scale, WKPoint origin);' ?
Comment 4 Mikhail Pozdnyakov 2013-03-19 06:31:52 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 190721 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=190721&action=review
> > 
> > > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:69
> > > +
> > > +void WKViewSetScaleFactor(WKViewRef viewRef, float scale)
> > > +{
> > > +    toImpl(viewRef)->setScaleFactor(scale);
> > > +}
> > 
> > Should this be SetPageScaleFactor for consistency?
> 
> wouldn't it be confusing for the client considering the existing 'void WKPageSetScaleFactor(WKPageRef page, double scale, WKPoint origin);' ?

Having IRC discussion with Kenneth came to conclusion that WKViewSetContentScaleFactor would be most appropriate name for it.
Comment 5 Mikhail Pozdnyakov 2013-03-19 07:57:19 PDT
Created attachment 193830 [details]
WIP 2
Comment 6 Kenneth Rohde Christiansen 2013-03-19 08:09:59 PDT
Comment on attachment 193830 [details]
WIP 2

LGTM, but a good changelog explaining the difference between WKPageSetScaleFactor etc would be needed. Also explaining that these are in UI units
Comment 7 Mikhail Pozdnyakov 2013-04-05 04:08:50 PDT
Created attachment 196615 [details]
patch

Rebased. Added change log.
Comment 8 WebKit Commit Bot 2013-04-05 06:15:39 PDT
Comment on attachment 196615 [details]
patch

Clearing flags on attachment: 196615

Committed r147741: <http://trac.webkit.org/changeset/147741>
Comment 9 WebKit Commit Bot 2013-04-05 06:15:42 PDT
All reviewed patches have been landed.  Closing bug.