Changeset 203483 in webkit


Ignore:
Timestamp:
Jul 20, 2016 5:36:12 PM (8 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r203189): Webpage snapshots are partially or fully blank when edge swiping back
https://bugs.webkit.org/show_bug.cgi?id=160000
rdar://problem/27455589

Reviewed by Zalan Bujtas.

r203189 triggered a call to -_updateContentRectsWithState: in the middle of a swipe,
during which we'd compute the visible rect of the view as having zero width, causing us
to not create tiles.

-_navigationGestureDidBegin already snapshots the visibleContentRect in _frozenVisibleContentRect,
but -_visibleContentRect then clipped that with ancestor views, causing the issue.

Fix by having -_visibleContentRect just return _frozenVisibleContentRect if we have one.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _visibleContentRect]):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r203471 r203483  
     12016-07-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r203189): Webpage snapshots are partially or fully blank when edge swiping back
     4        https://bugs.webkit.org/show_bug.cgi?id=160000
     5        rdar://problem/27455589
     6       
     7        Reviewed by Zalan Bujtas.
     8
     9        r203189 triggered a call to -_updateContentRectsWithState: in the middle of a swipe,
     10        during which we'd compute the visible rect of the view as having zero width, causing us
     11        to not create tiles.
     12
     13        -_navigationGestureDidBegin already snapshots the visibleContentRect in _frozenVisibleContentRect,
     14        but -_visibleContentRect then clipped that with ancestor views, causing the issue.
     15
     16        Fix by having -_visibleContentRect just return _frozenVisibleContentRect if we have one.
     17
     18        * UIProcess/API/Cocoa/WKWebView.mm:
     19        (-[WKWebView _visibleContentRect]):
     20
    1212016-07-20  Myles C. Maxfield  <mmaxfield@apple.com>
    222
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r203471 r203483  
    19161916- (CGRect)_visibleContentRect
    19171917{
    1918     CGRect visibleRectInContentCoordinates = _frozenVisibleContentRect ? _frozenVisibleContentRect.value() : [self convertRect:self.bounds toView:_contentView.get()];
     1918    if (_frozenVisibleContentRect)
     1919        return _frozenVisibleContentRect.value();
     1920
     1921    CGRect visibleRectInContentCoordinates = [self convertRect:self.bounds toView:_contentView.get()];
    19191922   
    19201923    if (UIScrollView *enclosingScroller = [self _scroller]) {
Note: See TracChangeset for help on using the changeset viewer.