Bug 206849

Summary: Add WKWebView SPI equivalent of WKView.shouldClipToVisibleRect
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Alex Christensen 2020-01-27 16:12:20 PST
Add WKWebView SPI equivalent of WKView.shouldClipToVisibleRect
Comment 1 Alex Christensen 2020-01-27 16:15:16 PST
Created attachment 388934 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-01-27 17:11:33 PST
Comment on attachment 388934 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=388934&action=review

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:518
> +@property (nonatomic, readwrite, setter=_setClipsToVisibleRect:) BOOL _clipsToVisibleRect WK_API_AVAILABLE(macos(WK_MAC_TBA));

Please add some explanatory comment in header doc style. I would suggest:

_clipsToVisibleRect: 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.

Should we make this available for iOS too?
Comment 3 Alex Christensen 2020-01-27 17:22:02 PST
Created attachment 388947 [details]
Patch
Comment 4 Alex Christensen 2020-01-27 17:23:25 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 388934 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=388934&action=review
> 
> > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:518
> > +@property (nonatomic, readwrite, setter=_setClipsToVisibleRect:) BOOL _clipsToVisibleRect WK_API_AVAILABLE(macos(WK_MAC_TBA));
> 
> Please add some explanatory comment in header doc style. I would suggest:
> 
> _clipsToVisibleRect: 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.
Done!

> Should we make this available for iOS too?
The boolean value this sets is only used inside of #if PLATFORM(MAC).  If requested, we could develop a conceptual equivalent, but this is sufficient for now.
Comment 5 WebKit Commit Bot 2020-01-27 18:20:09 PST
The commit-queue encountered the following flaky tests while processing attachment 388947 [details]:

editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2020-01-27 18:20:46 PST
Comment on attachment 388947 [details]
Patch

Clearing flags on attachment: 388947

Committed r255220: <https://trac.webkit.org/changeset/255220>
Comment 7 WebKit Commit Bot 2020-01-27 18:20:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2020-01-27 18:21:11 PST
<rdar://problem/58942643>