<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[225833] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/225833">225833</a></dd>
<dt>Author</dt> <dd>dbates@webkit.org</dd>
<dt>Date</dt> <dd>2017-12-12 18:52:43 -0800 (Tue, 12 Dec 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WK] Add modern WebKit SPI to set auto fill button type and query if the auto fill button is enabled
https://bugs.webkit.org/show_bug.cgi?id=180686

Reviewed by Alex Christensen.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle isHTMLInputElementAutoFillButtonEnabled]):
(toAutoFillButtonType):
(-[WKWebProcessPlugInNodeHandle setHTMLInputElementAutoFillButtonEnabledWithButtonType:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ClickAutoFillButton.mm:
(-[ClickAutoFillButton webProcessPlugIn:didCreateBrowserContextController:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandlemm">trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandleInternalh">trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaClickAutoFillButtonmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ClickAutoFillButton.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandlePrivateh">trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (225832 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2017-12-13 02:49:00 UTC (rev 225832)
+++ trunk/Source/WebKit/ChangeLog       2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2017-12-12  Daniel Bates  <dabates@apple.com>
+
+        [WK] Add modern WebKit SPI to set auto fill button type and query if the auto fill button is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=180686
+
+        Reviewed by Alex Christensen.
+
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
+        (-[WKWebProcessPlugInNodeHandle isHTMLInputElementAutoFillButtonEnabled]):
+        (toAutoFillButtonType):
+        (-[WKWebProcessPlugInNodeHandle setHTMLInputElementAutoFillButtonEnabledWithButtonType:]):
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
+
</ins><span class="cx"> 2017-12-12  John Wilander  <wilander@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Storage Access API: Implement frame-specific access in the network storage session layer
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (225832 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj     2017-12-13 02:49:00 UTC (rev 225832)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -2025,6 +2025,7 @@
</span><span class="cx">          CE1A0BD51A48E6C60054EF74 /* ManagedConfigurationSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */; };
</span><span class="cx">          CE1A0BD61A48E6C60054EF74 /* TCCSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */; };
</span><span class="cx">          CE1A0BD71A48E6C60054EF74 /* TextInputSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */; };
</span><ins>+               CEC8F9CB1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CEC8F9CA1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           CEDA12E2152CD1AE00D9E08D /* WebAlternativeTextClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEDA12DF152CCAE800D9E08D /* WebAlternativeTextClient.cpp */; };
</span><span class="cx">          CEDA12E3152CD1B300D9E08D /* WebAlternativeTextClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CEDA12DE152CCAE800D9E08D /* WebAlternativeTextClient.h */; };
</span><span class="cx">          CEE4AE2B1A5DCF430002F49B /* UIKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CEE4AE2A1A5DCF430002F49B /* UIKitSPI.h */; };
</span><span class="lines">@@ -4487,6 +4488,7 @@
</span><span class="cx">          CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedConfigurationSPI.h; sourceTree = "<group>"; };
</span><span class="cx">          CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCCSPI.h; sourceTree = "<group>"; };
</span><span class="cx">          CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInputSPI.h; sourceTree = "<group>"; };
</span><ins>+               CEC8F9CA1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInNodeHandlePrivate.h; sourceTree = "<group>"; };
</ins><span class="cx">           CEDA12DE152CCAE800D9E08D /* WebAlternativeTextClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAlternativeTextClient.h; sourceTree = "<group>"; };
</span><span class="cx">          CEDA12DF152CCAE800D9E08D /* WebAlternativeTextClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAlternativeTextClient.cpp; sourceTree = "<group>"; };
</span><span class="cx">          CEE4AE2A1A5DCF430002F49B /* UIKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIKitSPI.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5498,6 +5500,7 @@
</span><span class="cx">                          1F01816F1858DC1600F92884 /* WKWebProcessPlugInNodeHandle.h */,
</span><span class="cx">                          1F0181701858DC1600F92884 /* WKWebProcessPlugInNodeHandle.mm */,
</span><span class="cx">                          1F0181711858DC1600F92884 /* WKWebProcessPlugInNodeHandleInternal.h */,
</span><ins>+                               CEC8F9CA1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h */,
</ins><span class="cx">                           1FB00AC4185F76460019142E /* WKWebProcessPlugInPageGroup.h */,
</span><span class="cx">                          1FB00AC5185F76460019142E /* WKWebProcessPlugInPageGroup.mm */,
</span><span class="cx">                          1FB00AC6185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h */,
</span><span class="lines">@@ -9509,6 +9512,7 @@
</span><span class="cx">                          1F335BC0185B84F0001A201A /* WKWebProcessPlugInLoadDelegate.h in Headers */,
</span><span class="cx">                          1F7506B31859164500EC0FF7 /* WKWebProcessPlugInNodeHandle.h in Headers */,
</span><span class="cx">                          1F7506B61859165700EC0FF7 /* WKWebProcessPlugInNodeHandleInternal.h in Headers */,
</span><ins>+                               CEC8F9CB1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h in Headers */,
</ins><span class="cx">                           1FB00AC7185F76460019142E /* WKWebProcessPlugInPageGroup.h in Headers */,
</span><span class="cx">                          1FB00AC9185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h in Headers */,
</span><span class="cx">                          BC04EFFC16E65AFB00E336F0 /* WKWebProcessPlugInPrivate.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandlemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm (225832 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm  2017-12-13 02:49:00 UTC (rev 225832)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm     2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import "WKSharedAPICast.h"
</span><span class="cx"> #import "WKWebProcessPlugInFrameInternal.h"
</span><ins>+#import <WebCore/HTMLTextFormControlElement.h>
</ins><span class="cx"> #import <WebCore/IntRect.h>
</span><span class="cx"> #import <WebKit/WebImage.h>
</span><span class="cx"> 
</span><span class="lines">@@ -120,6 +121,30 @@
</span><span class="cx">     _nodeHandle->setHTMLInputElementAutoFilled(isAutoFilled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)isHTMLInputElementAutoFillButtonEnabled
+{
+    return _nodeHandle->isHTMLInputElementAutoFillButtonEnabled();
+}
+
+static WebCore::AutoFillButtonType toAutoFillButtonType(_WKAutoFillButtonType autoFillButtonType)
+{
+    switch (autoFillButtonType) {
+    case _WKAutoFillButtonTypeNone:
+        return WebCore::AutoFillButtonType::None;
+    case _WKAutoFillButtonTypeContacts:
+        return WebCore::AutoFillButtonType::Contacts;
+    case _WKAutoFillButtonTypeCredentials:
+        return WebCore::AutoFillButtonType::Credentials;
+    }
+    ASSERT_NOT_REACHED();
+    return WebCore::AutoFillButtonType::None;
+}
+
+- (void)setHTMLInputElementAutoFillButtonEnabledWithButtonType:(_WKAutoFillButtonType)autoFillButtonType
+{
+    _nodeHandle->setHTMLInputElementAutoFillButtonEnabled(toAutoFillButtonType(autoFillButtonType));
+}
+
</ins><span class="cx"> - (BOOL)HTMLInputElementIsUserEdited
</span><span class="cx"> {
</span><span class="cx">     return _nodeHandle->htmlInputElementLastChangeWasUserEdit();
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandleInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h (225832 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h   2017-12-13 02:49:00 UTC (rev 225832)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h      2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#import "WKWebProcessPlugInNodeHandle.h"
</del><ins>+#import "WKWebProcessPlugInNodeHandlePrivate.h"
</ins><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandlePrivatehfromrev225831trunkSourceWebKitWebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandleInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h (from rev 225831, trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h) (0 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h                            (rev 0)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h       2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2017 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 "WKWebProcessPlugInNodeHandle.h"
+
+#if WK_API_ENABLED
+
+typedef NS_ENUM(NSInteger, _WKAutoFillButtonType) {
+    _WKAutoFillButtonTypeNone,
+    _WKAutoFillButtonTypeCredentials,
+    _WKAutoFillButtonTypeContacts,
+} WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
+@interface WKWebProcessPlugInNodeHandle (WKPrivate)
+
+- (BOOL)isHTMLInputElementAutoFillButtonEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (void)setHTMLInputElementAutoFillButtonEnabledWithButtonType:(_WKAutoFillButtonType)autoFillButtonType WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
+@end
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (225832 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2017-12-13 02:49:00 UTC (rev 225832)
+++ trunk/Tools/ChangeLog       2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-12-12  Daniel Bates  <dabates@apple.com>
+
+        [WK] Add modern WebKit SPI to set auto fill button type and query if the auto fill button is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=180686
+
+        Reviewed by Alex Christensen.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/ClickAutoFillButton.mm:
+        (-[ClickAutoFillButton webProcessPlugIn:didCreateBrowserContextController:]):
+
</ins><span class="cx"> 2017-12-12  Alex Christensen  <achristensen@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Fix possible out-of-bounds read in protocolIsInHTTPFamily
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaClickAutoFillButtonmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ClickAutoFillButton.mm (225832 => 225833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ClickAutoFillButton.mm       2017-12-13 02:49:00 UTC (rev 225832)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ClickAutoFillButton.mm  2017-12-13 02:52:43 UTC (rev 225833)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><del>-#import <WebKit/WKBundleNodeHandlePrivate.h>
</del><span class="cx"> #import <WebKit/WKBundlePage.h>
</span><span class="cx"> #import <WebKit/WKBundlePageUIClient.h>
</span><span class="cx"> #import <WebKit/WKDOMDocument.h>
</span><span class="lines">@@ -38,6 +37,7 @@
</span><span class="cx"> #import <WebKit/WKWebProcessPlugIn.h>
</span><span class="cx"> #import <WebKit/WKWebProcessPlugInBrowserContextControllerPrivate.h>
</span><span class="cx"> #import <WebKit/WKWebProcessPlugInFrame.h>
</span><ins>+#import <WebKit/WKWebProcessPlugInNodeHandlePrivate.h>
</ins><span class="cx"> #import <WebKit/WKWebProcessPlugInScriptWorld.h>
</span><span class="cx"> 
</span><span class="cx"> void didClickAutoFillButton(WKBundlePageRef, WKBundleNodeHandleRef, WKTypeRef* userData, const void *)
</span><span class="lines">@@ -61,9 +61,12 @@
</span><span class="cx">     WKDOMDocument *document = [browserContextController mainFrameDocument];
</span><span class="cx">     WKDOMElement *inputElement = [document createElement:@"input"];
</span><span class="cx">     [[document body] appendChild:inputElement];
</span><del>-    WKBundleNodeHandleRef node = [inputElement _copyBundleNodeHandleRef];
-    WKBundleNodeHandleSetHTMLInputElementAutofilled(node, true);
-    WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabledWithButtonType(node, kWKAutoFillButtonTypeContacts);
</del><ins>+
+    auto *jsContext = [[browserContextController mainFrame] jsContextForWorld:[WKWebProcessPlugInScriptWorld normalWorld]];
+    auto *jsValue = [jsContext evaluateScript:@"document.querySelector('input')"];
+    auto* nodeHandle = [WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:jsValue inContext:jsContext];
+    [nodeHandle setHTMLInputElementIsAutoFilled:YES];
+    [nodeHandle setHTMLInputElementAutoFillButtonEnabledWithButtonType:_WKAutoFillButtonTypeContacts];
</ins><span class="cx">     [[[browserContextController mainFrame] jsContextForWorld:[WKWebProcessPlugInScriptWorld normalWorld]] evaluateScript:@"alert('ready for click!')"];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>