[iOS] [WK2] Introduce new views and view controllers to support extra-zoomed text...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jan 2018 01:12:20 +0000 (01:12 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jan 2018 01:12:20 +0000 (01:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182000
<rdar://problem/35143035>

Reviewed by Tim Horton.

Add new files to support text form control editing while extra-zoomed.

* UIProcess/ios/forms/WKFocusedFormControlView.h: Added.
* UIProcess/ios/forms/WKFocusedFormControlView.mm: Added.
* UIProcess/ios/forms/WKFocusedFormControlViewController.h: Added.
* UIProcess/ios/forms/WKFocusedFormControlViewController.mm: Added.
* UIProcess/ios/forms/WKTextFormControlViewController.h: Added.
* UIProcess/ios/forms/WKTextFormControlViewController.mm: Added.
* UIProcess/ios/forms/WKTextInputViewController.h: Added.
* UIProcess/ios/forms/WKTextInputViewController.mm: Added.
* UIProcess/ios/forms/WKTextSuggestionButton.h: Added.
* UIProcess/ios/forms/WKTextSuggestionButton.mm: Added.
* WebKit.xcodeproj/project.pbxproj:

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

12 files changed:
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlView.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlView.mm [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlViewController.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlViewController.mm [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKTextFormControlViewController.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKTextFormControlViewController.mm [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.mm [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKTextSuggestionButton.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKTextSuggestionButton.mm [new file with mode: 0644]
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index 45286c0..4247299 100644 (file)
@@ -1,3 +1,25 @@
+2018-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [iOS] [WK2] Introduce new views and view controllers to support extra-zoomed text form controls
+        https://bugs.webkit.org/show_bug.cgi?id=182000
+        <rdar://problem/35143035>
+
+        Reviewed by Tim Horton.
+
+        Add new files to support text form control editing while extra-zoomed.
+
+        * UIProcess/ios/forms/WKFocusedFormControlView.h: Added.
+        * UIProcess/ios/forms/WKFocusedFormControlView.mm: Added.
+        * UIProcess/ios/forms/WKFocusedFormControlViewController.h: Added.
+        * UIProcess/ios/forms/WKFocusedFormControlViewController.mm: Added.
+        * UIProcess/ios/forms/WKTextFormControlViewController.h: Added.
+        * UIProcess/ios/forms/WKTextFormControlViewController.mm: Added.
+        * UIProcess/ios/forms/WKTextInputViewController.h: Added.
+        * UIProcess/ios/forms/WKTextInputViewController.mm: Added.
+        * UIProcess/ios/forms/WKTextSuggestionButton.h: Added.
+        * UIProcess/ios/forms/WKTextSuggestionButton.mm: Added.
+        * WebKit.xcodeproj/project.pbxproj:
+
 2018-01-25  Chris Dumez  <cdumez@apple.com>
 
         Clients.get(id) should only returns clients in the service worker's origin
diff --git a/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlView.h b/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlView.h
new file mode 100644 (file)
index 0000000..952ef92
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKFocusedFormControlViewAdditions.h>)
+#import <WebKitAdditions/WKFocusedFormControlViewAdditions.h>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlView.mm b/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlView.mm
new file mode 100644 (file)
index 0000000..7f1740b
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKFocusedFormControlView.h"
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKFocusedFormControlViewAdditions.mm>)
+#import <WebKitAdditions/WKFocusedFormControlViewAdditions.mm>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlViewController.h b/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlViewController.h
new file mode 100644 (file)
index 0000000..e8430f0
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKFocusedFormControlViewControllerAdditions.h>)
+#import <WebKitAdditions/WKFocusedFormControlViewControllerAdditions.h>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlViewController.mm b/Source/WebKit/UIProcess/ios/forms/WKFocusedFormControlViewController.mm
new file mode 100644 (file)
index 0000000..032b0f8
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKFocusedFormControlViewController.h"
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKFocusedFormControlViewControllerAdditions.mm>)
+#import <WebKitAdditions/WKFocusedFormControlViewControllerAdditions.mm>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKTextFormControlViewController.h b/Source/WebKit/UIProcess/ios/forms/WKTextFormControlViewController.h
new file mode 100644 (file)
index 0000000..6fc45f6
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKTextFormControlViewControllerAdditions.h>)
+#import <WebKitAdditions/WKTextFormControlViewControllerAdditions.h>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKTextFormControlViewController.mm b/Source/WebKit/UIProcess/ios/forms/WKTextFormControlViewController.mm
new file mode 100644 (file)
index 0000000..0023bf8
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "WKTextFormControlViewController.h"
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKTextFormControlViewControllerAdditions.mm>)
+#import <WebKitAdditions/WKTextFormControlViewControllerAdditions.mm>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h b/Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h
new file mode 100644 (file)
index 0000000..98a1d4b
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKTextInputViewControllerAdditions.h>)
+#import <WebKitAdditions/WKTextInputViewControllerAdditions.h>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.mm b/Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.mm
new file mode 100644 (file)
index 0000000..9972463
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKTextInputViewController.h"
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKTextInputViewControllerAdditions.mm>)
+#import <WebKitAdditions/WKTextInputViewControllerAdditions.mm>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKTextSuggestionButton.h b/Source/WebKit/UIProcess/ios/forms/WKTextSuggestionButton.h
new file mode 100644 (file)
index 0000000..2990ab2
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKTextSuggestionButtonAdditions.h>)
+#import <WebKitAdditions/WKTextSuggestionButtonAdditions.h>
+#endif
diff --git a/Source/WebKit/UIProcess/ios/forms/WKTextSuggestionButton.mm b/Source/WebKit/UIProcess/ios/forms/WKTextSuggestionButton.mm
new file mode 100644 (file)
index 0000000..98b6a32
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKTextSuggestionButton.h"
+
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKTextSuggestionButtonAdditions.mm>)
+#import <WebKitAdditions/WKTextSuggestionButtonAdditions.mm>
+#endif
index 6b9c9ce..4960442 100644 (file)
                2DFC7DBB1BCCC19500C1548C /* WebViewImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DFC7DB91BCCC19500C1548C /* WebViewImpl.h */; };
                2DFC7DBC1BCCC19500C1548C /* WebViewImpl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DFC7DBA1BCCC19500C1548C /* WebViewImpl.mm */; };
                2DFF7B6F1DA4CFAF00814614 /* WKBackForwardListItemPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DFF7B6E1DA4CFAF00814614 /* WKBackForwardListItemPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               2E16B6A12016E680008996D6 /* WKTextFormControlViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E16B69F2016E680008996D6 /* WKTextFormControlViewController.h */; };
