Changeset 167615 in webkit


Ignore:
Timestamp:
Apr 21, 2014 1:14:05 PM (10 years ago)
Author:
benjamin@webkit.org
Message:

[iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
https://bugs.webkit.org/show_bug.cgi?id=131884

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-21
Reviewed by Darin Adler.

<rdar://problem/16667291>

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _beginAnimatedResizeWithUpdates:]):
It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
Since we were only changing the minimumScale for the transition, the target scale was affected
by max-scale. This was breaking the transition from portrait to landscale.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r167614 r167615  
     12014-04-21  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
     4        https://bugs.webkit.org/show_bug.cgi?id=131884
     5
     6        Reviewed by Darin Adler.
     7
     8        <rdar://problem/16667291>
     9
     10        * UIProcess/API/Cocoa/WKWebView.mm:
     11        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
     12        It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
     13        Since we were only changing the minimumScale for the transition, the target scale was affected
     14        by max-scale. This was breaking the transition from portrait to landscale.
     15
    1162014-04-21  Benjamin Poulain  <bpoulain@apple.com>
    217
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r167519 r167615  
    13381338    CGSize contentSizeInContentViewCoordinates = [_contentView bounds].size;
    13391339    [_scrollView setMinimumZoomScale:std::min(newBounds.size.width / contentSizeInContentViewCoordinates.width, [_scrollView minimumZoomScale])];
     1340    [_scrollView setMaximumZoomScale:std::max(newBounds.size.width / contentSizeInContentViewCoordinates.width, [_scrollView maximumZoomScale])];
    13401341
    13411342    // Compute the new scale to keep the current content width in the scrollview.
Note: See TracChangeset for help on using the changeset viewer.