Fix WKPasswordView compilation on iOS
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2019 18:14:13 +0000 (18:14 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2019 18:14:13 +0000 (18:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195344
<rdar://problem/48620066>

Reviewed by Dan Bates.

Use WebKitAdditions.

* UIProcess/ios/WKPasswordView.mm:
(-[WKPasswordView showInScrollView:]):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKPasswordView.mm

index 78ce5f3..c309ca9 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-05  Dean Jackson  <dino@apple.com>
+
+        Fix WKPasswordView compilation on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=195344
+        <rdar://problem/48620066>
+
+        Reviewed by Dan Bates.
+
+        Use WebKitAdditions.
+
+        * UIProcess/ios/WKPasswordView.mm:
+        (-[WKPasswordView showInScrollView:]):
+
 2019-03-06  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS] Frequent 1 second IPC deadlocks when showing a paste callout
index c7b9a22..0111ec5 100644 (file)
 #import <wtf/RetainPtr.h>
 #import <wtf/text/WTFString.h>
 
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKPasswordViewAdditions.mm>)
+#include <WebKitAdditions/WKPasswordViewAdditions.mm>
+#else
+static void configureScrollView(UIScrollView *scrollView)
+{
+    [scrollView setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
+}
+#endif
+
+
 const CGFloat passwordEntryFieldPadding = 10;
 
 @interface WKPasswordView () <UIDocumentPasswordViewDelegate>
@@ -100,7 +110,8 @@ const CGFloat passwordEntryFieldPadding = 10;
     [_scrollView setMaximumZoomScale:1];
     [_scrollView setZoomScale:1];
     [_scrollView setContentSize:self.frame.size];
-    [_scrollView setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
+
+    configureScrollView(_scrollView.get());
 
     [scrollView addSubview:self];
 }