Title: [202586] trunk/Source/WebKit2
- Revision
- 202586
- Author
- [email protected]
- Date
- 2016-06-28 14:10:32 -0700 (Tue, 28 Jun 2016)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (202585 => 202586)
--- trunk/Source/WebKit2/ChangeLog 2016-06-28 21:03:15 UTC (rev 202585)
+++ trunk/Source/WebKit2/ChangeLog 2016-06-28 21:10:32 UTC (rev 202586)
@@ -1,3 +1,19 @@
+2016-06-28 Tim Horton <[email protected]>
+
+ 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 <[email protected]>
PaymentMerchantSession should wrap a PKPaymentMerchantSession
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (202585 => 202586)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2016-06-28 21:03:15 UTC (rev 202585)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2016-06-28 21:10:32 UTC (rev 202586)
@@ -157,6 +157,10 @@
#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 @@
[_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 @@
return !areEssentiallyEqualAsFloat(contentZoomScale(self), 1);
}
+#if !USE(APPLE_INTERNAL_SDK)
+- (void)_setIsBlankBeforeFirstNonEmptyLayout:(BOOL)isBlank
+{
+}
+#endif
+
#pragma mark - UIScrollViewDelegate
- (BOOL)usesStandardContentView
@@ -2076,6 +2088,11 @@
enclosedInScrollableAncestorView:scrollViewCanScroll([self _scroller])];
}
+- (void)_didFirstVisuallyNonEmptyLayoutForMainFrame
+{
+ [self _setIsBlankBeforeFirstNonEmptyLayout:NO];
+}
+
- (void)_didFinishLoadForMainFrame
{
if (_gestureController)
@@ -4619,12 +4636,4 @@
@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
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (202585 => 202586)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h 2016-06-28 21:03:15 UTC (rev 202585)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h 2016-06-28 21:10:32 UTC (rev 202586)
@@ -103,6 +103,7 @@
- (void)_updateVisibleContentRectAfterScrollInView:(UIScrollView *)scrollView;
- (void)_updateContentRectsWithState:(BOOL)inStableState;
+- (void)_didFirstVisuallyNonEmptyLayoutForMainFrame;
- (void)_didFinishLoadForMainFrame;
- (void)_didFailLoadForMainFrame;
- (void)_didSameDocumentNavigationForMainFrame:(WebKit::SameDocumentNavigationType)navigationType;
Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (202585 => 202586)
--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2016-06-28 21:03:15 UTC (rev 202585)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2016-06-28 21:10:32 UTC (rev 202586)
@@ -702,6 +702,7 @@
void PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame()
{
+ [m_webView _didFirstVisuallyNonEmptyLayoutForMainFrame];
}
void PageClientImpl::didFinishLoadForMainFrame()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes