Skip to content
Permalink
Browse files
Keep track of when a WKWebView is blank before the initial non-empty …
…layout

https://bugs.webkit.org/show_bug.cgi?id=159217
<rdar://problem/26071766>

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
(-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):


Canonical link: https://commits.webkit.org/177333@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
hortont424 committed Jun 28, 2016
1 parent cb35bd3 commit 4d0ba8750d7a4bb56d2124de07ff613db2b4e6b5
@@ -1,3 +1,19 @@
2016-06-28 Tim Horton <timothy_horton@apple.com>

Keep track of when a WKWebView is blank before the initial non-empty layout
https://bugs.webkit.org/show_bug.cgi?id=159217
<rdar://problem/26071766>

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
(-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):

2016-06-28 Anders Carlsson <andersca@apple.com>

PaymentMerchantSession should wrap a PKPaymentMerchantSession
@@ -157,6 +157,10 @@ - (UIViewController *)_viewControllerForSupportedInterfaceOrientations;

#endif // PLATFORM(IOS)

#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/WKWebViewAdditions.mm>
#endif

#if PLATFORM(IOS)
static const uint32_t firstSDKVersionWithLinkPreviewEnabledByDefault = 0xA0000;
#endif
@@ -490,6 +494,8 @@ - (void)_initializeWithConfiguration:(WKWebViewConfiguration *)configuration
[_scrollView setInternalDelegate:self];
[_scrollView setBouncesZoom:YES];

[self _setIsBlankBeforeFirstNonEmptyLayout:YES];

[self addSubview:_scrollView.get()];

static uint32_t programSDKVersion = dyld_get_program_sdk_version();
@@ -1750,6 +1756,12 @@ - (BOOL)_allowsDoubleTapGestures
return !areEssentiallyEqualAsFloat(contentZoomScale(self), 1);
}

#if !USE(APPLE_INTERNAL_SDK)
- (void)_setIsBlankBeforeFirstNonEmptyLayout:(BOOL)isBlank
{
}
#endif

#pragma mark - UIScrollViewDelegate

- (BOOL)usesStandardContentView
@@ -2076,6 +2088,11 @@ - (void)_updateContentRectsWithState:(BOOL)inStableState
enclosedInScrollableAncestorView:scrollViewCanScroll([self _scroller])];
}

- (void)_didFirstVisuallyNonEmptyLayoutForMainFrame
{
[self _setIsBlankBeforeFirstNonEmptyLayout:NO];
}

- (void)_didFinishLoadForMainFrame
{
if (_gestureController)
@@ -4619,12 +4636,4 @@ - (NSArray *)certificateChain

@end

#if PLATFORM(IOS) && USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/WKWebViewAdditions.mm>
#endif

#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 && USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/WKWebViewAdditionsMac.mm>
#endif

#endif // WK_API_ENABLED
@@ -103,6 +103,7 @@ struct PrintInfo;
- (void)_updateVisibleContentRectAfterScrollInView:(UIScrollView *)scrollView;
- (void)_updateContentRectsWithState:(BOOL)inStableState;

- (void)_didFirstVisuallyNonEmptyLayoutForMainFrame;
- (void)_didFinishLoadForMainFrame;
- (void)_didFailLoadForMainFrame;
- (void)_didSameDocumentNavigationForMainFrame:(WebKit::SameDocumentNavigationType)navigationType;
@@ -702,6 +702,7 @@ - (void)redoEditing:(id)sender

void PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame()
{
[m_webView _didFirstVisuallyNonEmptyLayoutForMainFrame];
}

void PageClientImpl::didFinishLoadForMainFrame()

0 comments on commit 4d0ba87

Please sign in to comment.