+               2E16B6A720171693008996D6 /* WKTextFormControlViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E16B6A02016E680008996D6 /* WKTextFormControlViewController.mm */; };
+               2E16B6B82017AB9C008996D6 /* WKFocusedFormControlViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E16B6B62017AB9C008996D6 /* WKFocusedFormControlViewController.h */; };
+               2E16B6B92017AB9C008996D6 /* WKFocusedFormControlViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E16B6B72017AB9C008996D6 /* WKFocusedFormControlViewController.mm */; };
+               2E16B6CA2017B768008996D6 /* WKTextInputViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E16B6C82017B768008996D6 /* WKTextInputViewController.h */; };
+               2E16B6CB2017B768008996D6 /* WKTextInputViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E16B6C92017B768008996D6 /* WKTextInputViewController.mm */; };
+               2E16B6CE2017B7AD008996D6 /* WKFocusedFormControlView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E16B6CC2017B7AB008996D6 /* WKFocusedFormControlView.mm */; };
+               2E16B6CF2017B7AD008996D6 /* WKFocusedFormControlView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E16B6CD2017B7AC008996D6 /* WKFocusedFormControlView.h */; };
+               2E16B6D42017BA37008996D6 /* WKTextSuggestionButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E16B6D22017BA37008996D6 /* WKTextSuggestionButton.h */; };
+               2E16B6D52017BA37008996D6 /* WKTextSuggestionButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E16B6D32017BA37008996D6 /* WKTextSuggestionButton.mm */; };
                2E5C770E1FA7D429005932C3 /* APIAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E5C770C1FA7D429005932C3 /* APIAttachment.h */; };
                2E5C770F1FA7D429005932C3 /* APIAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E5C770D1FA7D429005932C3 /* APIAttachment.cpp */; };
                2E7A944A1BBD97C300945547 /* _WKFocusedElementInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E7A94491BBD95C600945547 /* _WKFocusedElementInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2DFC7DB91BCCC19500C1548C /* WebViewImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewImpl.h; sourceTree = "<group>"; };
                2DFC7DBA1BCCC19500C1548C /* WebViewImpl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewImpl.mm; sourceTree = "<group>"; };
                2DFF7B6E1DA4CFAF00814614 /* WKBackForwardListItemPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBackForwardListItemPrivate.h; sourceTree = "<group>"; };
+               2E16B69F2016E680008996D6 /* WKTextFormControlViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKTextFormControlViewController.h; path = ios/forms/WKTextFormControlViewController.h; sourceTree = "<group>"; };
+               2E16B6A02016E680008996D6 /* WKTextFormControlViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKTextFormControlViewController.mm; path = ios/forms/WKTextFormControlViewController.mm; sourceTree = "<group>"; };
+               2E16B6B62017AB9C008996D6 /* WKFocusedFormControlViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFocusedFormControlViewController.h; path = ios/forms/WKFocusedFormControlViewController.h; sourceTree = "<group>"; };
+               2E16B6B72017AB9C008996D6 /* WKFocusedFormControlViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFocusedFormControlViewController.mm; path = ios/forms/WKFocusedFormControlViewController.mm; sourceTree = "<group>"; };
+               2E16B6C82017B768008996D6 /* WKTextInputViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKTextInputViewController.h; path = ios/forms/WKTextInputViewController.h; sourceTree = "<group>"; };
+               2E16B6C92017B768008996D6 /* WKTextInputViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKTextInputViewController.mm; path = ios/forms/WKTextInputViewController.mm; sourceTree = "<group>"; };
+               2E16B6CC2017B7AB008996D6 /* WKFocusedFormControlView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFocusedFormControlView.mm; path = ios/forms/WKFocusedFormControlView.mm; sourceTree = "<group>"; };
+               2E16B6CD2017B7AC008996D6 /* WKFocusedFormControlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKFocusedFormControlView.h; path = ios/forms/WKFocusedFormControlView.h; sourceTree = "<group>"; };
+               2E16B6D22017BA37008996D6 /* WKTextSuggestionButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKTextSuggestionButton.h; path = ios/forms/WKTextSuggestionButton.h; sourceTree = "<group>"; };
+               2E16B6D32017BA37008996D6 /* WKTextSuggestionButton.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKTextSuggestionButton.mm; path = ios/forms/WKTextSuggestionButton.mm; sourceTree = "<group>"; };
                2E5C770C1FA7D429005932C3 /* APIAttachment.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIAttachment.h; sourceTree = "<group>"; };
                2E5C770D1FA7D429005932C3 /* APIAttachment.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = APIAttachment.cpp; sourceTree = "<group>"; };
                2E7A94491BBD95C600945547 /* _WKFocusedElementInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _WKFocusedElementInfo.h; sourceTree = "<group>"; };
                                C5FA1ED218E1062200B3F402 /* WKAirPlayRoutePicker.mm */,
                                A58B6F0618FCA733008CBA53 /* WKFileUploadPanel.h */,
                                A58B6F0718FCA733008CBA53 /* WKFileUploadPanel.mm */,
+                               2E16B6CD2017B7AC008996D6 /* WKFocusedFormControlView.h */,
+                               2E16B6CC2017B7AB008996D6 /* WKFocusedFormControlView.mm */,
+                               2E16B6B62017AB9C008996D6 /* WKFocusedFormControlViewController.h */,
+                               2E16B6B72017AB9C008996D6 /* WKFocusedFormControlViewController.mm */,
                                C54256AF18BEC18B00DE4179 /* WKFormInputControl.h */,
                                C54256B018BEC18B00DE4179 /* WKFormInputControl.mm */,
                                C54256B118BEC18B00DE4179 /* WKFormPeripheral.h */,
                                C57193B918C149D0002D0F12 /* WKFormSelectPicker.mm */,
                                0F08CF531D63C14000B48DF1 /* WKFormSelectPopover.h */,
                                C57193BA18C149D0002D0F12 /* WKFormSelectPopover.mm */,
+                               2E16B69F2016E680008996D6 /* WKTextFormControlViewController.h */,
+                               2E16B6A02016E680008996D6 /* WKTextFormControlViewController.mm */,
+                               2E16B6C82017B768008996D6 /* WKTextInputViewController.h */,
+                               2E16B6C92017B768008996D6 /* WKTextInputViewController.mm */,
+                               2E16B6D22017BA37008996D6 /* WKTextSuggestionButton.h */,
+                               2E16B6D32017BA37008996D6 /* WKTextSuggestionButton.mm */,
                        );
                        name = forms;
                        sourceTree = "<group>";
                                BC40783D1250FADD0068F20A /* WKEvent.h in Headers */,
                                A58B6F0818FCA733008CBA53 /* WKFileUploadPanel.h in Headers */,
                                37F623B812A57B6200E3FDF6 /* WKFindOptions.h in Headers */,
