Bug 206849 - Add WKWebView SPI equivalent of WKView.shouldClipToVisibleRect
Summary: Add WKWebView SPI equivalent of WKView.shouldClipToVisibleRect
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-27 16:12 PST by Alex Christensen
Modified: 2020-01-27 18:21 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.70 KB, patch)
2020-01-27 16:15 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (2.97 KB, patch)
2020-01-27 17:22 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>