Changeset 255220 in webkit


Ignore:
Timestamp:
Jan 27, 2020 6:20:39 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Add WKWebView SPI equivalent of WKView.shouldClipToVisibleRect
https://bugs.webkit.org/show_bug.cgi?id=206849
<rdar://problem/58887004>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-27
Reviewed by Simon Fraser.

Books currently uses WKView.setShouldClipToVisibleRect and needs to migrate to WKWebView, but it needs to do
so without modifying the other properties in _setMinimumLayoutWidth, which is currently the only other caller
of WebViewImpl::setClipsToVisibleRect. Expose an SPI that only calls WebViewImpl::setClipsToVisibleRect.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _clipsToVisibleRect]):
(-[WKWebView _setClipsToVisibleRect:]):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r255217 r255220  
     12020-01-27  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add WKWebView SPI equivalent of WKView.shouldClipToVisibleRect
     4        https://bugs.webkit.org/show_bug.cgi?id=206849
     5        <rdar://problem/58887004>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Books currently uses WKView.setShouldClipToVisibleRect and needs to migrate to WKWebView, but it needs to do
     10        so without modifying the other properties in _setMinimumLayoutWidth, which is currently the only other caller
     11        of WebViewImpl::setClipsToVisibleRect.  Expose an SPI that only calls WebViewImpl::setClipsToVisibleRect.
     12
     13        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
     14        * UIProcess/API/mac/WKWebViewMac.mm:
     15        (-[WKWebView _clipsToVisibleRect]):
     16        (-[WKWebView _setClipsToVisibleRect:]):
     17
    1182020-01-27  Brent Fulgham  <bfulgham@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h

    r255038 r255220  
    517517@property (nonatomic, readwrite, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents WK_API_AVAILABLE(macos(10.13.4));
    518518
     519/*! @abstract A Boolean value indicating whether drawing clips to the visibleRect.
     520@discussion When YES, the view will use its -visibleRect when determining which areas of the WKWebView to draw. This may improve performance for large WKWebViews which are mostly clipped out by enclosing views.  The default value is NO.
     521*/
     522@property (nonatomic, readwrite, setter=_setClipsToVisibleRect:) BOOL _clipsToVisibleRect WK_API_AVAILABLE(macos(WK_MAC_TBA));
     523
    519524@property (nonatomic, readonly) NSView *_safeBrowsingWarning WK_API_AVAILABLE(macos(10.14.4));
    520525
  • trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm

    r255132 r255220  
    14011401}
    14021402
     1403- (BOOL)_clipsToVisibleRect
     1404{
     1405    return _impl->clipsToVisibleRect();
     1406}
     1407
     1408- (void)_setClipsToVisibleRect:(BOOL)clipsToVisibleRect
     1409{
     1410    _impl->setClipsToVisibleRect(clipsToVisibleRect);
     1411}
     1412
    14031413- (BOOL)_alwaysShowsHorizontalScroller
    14041414{
Note: See TracChangeset for help on using the changeset viewer.