+                               2E16B6CF2017B7AD008996D6 /* WKFocusedFormControlView.h in Headers */,
+                               2E16B6B82017AB9C008996D6 /* WKFocusedFormControlViewController.h in Headers */,
                                C54256B518BEC18C00DE4179 /* WKFormInputControl.h in Headers */,
                                C54256B718BEC18C00DE4179 /* WKFormPeripheral.h in Headers */,
                                C54256B818BEC18C00DE4179 /* WKFormPopover.h in Headers */,
                                51F886A61F2C228100C193EF /* WKTestingSupport.h in Headers */,
                                31D755C11D91B81500843BD1 /* WKTextChecker.h in Headers */,
                                2DD67A351BD861060053B251 /* WKTextFinderClient.h in Headers */,
+                               2E16B6A12016E680008996D6 /* WKTextFormControlViewController.h in Headers */,
+                               2E16B6CA2017B768008996D6 /* WKTextInputViewController.h in Headers */,
                                0FCB4E6818BBE3D9000FCFC9 /* WKTextInputWindowController.h in Headers */,
+                               2E16B6D42017BA37008996D6 /* WKTextSuggestionButton.h in Headers */,
                                BC407608124FF0270068F20A /* WKType.h in Headers */,
                                7CD5EBBF1746B04C000C1C45 /* WKTypeRefWrapper.h in Headers */,
                                1AD8790A18B6C38A006CAFD7 /* WKUIDelegate.h in Headers */,
                                BCFD548B132D82680055D816 /* WKErrorCF.cpp in Sources */,
                                BC4075FB124FF0270068F20A /* WKErrorRef.cpp in Sources */,
                                A58B6F0918FCA733008CBA53 /* WKFileUploadPanel.mm in Sources */,
+                               2E16B6CE2017B7AD008996D6 /* WKFocusedFormControlView.mm in Sources */,
+                               2E16B6B92017AB9C008996D6 /* WKFocusedFormControlViewController.mm in Sources */,
                                C54256B618BEC18C00DE4179 /* WKFormInputControl.mm in Sources */,
                                C54256B918BEC18C00DE4179 /* WKFormPopover.mm in Sources */,
                                C57193BE18C14A44002D0F12 /* WKFormSelectControl.mm in Sources */,
                                51F886A51F2C227E00C193EF /* WKTestingSupport.cpp in Sources */,
                                31D755C21D91B81B00843BD1 /* WKTextChecker.cpp in Sources */,
                                2DD67A361BD861060053B251 /* WKTextFinderClient.mm in Sources */,
+                               2E16B6A720171693008996D6 /* WKTextFormControlViewController.mm in Sources */,
+                               2E16B6CB2017B768008996D6 /* WKTextInputViewController.mm in Sources */,
                                0FCB4E6918BBE3D9000FCFC9 /* WKTextInputWindowController.mm in Sources */,
+                               2E16B6D52017BA37008996D6 /* WKTextSuggestionButton.mm in Sources */,
                                BC407607124FF0270068F20A /* WKType.cpp in Sources */,
                                7CD5EBBE1746B04C000C1C45 /* WKTypeRefWrapper.mm in Sources */,
                                BC407609124FF0270068F20A /* WKURL.cpp in Sources */,