Bug 131141 - [iOS][WK2] Add SPI to handle animated resize
Summary: [iOS][WK2] Add SPI to handle animated resize
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: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-02 18:35 PDT by Benjamin Poulain
Modified: 2014-04-03 15:56 PDT (History)
5 users (show)

See Also:


Attachments
Patch (6.31 KB, patch)
2014-04-02 18:36 PDT, Benjamin Poulain
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>