Bug 156429

Summary: [iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, cdumez, commit-queue, japhet, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Simon Fraser (smfr) 2016-04-08 17:11:28 PDT
[iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
Comment 1 Simon Fraser (smfr) 2016-04-08 17:23:21 PDT
Created attachment 276062 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-04-08 17:23:52 PDT
rdar://problem/25455111
Comment 3 WebKit Commit Bot 2016-04-08 17:25:11 PDT
Attachment 276062 [details] did not pass style-queue:


ERROR: Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h:60:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 1 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Tim Horton 2016-04-08 17:27:40 PDT
Comment on attachment 276062 [details]
Patch

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

> Source/WebCore/page/Page.h:302
> +    bool enclosedInScrollView() const { return m_enclosedInScrollView; }
> +    void setEnclosedInScrollView(bool f) { m_enclosedInScrollView = f; }

I wonder if this is too generic. We have something called ScrollView, which this has nothing to do with.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:1870
> +    if (_enclosingScrollViewScrollTimer)

Why NSTimer instead of a DeferrableOneShot? That will be a lot cheaper than rescheduling an NSTimer every scrolling increment.
Comment 5 Simon Fraser (smfr) 2016-04-08 18:19:13 PDT
https://trac.webkit.org/r199259
Comment 6 Chris Dumez 2016-05-03 15:19:32 PDT
Reverted r199259 and r200161 for reason:

Seems to have caused a ~1.2% PLT regression on iOS

Committed r200390: <http://trac.webkit.org/changeset/200390>
Comment 7 Simon Fraser (smfr) 2016-05-09 12:32:17 PDT
It was re-landed in https://trac.webkit.org/r200470