Transition more WKWebViewConfiguration ivars to API::PageConfiguration values
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2018 18:19:19 +0000 (18:19 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2018 18:19:19 +0000 (18:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188663

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _drawsBackground]):
(-[WKWebViewConfiguration _setDrawsBackground:]):
(-[WKWebViewConfiguration _waitsForPaintAfterViewDidMoveToWindow]):
(-[WKWebViewConfiguration _setWaitsForPaintAfterViewDidMoveToWindow:]):
(-[WKWebViewConfiguration _isControlledByAutomation]):
(-[WKWebViewConfiguration _setControlledByAutomation:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

index cfaaf2b..393d597 100644 (file)
@@ -1,5 +1,24 @@
 2018-08-16  Alex Christensen  <achristensen@webkit.org>
 
+        Transition more WKWebViewConfiguration ivars to API::PageConfiguration values
+        https://bugs.webkit.org/show_bug.cgi?id=188663
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        (-[WKWebViewConfiguration copyWithZone:]):
+        (-[WKWebViewConfiguration _drawsBackground]):
+        (-[WKWebViewConfiguration _setDrawsBackground:]):
+        (-[WKWebViewConfiguration _waitsForPaintAfterViewDidMoveToWindow]):
+        (-[WKWebViewConfiguration _setWaitsForPaintAfterViewDidMoveToWindow:]):
+        (-[WKWebViewConfiguration _isControlledByAutomation]):
+        (-[WKWebViewConfiguration _setControlledByAutomation:]):
+
+2018-08-16  Alex Christensen  <achristensen@webkit.org>
+
         Stop using canAuthenticateAgainstProtectionSpace in modern WebKit
         https://bugs.webkit.org/show_bug.cgi?id=188639
 
index 624be63..92b168e 100644 (file)
@@ -538,9 +538,6 @@ static void validate(WKWebViewConfiguration *configuration)
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldConvertPositionStyleOnCopyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _convertsPositionStyleOnCopy]));
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::httpEquivEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsMetaRefresh]));
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowUniversalAccessFromFileURLs]));
-    pageConfiguration->setWaitsForPaintAfterViewDidMoveToWindow([_configuration _waitsForPaintAfterViewDidMoveToWindow]);
-    pageConfiguration->setDrawsBackground([_configuration _drawsBackground]);
-    pageConfiguration->setControlledByAutomation([_configuration _isControlledByAutomation]);
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::incompleteImageBorderEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _incompleteImageBorderEnabled]));
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldDeferAsynchronousScriptsUntilAfterDocumentLoadKey(), WebKit::WebPreferencesStore::Value(!![_configuration _shouldDeferAsynchronousScriptsUntilAfterDocumentLoad]));
 
index 46c89c6..fb1fdc2 100644 (file)
@@ -147,8 +147,6 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     BOOL _imageControlsEnabled;
     BOOL _requiresUserActionForEditingControlsManager;
 #endif
-    BOOL _waitsForPaintAfterViewDidMoveToWindow;
-    BOOL _controlledByAutomation;
 
 #if ENABLE(APPLICATION_MANIFEST)
     RetainPtr<_WKApplicationManifest> _applicationManifest;
@@ -163,7 +161,6 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     BOOL _colorFilterEnabled;
     BOOL _incompleteImageBorderEnabled;
     BOOL _shouldDeferAsynchronousScriptsUntilAfterDocumentLoad;
-    BOOL _drawsBackground;
 
     RetainPtr<NSString> _mediaContentTypesRequiringHardwareSupport;
 }
@@ -217,7 +214,6 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     _imageControlsEnabled = NO;
     _requiresUserActionForEditingControlsManager = NO;
 #endif
-    _waitsForPaintAfterViewDidMoveToWindow = YES;
 
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     _allowsAirPlayForMediaPlayback = YES;
@@ -249,7 +245,6 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     _colorFilterEnabled = NO;
     _incompleteImageBorderEnabled = NO;
     _shouldDeferAsynchronousScriptsUntilAfterDocumentLoad = NO;
-    _drawsBackground = YES;
 
     return self;
 }
@@ -364,8 +359,6 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     configuration->_attachmentElementEnabled = self->_attachmentElementEnabled;
     configuration->_mediaTypesRequiringUserActionForPlayback = self->_mediaTypesRequiringUserActionForPlayback;
     configuration->_mainContentUserGestureOverrideEnabled = self->_mainContentUserGestureOverrideEnabled;
-    configuration->_waitsForPaintAfterViewDidMoveToWindow = self->_waitsForPaintAfterViewDidMoveToWindow;
-    configuration->_controlledByAutomation = self->_controlledByAutomation;
 
 #if PLATFORM(IOS)
     configuration->_allowsInlineMediaPlayback = self->_allowsInlineMediaPlayback;
@@ -410,7 +403,6 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     configuration->_colorFilterEnabled = self->_colorFilterEnabled;
     configuration->_incompleteImageBorderEnabled = self->_incompleteImageBorderEnabled;
     configuration->_shouldDeferAsynchronousScriptsUntilAfterDocumentLoad = self->_shouldDeferAsynchronousScriptsUntilAfterDocumentLoad;
-    configuration->_drawsBackground = self->_drawsBackground;
 
     return configuration;
 }
@@ -790,12 +782,12 @@ static NSString *defaultApplicationNameForUserAgent()
 
 - (BOOL)_drawsBackground
 {
-    return _drawsBackground;
+    return _pageConfiguration->drawsBackground();
 }
 
 - (void)_setDrawsBackground:(BOOL)drawsBackground
 {
-    _drawsBackground = drawsBackground;
+    _pageConfiguration->setDrawsBackground(drawsBackground);
 }
 
 - (BOOL)_requiresUserActionForVideoPlayback
@@ -846,22 +838,22 @@ static NSString *defaultApplicationNameForUserAgent()
 
 - (BOOL)_waitsForPaintAfterViewDidMoveToWindow
 {
-    return _waitsForPaintAfterViewDidMoveToWindow;
+    return _pageConfiguration->waitsForPaintAfterViewDidMoveToWindow();
 }
 
-- (void)_setWaitsForPaintAfterViewDidMoveToWindow:(BOOL)shouldSynchronize
+- (void)_setWaitsForPaintAfterViewDidMoveToWindow:(BOOL)waitsForPaintAfterViewDidMoveToWindow
 {
-    _waitsForPaintAfterViewDidMoveToWindow = shouldSynchronize;
+    _pageConfiguration->setWaitsForPaintAfterViewDidMoveToWindow(waitsForPaintAfterViewDidMoveToWindow);
 }
 
 - (BOOL)_isControlledByAutomation
 {
-    return _controlledByAutomation;
+    return _pageConfiguration->isControlledByAutomation();
 }
 
 - (void)_setControlledByAutomation:(BOOL)controlledByAutomation
 {
-    _controlledByAutomation = controlledByAutomation;
+    _pageConfiguration->setControlledByAutomation(controlledByAutomation);
 }
 
 - (_WKApplicationManifest *)_applicationManifest