Changeset 221161 in webkit


Ignore:
Timestamp:
Aug 24, 2017 2:41:50 PM (7 years ago)
Author:
timothy_horton@apple.com
Message:

Overflow scroll views are inset to avoid safe areas even if the parent view is not
https://bugs.webkit.org/show_bug.cgi?id=175949
<rdar://problem/34063057>

Reviewed by Beth Dakin.

  • UIProcess/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::createLayer):
Disable automatic content inset adjustment to avoid safe areas on
all of WKWebView's child UIScrollViews.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r221153 r221161  
     12017-08-24  Tim Horton  <timothy_horton@apple.com>
     2
     3        Overflow scroll views are inset to avoid safe areas even if the parent view is not
     4        https://bugs.webkit.org/show_bug.cgi?id=175949
     5        <rdar://problem/34063057>
     6
     7        Reviewed by Beth Dakin.
     8
     9        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
     10        (WebKit::RemoteLayerTreeHost::createLayer):
     11        Disable automatic content inset adjustment to avoid safe areas on
     12        all of WKWebView's child UIScrollViews.
     13
    1142017-08-24  Tim Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/ios/RemoteLayerTreeHostIOS.mm

    r213940 r221161  
    222222        break;
    223223    case PlatformCALayer::LayerTypeScrollingLayer:
    224         if (!m_isDebugLayerTreeHost)
    225             view = adoptNS([[UIScrollView alloc] init]);
    226         else // The debug indicator parents views under layers, which can cause crashes with UIScrollView.
     224        if (!m_isDebugLayerTreeHost) {
     225            auto scrollView = adoptNS([[UIScrollView alloc] init]);
     226#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
     227            [scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
     228#endif
     229            view = scrollView;
     230        } else // The debug indicator parents views under layers, which can cause crashes with UIScrollView.
    227231            view = adoptNS([[UIView alloc] init]);
    228232        break;
Note: See TracChangeset for help on using the changeset viewer.