Title: [229693] trunk
Revision
229693
Author
wenson_hs...@apple.com
Date
2018-03-16 22:58:06 -0700 (Fri, 16 Mar 2018)

Log Message

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (229692 => 229693)


--- trunk/Source/WebKit/ChangeLog	2018-03-17 04:34:02 UTC (rev 229692)
+++ trunk/Source/WebKit/ChangeLog	2018-03-17 05:58:06 UTC (rev 229693)
@@ -1,5 +1,18 @@
 2018-03-16  Wenson Hsieh  <wenson_hs...@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_hs...@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>

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (229692 => 229693)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-03-17 04:34:02 UTC (rev 229692)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-03-17 05:58:06 UTC (rev 229693)
@@ -4948,16 +4948,6 @@
 
 #if PLATFORM(IOS)
 
-- (NSLayoutDimension *)_contentWidthAnchor
-{
-    return [_contentView widthAnchor];
-}
-
-- (NSLayoutDimension *)_contentHeightAnchor
-{
-    return [_contentView heightAnchor];
-}
-
 #if ENABLE(FULLSCREEN_API)
 - (void)removeFromSuperview
 {

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (229692 => 229693)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2018-03-17 04:34:02 UTC (rev 229692)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2018-03-17 05:58:06 UTC (rev 229693)
@@ -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));

Modified: trunk/Tools/ChangeLog (229692 => 229693)


--- trunk/Tools/ChangeLog	2018-03-17 04:34:02 UTC (rev 229692)
+++ trunk/Tools/ChangeLog	2018-03-17 05:58:06 UTC (rev 229693)
@@ -1,3 +1,16 @@
+2018-03-16  Wenson Hsieh  <wenson_hs...@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  <za...@apple.com>
 
         [LayoutReloaded] Move move functions to the base class from BlockFormattingContext

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm (229692 => 229693)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm	2018-03-17 04:34:02 UTC (rev 229692)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm	2018-03-17 05:58:06 UTC (rev 229693)
@@ -27,18 +27,11 @@
 
 #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 && PLATFORM(MAC)
 
-#if WK_API_ENABLED
-
-#if 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
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to