Bug 131141

Summary: [iOS][WK2] Add SPI to handle animated resize
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, mitz, sam, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

Description Benjamin Poulain 2014-04-02 18:35:16 PDT
[iOS][WK2] Add SPI to handle animated resize
Comment 1 Benjamin Poulain 2014-04-02 18:36:29 PDT
Created attachment 228453 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-04-03 14:12:15 PDT
Comment on attachment 228453 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:181
> +    [self _frameOrBoundsChangedFrom:self.bounds];

This is a bit weird. Maybe from:CGZeroRect?

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:447
> +    // FIXME: animated resize is gonna be a lot of fun. Some properties need to be updated live, others need to be stored
> +    // for the end of the animation.

I don't think this comment is useful.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:683
> +        CGFloat oldWebViewWidhtInContentCoordinate = oldBounds.size.width / contentZoomScale(self);

"Widht". Coordinates.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:686
> +        CGFloat visibleWebPageWidthInContentCoordinate = std::min([_contentView bounds].size.width, oldWebViewWidhtInContentCoordinate);
> +        CGFloat targetScale = bounds.size.width / visibleWebPageWidthInContentCoordinate;
> +        [_scrollView setZoomScale:targetScale];

I'm not really sure what you're trying to do here.
Comment 3 Tim Horton 2014-04-03 14:12:50 PDT
Comment on attachment 228453 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:683
> +        CGFloat oldWebViewWidhtInContentCoordinate = oldBounds.size.width / contentZoomScale(self);

typo "Widht"

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:684
> +        CGFloat visibleWebPageWidthInContentCoordinate = std::min([_contentView bounds].size.width, oldWebViewWidhtInContentCoordinate);

"WebPage"?

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:1160
> +    // FIXME: send a single message to the WebProcess to layout and repaint instead.

capitals at the beginning of a sentence
Comment 4 Benjamin Poulain 2014-04-03 15:56:08 PDT
Committed r166750: <http://trac.webkit.org/changeset/166750>