Unreviewed, rolling out r229688.

There's a solution that doesn't require this SPI.

Reverted changeset:

"Add SPI to expose width and height anchors for WKWebView's
content view"
https://bugs.webkit.org/show_bug.cgi?id=183711
https://trac.webkit.org/changeset/229688

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@229693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 6c09a19..b0212fe 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,5 +1,18 @@
 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
 
+        Unreviewed, rolling out r229688.
+
+        There's a solution that doesn't require this SPI.
+
+        Reverted changeset:
+
+        "Add SPI to expose width and height anchors for WKWebView's
+        content view"
+        https://bugs.webkit.org/show_bug.cgi?id=183711
+        https://trac.webkit.org/changeset/229688
+
+2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
+
         Add SPI to expose width and height anchors for WKWebView's content view
         https://bugs.webkit.org/show_bug.cgi?id=183711
         <rdar://problem/38562899>
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
index e191303..18b2bc1 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
@@ -4948,16 +4948,6 @@
 
 #if PLATFORM(IOS)
 
-- (NSLayoutDimension *)_contentWidthAnchor
-{
-    return [_contentView widthAnchor];
-}
-
-- (NSLayoutDimension *)_contentHeightAnchor
-{
-    return [_contentView heightAnchor];
-}
-
 #if ENABLE(FULLSCREEN_API)
 - (void)removeFromSuperview
 {
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
index e1dd5d8..e63dd9f 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
@@ -254,9 +254,6 @@
 - (void)_accessibilityRetrieveSpeakSelectionContent WK_API_AVAILABLE(ios(11.0));
 - (void)_accessibilityDidGetSpeakSelectionContent:(NSString *)content WK_API_AVAILABLE(ios(11.0));
 
-@property (nonatomic, readonly) NSLayoutDimension *_contentWidthAnchor WK_API_AVAILABLE(ios(WK_IOS_TBA));
-@property (nonatomic, readonly) NSLayoutDimension *_contentHeightAnchor WK_API_AVAILABLE(ios(WK_IOS_TBA));
-
 #else
 
 @property (nonatomic, readonly) _WKRectEdge _pinnedState WK_API_AVAILABLE(macosx(WK_MAC_TBA));
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 067f8ac..40980f9 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,16 @@
+2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Unreviewed, rolling out r229688.
+
+        There's a solution that doesn't require this SPI.
+
+        Reverted changeset:
+
+        "Add SPI to expose width and height anchors for WKWebView's
+        content view"
+        https://bugs.webkit.org/show_bug.cgi?id=183711
+        https://trac.webkit.org/changeset/229688
+
 2018-03-16  Zalan Bujtas  <zalan@apple.com>
 
         [LayoutReloaded] Move move functions to the base class from BlockFormattingContext
diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm
index d125741..7c39c3c 100644
--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm
+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm
@@ -27,17 +27,10 @@
 
 #import "PlatformUtilities.h"
 #import "TestNavigationDelegate.h"
-#import "TestWKWebView.h"
 #import <WebKit/WKWebViewPrivate.h>
 #import <wtf/RetainPtr.h>
 
-#if PLATFORM(IOS)
-#import "UIKitSPI.h"
-#endif
-
-#if WK_API_ENABLED
-
-#if PLATFORM(MAC)
+#if WK_API_ENABLED && PLATFORM(MAC)
 
 static bool didInvalidateIntrinsicContentSize;
 static bool didEvaluateJavaScript;
@@ -211,54 +204,4 @@
     [webView setNavigationDelegate:nil];
 }
 
-#endif // PLATFORM(MAC)
-
-#if PLATFORM(IOS)
-
-static void checkCGRect(CGRect expected, CGRect observed)
-{
-    bool success = CGRectEqualToRect(expected, observed);
-    EXPECT_TRUE(success);
-    if (!success)
-        NSLog(@"Expected rect: %@ but got: %@", NSStringFromCGRect(expected), NSStringFromCGRect(observed));
-}
-
-TEST(WebKit, AutoLayoutPositionHeaderAndFooterViewsInScrollView)
-{
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
-    UIScrollView *scrollView = [webView scrollView];
-    scrollView.contentInset = UIEdgeInsetsMake(100, 0, 100, 0);
-
-    [webView synchronouslyLoadHTMLString:@"<meta name='viewport' content='width=device-width, initial-scale=1'><body style='width: 100%; height: 5000px; margin: 0'>"];
-
-    auto headerLabel = adoptNS([[UILabel alloc] init]);
-    [headerLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
-    [scrollView addSubview:headerLabel.get()];
-
-    auto footerLabel = adoptNS([[UILabel alloc] init]);
-    [footerLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
-    [scrollView addSubview:footerLabel.get()];
-
-    [NSLayoutConstraint activateConstraints:@[
-        [[headerLabel widthAnchor] constraintEqualToConstant:320],
-        [[headerLabel heightAnchor] constraintEqualToConstant:100],
-        [[headerLabel leftAnchor] constraintEqualToAnchor:scrollView.contentLayoutGuide.leftAnchor],
-        [[headerLabel bottomAnchor] constraintEqualToAnchor:scrollView.contentLayoutGuide.topAnchor],
-        [[footerLabel widthAnchor] constraintEqualToConstant:320],
-        [[footerLabel heightAnchor] constraintEqualToConstant:100],
-        [[footerLabel leftAnchor] constraintEqualToAnchor:scrollView.contentLayoutGuide.leftAnchor],
-        [[footerLabel topAnchor] constraintEqualToAnchor:scrollView.contentLayoutGuide.bottomAnchor],
-        [[webView _contentWidthAnchor] constraintEqualToAnchor:scrollView.contentLayoutGuide.widthAnchor],
-        [[webView _contentHeightAnchor] constraintEqualToAnchor:scrollView.contentLayoutGuide.heightAnchor]
-    ]];
-
-    [webView layoutSubviews];
-    [webView waitForNextPresentationUpdate];
-
-    checkCGRect(CGRectMake(0, -100, 320, 100), [headerLabel frame]);
-    checkCGRect(CGRectMake(0, 5000, 320, 100), [footerLabel frame]);
-}
-
-#endif // PLATFORM(IOS)
-
-#endif // WK_API_ENABLED
+#endif