REGRESSION(r213590): UI process updates the visible content rects more often than...
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jul 2017 16:17:00 +0000 (16:17 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jul 2017 16:17:00 +0000 (16:17 +0000)
commit90ea1997fe49b9619bc87dab307d048885808c9c
tree310b6f6abdb76b0a2e21798685263224bea0f83c
parent1f406fe47bf095d079558c97ee3424d7229e4621
REGRESSION(r213590): UI process updates the visible content rects more often than it did in iOS 10
https://bugs.webkit.org/show_bug.cgi?id=174282
<rdar://problem/33144344>

Reviewed by Simon Fraser.

In r213590, we accidentally refactored -[WKWebView _didCommitLayerTree:] to call _scheduleVisibleContentRectUpdate
more often. Instead, this should be triggered from inside the "if" statements.

No tests because there is no behavior change. Performance change is tested in MotionMark.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoPictureInPicture]):
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView goBack]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
(-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView _visibleContentRect]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _navigationGestureDidBegin]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _reloadExpiredOnly]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _setUnobscuredSafeAreaInsets:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
(-[WKWebView _clearOverrideLayoutParameters]):
(-[WKWebView _requestActivatedElementAtPosition:completionBlock:]):
(-[WKWebView _propertiesOfLayerWithID:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm