<!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>[181408] 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/181408">181408</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2015-03-11 15:01:01 -0700 (Wed, 11 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Allow adding a button in input elements for auto fill related functionality
&lt;rdar://problem/19782066&gt;
https://bugs.webkit.org/show_bug.cgi?id=142564

Reviewed by Anders Carlsson.

Source/WebCore:

Test: fast/forms/input-auto-fill-button.html

- Adds a new button that can be shown in &lt;input&gt; elements - AutoFillButtonElement.
- Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
  where not feasible due to exported API/SPI).

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* css/html.css:
(input::-webkit-auto-fill-button):
(input::-webkit-auto-fill-button:hover):
(input::-webkit-auto-fill-button:active):
Add default style rules for the AutoFill button based on the ones
used for caps lock indicator.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::autoFillButtonElement):
(WebCore::HTMLInputElement::reset):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::setAutoFilled):
(WebCore::HTMLInputElement::setShowAutoFillButton):
(WebCore::HTMLInputElement::setAutofilled): Deleted.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::isAutoFilled):
(WebCore::HTMLInputElement::showAutoFillButton):
(WebCore::HTMLInputElement::isAutofilled): Deleted.
Add new bit to represent whether the AutoFill button should be shown
or not. By default it is not shown, and the client must enable it.

* html/InputType.cpp:
(WebCore::InputType::updateAutoFillButton):
* html/InputType.h:
(WebCore::InputType::autoFillButtonElement):
Add new virtual methods for updating and accessing the AutoFill button.

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::autoFillButtonElement):
(WebCore::TextFieldInputType::destroyShadowSubtree):
(WebCore::TextFieldInputType::updatePlaceholderText):
(WebCore::TextFieldInputType::shouldDrawAutoFillButton):
(WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
(WebCore::TextFieldInputType::createContainer):
(WebCore::TextFieldInputType::createAutoFillButton):
(WebCore::TextFieldInputType::updateAutoFillButton):
* html/TextFieldInputType.h:
Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
is slightly different than for the caps lock indicator, because I didn't want to force
the creation of a container for all &lt;input&gt; elements just in case an AutoFill button was
added. Instead, if an AutoFill button is added, the container is created on the fly and
the existing DOM is updated to move into it. Once a container is created, it is never
removed.

* html/shadow/AutoFillButtonElement.cpp: Added.
(WebCore::AutoFillButtonElement::create):
(WebCore::AutoFillButtonElement::AutoFillButtonElement):
(WebCore::AutoFillButtonElement::defaultEventHandler):
* html/shadow/AutoFillButtonElement.h: Added.
Add div subclass that swallows the click event and forwards it to the ChromeClient.

* page/ChromeClient.h:
Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
button was clicked.

* testing/Internals.cpp:
(WebCore::Internals::setAutofilled):
(WebCore::Internals::setShowAutoFillButton):
* testing/Internals.h:
* testing/Internals.idl:
Expose a new internals.setShowAutoFillButton() function to allow testing
of the AutoFill button from layout tests.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isValueAutofilled):
* css/SelectorCheckerTestFunctions.h:
(WebCore::isAutofilled):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
Update for new spelling of AutoFill.

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(-[DOMHTMLInputElement _setAutofilled:]):
Update for consistent spelling of AutoFill.

Source/WebKit2:

- Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
- Adds new SPI to enable/disable the display of the AutoFill button on an element.
- Adds new SPI to get the bounds of the AutoFill button.
- Updates spelling of AutoFill to be consistent.

* UIProcess/API/APIUIClient.h:
(API::UIClient::didClickAutoFillButton):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleAutoFillButtonClick):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didClickAutoFillButton):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleAutoFillButtonClick):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
Pipe the didClickAutoFillButton to the SPI layer.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
(-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
Update for new spelling of AutoFill.

* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleGetHTMLInputElementAutoFilled):
(WKBundleNodeHandleSetHTMLInputElementAutoFilled):
Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
which are now deprecated due to inconsistent spelling of AutoFill.

(WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
(WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
(WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
Added.

(WKBundleNodeHandleGetHTMLInputElementAutofilled):
(WKBundleNodeHandleSetHTMLInputElementAutofilled):
Deprecated.

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
(WebKit::InjectedBundleNodeHandle::create):
(WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
(WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
(WebKit::InjectedBundleNodeHandle::coreNode):
(WebKit::InjectedBundleNodeHandle::document):
(WebKit::InjectedBundleNodeHandle::elementBounds):
(WebKit::InjectedBundleNodeHandle::renderRect):
(WebKit::InjectedBundleNodeHandle::renderedImage):
(WebKit::InjectedBundleNodeHandle::visibleRange):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
(WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
(WebKit::InjectedBundleNodeHandle::documentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
Add helpers to implement the new SPI for WKBundleNodeHandleRef.

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
Update for new callback.

LayoutTests:

* fast/forms/input-auto-fill-button-expected.txt: Added.
* fast/forms/input-auto-fill-button.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsobjcDOMHTMLmm">trunk/Source/WebCore/bindings/objc/DOMHTML.mm</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckerTestFunctionsh">trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecsshtmlcss">trunk/Source/WebCore/css/html.css</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlInputTypecpp">trunk/Source/WebCore/html/InputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlInputTypeh">trunk/Source/WebCore/html/InputType.h</a></li>
<li><a href="#trunkSourceWebCorehtmlTextFieldInputTypecpp">trunk/Source/WebCore/html/TextFieldInputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlTextFieldInputTypeh">trunk/Source/WebCore/html/TextFieldInputType.h</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacDOMWebDOMOperationsmm">trunk/Source/WebKit/mac/DOM/WebDOMOperations.mm</a></li>
<li><a href="#trunkSourceWebKitwinDOMHTMLClassescpp">trunk/Source/WebKit/win/DOMHTMLClasses.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIUIClienth">trunk/Source/WebKit2/UIProcess/API/APIUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageUIClienth">trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIAPIInjectedBundlePageUIClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandlemm">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundleNodeHandlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundleNodeHandlePrivateh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageUIClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleDOMInjectedBundleNodeHandlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleDOMInjectedBundleNodeHandleh">trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageUIClientcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageUIClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformsinputautofillbuttonexpectedtxt">trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsinputautofillbuttonhtml">trunk/LayoutTests/fast/forms/input-auto-fill-button.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacmavericksfastformsinputautofillbuttontxt">trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button.txt</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowAutoFillButtonElementcpp">trunk/Source/WebCore/html/shadow/AutoFillButtonElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowAutoFillButtonElementh">trunk/Source/WebCore/html/shadow/AutoFillButtonElement.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/LayoutTests/ChangeLog        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-03-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Allow adding a button in input elements for auto fill related functionality
+        &lt;rdar://problem/19782066&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=142564
+
+        Reviewed by Anders Carlsson.
+
+        * fast/forms/input-auto-fill-button-expected.txt: Added.
+        * fast/forms/input-auto-fill-button.html: Added.
+
</ins><span class="cx"> 2015-03-11  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Calling super() in a base class results in a crash
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsinputautofillbuttonexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt (0 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 503x18
+          text run at (0,0) width 503: &quot;This tests that the AutoFill button renders. It can only be tested in the test tool.&quot;
+      RenderBlock {DIV} at (0,34) size 784x23
+        RenderTextControl {INPUT} at (2,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 131x13
+            RenderBlock {DIV} at (0,0) size 115x13
+        RenderText {#text} at (140,2) size 5x18
+          text run at (140,2) width 5: &quot; &quot;
+        RenderTextControl {INPUT} at (146,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 131x13
+            RenderBlock {DIV} at (0,0) size 115x13
+        RenderText {#text} at (284,2) size 5x18
+          text run at (284,2) width 5: &quot; &quot;
+        RenderTextControl {INPUT} at (290,2) size 138x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 131x13
+            RenderBlock {DIV} at (0,0) size 115x13
+        RenderTextControl {INPUT} at (431,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 131x13
+            RenderBlock {DIV} at (0,0) size 115x13
+layer at (13,47) size 114x13
+  RenderBlock {DIV} at (0,0) size 115x13
+layer at (157,47) size 114x13
+  RenderBlock {DIV} at (0,0) size 115x13
+layer at (302,47) size 114x13
+  RenderBlock {DIV} at (0,0) size 115x13
+layer at (442,47) size 114x13
+  RenderBlock {DIV} at (0,0) size 115x13
+layer at (127,47) size 16x13
+  RenderImage {DIV} at (114,0) size 17x13
+layer at (272,47) size 16x13
+  RenderImage {DIV} at (114,0) size 17x13
+layer at (416,47) size 16x13
+  RenderImage {DIV} at (114,0) size 17x13
+layer at (556,47) size 16x13
+  RenderImage {DIV} at (114,0) size 17x13
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsinputautofillbuttonhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/input-auto-fill-button.html (0 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-auto-fill-button.html                                (rev 0)
+++ trunk/LayoutTests/fast/forms/input-auto-fill-button.html        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;p&gt;This tests that the AutoFill button renders. It can only be tested in the test tool.&lt;/p&gt;
+&lt;div id='container'&gt;
+    &lt;input type='text'&gt;
+    &lt;input type='password'&gt;
+&lt;/div&gt;
+&lt;script&gt;
+
+if (window.internals) {
+    var inputs = document.querySelectorAll(&quot;input&quot;);
+    for (var i = 0; i &lt; inputs.length; ++i)
+        window.internals.setShowAutoFillButton(inputs[i], true);
+
+    var dynamicInput = document.createElement(&quot;input&quot;);
+    window.internals.setShowAutoFillButton(dynamicInput, true);
+    document.querySelector(&quot;#container&quot;).appendChild(dynamicInput);
+
+    var dynamicInput2 = document.createElement(&quot;input&quot;);
+    window.internals.setShowAutoFillButton(dynamicInput2, true);
+    document.querySelector(&quot;#container&quot;).appendChild(dynamicInput2);
+    dynamicInput2.setAttribute(&quot;type&quot;, &quot;password&quot;);
+}
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacmavericksfastformsinputautofillbuttontxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button.txt (0 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button.txt        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 503x18
+          text run at (0,0) width 503: &quot;This tests that the AutoFill button renders. It can only be tested in the test tool.&quot;
+      RenderBlock {DIV} at (0,34) size 784x23
+        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 140x13
+            RenderBlock {DIV} at (0,0) size 124x13
+        RenderText {#text} at (149,2) size 5x18
+          text run at (149,2) width 5: &quot; &quot;
+        RenderTextControl {INPUT} at (155,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 140x13
+            RenderBlock {DIV} at (0,0) size 124x13
+        RenderText {#text} at (302,2) size 5x18
+          text run at (302,2) width 5: &quot; &quot;
+        RenderTextControl {INPUT} at (308,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 140x13
+            RenderBlock {DIV} at (0,0) size 124x13
+        RenderTextControl {INPUT} at (457,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderFlexibleBox {DIV} at (3,3) size 140x13
+            RenderBlock {DIV} at (0,0) size 124x13
+layer at (13,47) size 123x13
+  RenderBlock {DIV} at (0,0) size 124x13
+layer at (166,47) size 123x13
+  RenderBlock {DIV} at (0,0) size 124x13
+layer at (319,47) size 123x13
+  RenderBlock {DIV} at (0,0) size 124x13
+layer at (468,47) size 123x13
+  RenderBlock {DIV} at (0,0) size 124x13
+layer at (136,47) size 16x13
+  RenderImage {DIV} at (123,0) size 17x13
+layer at (289,47) size 16x13
+  RenderImage {DIV} at (123,0) size 17x13
+layer at (442,47) size 16x13
+  RenderImage {DIV} at (123,0) size 17x13
+layer at (592,47) size 16x13
+  RenderImage {DIV} at (123,0) size 17x13
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1746,6 +1746,7 @@
</span><span class="cx">     html/parser/XSSAuditor.cpp
</span><span class="cx">     html/parser/XSSAuditorDelegate.cpp
</span><span class="cx"> 
</span><ins>+    html/shadow/AutoFillButtonElement.cpp
</ins><span class="cx">     html/shadow/ContentDistributor.cpp
</span><span class="cx">     html/shadow/DetailsMarkerControl.cpp
</span><span class="cx">     html/shadow/InsertionPoint.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/ChangeLog        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1,3 +1,96 @@
</span><ins>+2015-03-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Allow adding a button in input elements for auto fill related functionality
+        &lt;rdar://problem/19782066&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=142564
+
+        Reviewed by Anders Carlsson.
+
+        Test: fast/forms/input-auto-fill-button.html
+
+        - Adds a new button that can be shown in &lt;input&gt; elements - AutoFillButtonElement.
+        - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
+          where not feasible due to exported API/SPI).
+
+        * CMakeLists.txt:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        Add new files.
+
+        * css/html.css:
+        (input::-webkit-auto-fill-button):
+        (input::-webkit-auto-fill-button:hover):
+        (input::-webkit-auto-fill-button:active):
+        Add default style rules for the AutoFill button based on the ones
+        used for caps lock indicator.
+
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::HTMLInputElement):
+        (WebCore::HTMLInputElement::autoFillButtonElement):
+        (WebCore::HTMLInputElement::reset):
+        (WebCore::HTMLInputElement::setValueFromRenderer):
+        (WebCore::HTMLInputElement::setAutoFilled):
+        (WebCore::HTMLInputElement::setShowAutoFillButton):
+        (WebCore::HTMLInputElement::setAutofilled): Deleted.
+        * html/HTMLInputElement.h:
+        (WebCore::HTMLInputElement::isAutoFilled):
+        (WebCore::HTMLInputElement::showAutoFillButton):
+        (WebCore::HTMLInputElement::isAutofilled): Deleted.
+        Add new bit to represent whether the AutoFill button should be shown
+        or not. By default it is not shown, and the client must enable it.
+
+        * html/InputType.cpp:
+        (WebCore::InputType::updateAutoFillButton):
+        * html/InputType.h:
+        (WebCore::InputType::autoFillButtonElement):
+        Add new virtual methods for updating and accessing the AutoFill button.
+
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::createShadowSubtree):
+        (WebCore::TextFieldInputType::autoFillButtonElement):
+        (WebCore::TextFieldInputType::destroyShadowSubtree):
+        (WebCore::TextFieldInputType::updatePlaceholderText):
+        (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
+        (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
+        (WebCore::TextFieldInputType::createContainer):
+        (WebCore::TextFieldInputType::createAutoFillButton):
+        (WebCore::TextFieldInputType::updateAutoFillButton):
+        * html/TextFieldInputType.h:
+        Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
+        is slightly different than for the caps lock indicator, because I didn't want to force
+        the creation of a container for all &lt;input&gt; elements just in case an AutoFill button was
+        added. Instead, if an AutoFill button is added, the container is created on the fly and
+        the existing DOM is updated to move into it. Once a container is created, it is never
+        removed.
+
+        * html/shadow/AutoFillButtonElement.cpp: Added.
+        (WebCore::AutoFillButtonElement::create):
+        (WebCore::AutoFillButtonElement::AutoFillButtonElement):
+        (WebCore::AutoFillButtonElement::defaultEventHandler):
+        * html/shadow/AutoFillButtonElement.h: Added.
+        Add div subclass that swallows the click event and forwards it to the ChromeClient.
+
+        * page/ChromeClient.h:
+        Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
+        button was clicked.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::setAutofilled):
+        (WebCore::Internals::setShowAutoFillButton):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+        Expose a new internals.setShowAutoFillButton() function to allow testing
+        of the AutoFill button from layout tests.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isValueAutofilled):
+        * css/SelectorCheckerTestFunctions.h:
+        (WebCore::isAutofilled):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::canShareStyleWithControl):
+        Update for new spelling of AutoFill.
+
</ins><span class="cx"> 2015-03-11  Geoffrey Garen  &lt;ggaren@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -16208,6 +16208,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\parser\TextDocumentParser.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\parser\XSSAuditor.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\parser\XSSAuditorDelegate.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\shadow\AutoFillButtonElement.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\shadow\ContentDistributor.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\shadow\DetailsMarkerControl.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\shadow\InsertionPoint.cpp&quot; /&gt;
</span><span class="lines">@@ -20970,6 +20971,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\parser\TextDocumentParser.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\parser\XSSAuditor.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\parser\XSSAuditorDelegate.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\shadow\AutoFillButtonElement.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\shadow\ContentDistributor.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\shadow\DetailsMarkerControl.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\shadow\InsertionPoint.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -4110,6 +4110,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\parser\XSSAuditorDelegate.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\parser&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\shadow\AutoFillButtonElement.cpp&quot;&gt;
+      &lt;Filter&gt;html\shadow&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\shadow\ContentDistributor.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\shadow&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -11274,6 +11277,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\parser\XSSAuditorDelegate.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\parser&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\shadow\AutoFillButtonElement.h&quot;&gt;
+      &lt;Filter&gt;html\shadow&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\shadow\ContentDistributor.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\shadow&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -2473,6 +2473,8 @@
</span><span class="cx">                 7AF9B20E18CFB5F400C64BEF /* JSVTTRegionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9B20A18CFB5F300C64BEF /* JSVTTRegionList.cpp */; };
</span><span class="cx">                 7AF9B20F18CFB5F400C64BEF /* JSVTTRegionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */; };
</span><span class="cx">                 7BE7427381FA906FBB4F0F2C /* JSSVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 950C4C02BED8936F818E2F99 /* JSSVGGraphicsElement.h */; };
</span><ins>+                7C1E97271A9F9834007BF0FB /* AutoFillButtonElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */; };
+                7C1E97281A9F9834007BF0FB /* AutoFillButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */; };
</ins><span class="cx">                 7C2BDD3D17C7F98C0038FF15 /* JSDOMGlobalObjectTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */; };
</span><span class="cx">                 7C2BDD3E17C7F98C0038FF15 /* JSDOMGlobalObjectTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */; };
</span><span class="cx">                 7C3B79711908757B00B47A2D /* UserMessageHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */; };
</span><span class="lines">@@ -9693,6 +9695,8 @@
</span><span class="cx">                 7AF9B20918CFB5F200C64BEF /* JSVTTRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegion.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7AF9B20A18CFB5F300C64BEF /* JSVTTRegionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVTTRegionList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegionList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AutoFillButtonElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoFillButtonElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMGlobalObjectTask.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObjectTask.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessageHandler.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15684,6 +15688,8 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 51C4AA5118B28357007BFE9B /* mac */,
</span><ins>+                                7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */,
+                                7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */,
</ins><span class="cx">                                 57B7919F14C6A62900F202D1 /* ContentDistributor.cpp */,
</span><span class="cx">                                 57B791A014C6A62900F202D1 /* ContentDistributor.h */,
</span><span class="cx">                                 A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */,
</span><span class="lines">@@ -26190,6 +26196,7 @@
</span><span class="cx">                                 931CBD0D161A44E900E4C874 /* ScrollingStateNode.h in Headers */,
</span><span class="cx">                                 0FEA3E84191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h in Headers */,
</span><span class="cx">                                 931CBD0F161A44E900E4C874 /* ScrollingStateScrollingNode.h in Headers */,
</span><ins>+                                7C1E97281A9F9834007BF0FB /* AutoFillButtonElement.h in Headers */,
</ins><span class="cx">                                 0FB8890F167D30160010CDA5 /* ScrollingStateStickyNode.h in Headers */,
</span><span class="cx">                                 931CBD11161A44E900E4C874 /* ScrollingStateTree.h in Headers */,
</span><span class="cx">                                 1AF62F2614DAFEA10041556C /* ScrollingThread.h in Headers */,
</span><span class="lines">@@ -27800,6 +27807,7 @@
</span><span class="cx">                                 85BA4D0C0AA688680088052D /* DOMHTMLDirectoryElement.mm in Sources */,
</span><span class="cx">                                 85BA4D0E0AA688680088052D /* DOMHTMLDivElement.mm in Sources */,
</span><span class="cx">                                 85BA4D100AA688680088052D /* DOMHTMLDListElement.mm in Sources */,
</span><ins>+                                7C1E97271A9F9834007BF0FB /* AutoFillButtonElement.cpp in Sources */,
</ins><span class="cx">                                 85BCBC140ABBA87D00381160 /* DOMHTMLDocument.mm in Sources */,
</span><span class="cx">                                 85DF2EEE0AA387CB00AD64C5 /* DOMHTMLElement.mm in Sources */,
</span><span class="cx">                                 85C050BB0AD84F5E005532E7 /* DOMHTMLEmbedElement.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -2028,7 +2028,7 @@
</span><span class="cx">     if (!node || !is&lt;HTMLInputElement&gt;(*node))
</span><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    return downcast&lt;HTMLInputElement&gt;(*node).isAutofilled();
</del><ins>+    return downcast&lt;HTMLInputElement&gt;(*node).isAutoFilled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const AtomicString&amp; AccessibilityObject::placeholderValue() const
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsobjcDOMHTMLmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/objc/DOMHTML.mm (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/objc/DOMHTML.mm        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/bindings/objc/DOMHTML.mm        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> - (BOOL)_isAutofilled
</span><span class="cx"> {
</span><del>-    return core(self)-&gt;isAutofilled();
</del><ins>+    return core(self)-&gt;isAutoFilled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAutofilled:(BOOL)filled
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx">     // This notifies the input element that the content has been autofilled
</span><span class="cx">     // This allows WebKit to obey the -webkit-autofill pseudo style, which
</span><span class="cx">     // changes the background color.
</span><del>-    core(self)-&gt;setAutofilled(filled);
</del><ins>+    core(self)-&gt;setAutoFilled(filled);
</ins><span class="cx"> }
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckerTestFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (is&lt;HTMLFormControlElement&gt;(*element)) {
</span><span class="cx">         if (const HTMLInputElement* inputElement = element-&gt;toInputElement())
</span><del>-            return inputElement-&gt;isAutofilled();
</del><ins>+            return inputElement-&gt;isAutoFilled();
</ins><span class="cx">     }
</span><span class="cx">     return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">     if (!thisInputElement || !otherInputElement)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (thisInputElement-&gt;isAutofilled() != otherInputElement-&gt;isAutofilled())
</del><ins>+    if (thisInputElement-&gt;isAutoFilled() != otherInputElement-&gt;isAutoFilled())
</ins><span class="cx">         return false;
</span><span class="cx">     if (thisInputElement-&gt;shouldAppearChecked() != otherInputElement-&gt;shouldAppearChecked())
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCorecsshtmlcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/html.css (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/html.css        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/css/html.css        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -544,6 +544,22 @@
</span><span class="cx">     -webkit-user-select: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+input::-webkit-auto-fill-button {
+    content: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;16&quot; height=&quot;16&quot;&gt;&lt;path fill=&quot;black&quot; d=&quot;M12,0H4C1.8,0,0,1.8,0,4v8c0,2.2,1.8,4,4,4h8c2.2,0,4-1.8,4-4V4C16,1.8,14.2,0,12,0z M9.6,7.1l0,1.2l-1,1L9.4,10l-0.7,0.7 l0.7,0.7l-0.7,0.7l0.7,0.7l-1.2,1.2c-0.2,0.2-0.3,0.2-0.5,0l-1-1l0-6C5.7,6.6,5.1,5.6,5.1,4.5c0-1.6,1.3-3,3-3c1.7,0,3,1.3,3,3 C11.1,5.6,10.5,6.6,9.6,7.1z&quot;/&gt;&lt;circle fill=&quot;black&quot; cx=&quot;8.1&quot; cy=&quot;3.6&quot; r=&quot;1&quot;/&gt;&lt;/svg&gt;');
+    align-self:stretch;
+    opacity: .4;
+    -webkit-flex: none;
+    -webkit-user-select: none;
+}
+
+input::-webkit-auto-fill-button:hover {
+    opacity: .85;
+}
+
+input::-webkit-auto-fill-button:active {
+    opacity: 1;
+}
+
</ins><span class="cx"> input::-webkit-caps-lock-indicator {
</span><span class="cx">     -webkit-appearance: caps-lock-indicator;
</span><span class="cx">     content: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;path fill=&quot;black&quot; fill-opacity=&quot;0.4&quot; d=&quot;M12.5 0.5A 4 4 0 0 1 16.5 4.5L 16.5 12.5A 4 4 0 0 1 12.5 16.5L 4.5 16.5A 4 4 0 0 1 0.5 12.5L 0.5 4.5A 4 4 0 0 1 4.5 0.5L 12.5 0.5M 8.5 2L 4 7L 6.25 7L 6.25 10.25L 10.75 10.25L 10.75 7L 13 7L 8.5 2M 10.75 12L 6.25 12L 6.25 14.25L 10.75 14.25L 10.75 12&quot;/&gt;&lt;/svg&gt;');
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -109,7 +109,8 @@
</span><span class="cx">     , m_hasType(false)
</span><span class="cx">     , m_isActivatedSubmit(false)
</span><span class="cx">     , m_autocomplete(Uninitialized)
</span><del>-    , m_isAutofilled(false)
</del><ins>+    , m_isAutoFilled(false)
+    , m_showAutoFillButton(false)
</ins><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span><span class="cx">     , m_hasNonEmptyList(false)
</span><span class="cx"> #endif
</span><span class="lines">@@ -204,6 +205,11 @@
</span><span class="cx">     return m_inputType-&gt;capsLockIndicatorElement();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+HTMLElement* HTMLInputElement::autoFillButtonElement() const
+{
+    return m_inputType-&gt;autoFillButtonElement();
+}
+
</ins><span class="cx"> HTMLElement* HTMLInputElement::resultsButtonElement() const
</span><span class="cx"> {
</span><span class="cx">     return m_inputType-&gt;resultsButtonElement();
</span><span class="lines">@@ -835,7 +841,7 @@
</span><span class="cx">     if (m_inputType-&gt;storesValueSeparateFromAttribute())
</span><span class="cx">         setValue(String());
</span><span class="cx"> 
</span><del>-    setAutofilled(false);
</del><ins>+    setAutoFilled(false);
</ins><span class="cx">     setChecked(fastHasAttribute(checkedAttr));
</span><span class="cx">     m_reflectsCheckedAttribute = true;
</span><span class="cx"> }
</span><span class="lines">@@ -1056,8 +1062,8 @@
</span><span class="cx"> 
</span><span class="cx">     updateValidity();
</span><span class="cx"> 
</span><del>-    // Clear autofill flag (and yellow background) on user edit.
-    setAutofilled(false);
</del><ins>+    // Clear auto fill flag (and yellow background) on user edit.
+    setAutoFilled(false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLInputElement::willDispatchEvent(Event&amp; event, InputElementClickState&amp; state)
</span><span class="lines">@@ -1289,15 +1295,24 @@
</span><span class="cx">     return document().completeURL(fastGetAttribute(srcAttr));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLInputElement::setAutofilled(bool autofilled)
</del><ins>+void HTMLInputElement::setAutoFilled(bool autoFilled)
</ins><span class="cx"> {
</span><del>-    if (autofilled == m_isAutofilled)
</del><ins>+    if (autoFilled == m_isAutoFilled)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_isAutofilled = autofilled;
</del><ins>+    m_isAutoFilled = autoFilled;
</ins><span class="cx">     setNeedsStyleRecalc();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLInputElement::setShowAutoFillButton(bool showAutoFillButton)
+{
+    if (showAutoFillButton == m_showAutoFillButton)
+        return;
+
+    m_showAutoFillButton = showAutoFillButton;
+    m_inputType-&gt;updateAutoFillButton();
+}
+
</ins><span class="cx"> FileList* HTMLInputElement::files()
</span><span class="cx"> {
</span><span class="cx">     return m_inputType-&gt;files();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -151,6 +151,7 @@
</span><span class="cx">     HTMLElement* sliderThumbElement() const;
</span><span class="cx">     HTMLElement* sliderTrackElement() const;
</span><span class="cx">     virtual HTMLElement* placeholderElement() const override final;
</span><ins>+    WEBCORE_EXPORT HTMLElement* autoFillButtonElement() const;
</ins><span class="cx"> 
</span><span class="cx">     bool checked() const { return m_isChecked; }
</span><span class="cx">     void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent);
</span><span class="lines">@@ -235,9 +236,12 @@
</span><span class="cx"> 
</span><span class="cx">     bool multiple() const;
</span><span class="cx"> 
</span><del>-    bool isAutofilled() const { return m_isAutofilled; }
-    WEBCORE_EXPORT void setAutofilled(bool = true);
</del><ins>+    bool isAutoFilled() const { return m_isAutoFilled; }
+    WEBCORE_EXPORT void setAutoFilled(bool = true);
</ins><span class="cx"> 
</span><ins>+    bool showAutoFillButton() const { return m_showAutoFillButton; }
+    WEBCORE_EXPORT void setShowAutoFillButton(bool);
+
</ins><span class="cx">     FileList* files();
</span><span class="cx">     void setFiles(PassRefPtr&lt;FileList&gt;);
</span><span class="cx"> 
</span><span class="lines">@@ -428,7 +432,8 @@
</span><span class="cx">     bool m_hasType : 1;
</span><span class="cx">     bool m_isActivatedSubmit : 1;
</span><span class="cx">     unsigned m_autocomplete : 2; // AutoCompleteSetting
</span><del>-    bool m_isAutofilled : 1;
</del><ins>+    bool m_isAutoFilled : 1;
+    bool m_showAutoFillButton : 1;
</ins><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span><span class="cx">     bool m_hasNonEmptyList : 1;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/InputType.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/InputType.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/html/InputType.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -489,10 +489,6 @@
</span><span class="cx">     element().defaultBlur();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InputType::capsLockStateMayHaveChanged()
-{
-}
-
</del><span class="cx"> void InputType::createShadowSubtree()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -928,6 +924,14 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InputType::capsLockStateMayHaveChanged()
+{
+}
+
+void InputType::updateAutoFillButton()
+{
+}
+
</ins><span class="cx"> void InputType::subtreeHasChanged()
</span><span class="cx"> {
</span><span class="cx">     ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlInputTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/InputType.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/InputType.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/html/InputType.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -215,8 +215,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void blur();
</span><span class="cx"> 
</span><del>-    virtual void capsLockStateMayHaveChanged();
-
</del><span class="cx">     // Shadow tree handling
</span><span class="cx"> 
</span><span class="cx">     virtual void createShadowSubtree();
</span><span class="lines">@@ -227,6 +225,7 @@
</span><span class="cx">     virtual TextControlInnerTextElement* innerTextElement() const { return nullptr; }
</span><span class="cx">     virtual HTMLElement* innerSpinButtonElement() const { return nullptr; }
</span><span class="cx">     virtual HTMLElement* capsLockIndicatorElement() const { return nullptr; }
</span><ins>+    virtual HTMLElement* autoFillButtonElement() const { return nullptr; }
</ins><span class="cx">     virtual HTMLElement* resultsButtonElement() const { return nullptr; }
</span><span class="cx">     virtual HTMLElement* cancelButtonElement() const { return nullptr; }
</span><span class="cx">     virtual HTMLElement* sliderThumbElement() const { return nullptr; }
</span><span class="lines">@@ -275,6 +274,8 @@
</span><span class="cx">     virtual void disabledAttributeChanged();
</span><span class="cx">     virtual void readonlyAttributeChanged();
</span><span class="cx">     virtual void requiredAttributeChanged();
</span><ins>+    virtual void capsLockStateMayHaveChanged();
+    virtual void updateAutoFillButton();
</ins><span class="cx">     virtual String defaultToolTip() const;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlTextFieldInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/TextFieldInputType.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;BeforeTextInsertedEvent.h&quot;
</span><span class="cx"> #include &quot;Chrome.h&quot;
</span><ins>+#include &quot;ChromeClient.h&quot;
</ins><span class="cx"> #include &quot;Editor.h&quot;
</span><span class="cx"> #include &quot;FormDataList.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="lines">@@ -255,6 +256,8 @@
</span><span class="cx">     ASSERT(!m_innerText);
</span><span class="cx">     ASSERT(!m_innerBlock);
</span><span class="cx">     ASSERT(!m_innerSpinButton);
</span><ins>+    ASSERT(!m_capsLockIndicator);
+    ASSERT(!m_autoFillButton);
</ins><span class="cx"> 
</span><span class="cx">     Document&amp; document = element().document();
</span><span class="cx">     bool shouldHaveSpinButton = this-&gt;shouldHaveSpinButton();
</span><span class="lines">@@ -262,21 +265,14 @@
</span><span class="cx">     bool createsContainer = shouldHaveSpinButton || shouldHaveCapsLockIndicator || needsContainer();
</span><span class="cx"> 
</span><span class="cx">     m_innerText = TextControlInnerTextElement::create(document);
</span><ins>+
</ins><span class="cx">     if (!createsContainer) {
</span><span class="cx">         element().userAgentShadowRoot()-&gt;appendChild(m_innerText, IGNORE_EXCEPTION);
</span><span class="cx">         updatePlaceholderText();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ShadowRoot* shadowRoot = element().userAgentShadowRoot();
-    m_container = TextControlInnerContainer::create(document);
-    m_container-&gt;setPseudo(AtomicString(&quot;-webkit-textfield-decoration-container&quot;, AtomicString::ConstructFromLiteral));
-    shadowRoot-&gt;appendChild(m_container, IGNORE_EXCEPTION);
-
-    m_innerBlock = TextControlInnerElement::create(document);
-    m_innerBlock-&gt;appendChild(m_innerText, IGNORE_EXCEPTION);
-    m_container-&gt;appendChild(m_innerBlock, IGNORE_EXCEPTION);
-
</del><ins>+    createContainer();
</ins><span class="cx">     updatePlaceholderText();
</span><span class="cx"> 
</span><span class="cx">     if (shouldHaveSpinButton) {
</span><span class="lines">@@ -293,6 +289,8 @@
</span><span class="cx"> 
</span><span class="cx">         m_container-&gt;appendChild(m_capsLockIndicator, IGNORE_EXCEPTION);
</span><span class="cx">     }
</span><ins>+
+    updateAutoFillButton();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> HTMLElement* TextFieldInputType::containerElement() const
</span><span class="lines">@@ -321,6 +319,11 @@
</span><span class="cx">     return m_capsLockIndicator.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+HTMLElement* TextFieldInputType::autoFillButtonElement() const
+{
+    return m_autoFillButton.get();
+}
+
</ins><span class="cx"> HTMLElement* TextFieldInputType::placeholderElement() const
</span><span class="cx"> {
</span><span class="cx">     return m_placeholder.get();
</span><span class="lines">@@ -336,6 +339,7 @@
</span><span class="cx">         m_innerSpinButton-&gt;removeSpinButtonOwner();
</span><span class="cx">     m_innerSpinButton = nullptr;
</span><span class="cx">     m_capsLockIndicator = nullptr;
</span><ins>+    m_autoFillButton = nullptr;
</ins><span class="cx">     m_container = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -456,6 +460,7 @@
</span><span class="cx">         m_placeholder-&gt;setPseudo(AtomicString(&quot;-webkit-input-placeholder&quot;, AtomicString::ConstructFromLiteral));
</span><span class="cx">         m_placeholder-&gt;setInlineStyleProperty(CSSPropertyDisplay, element().isPlaceholderVisible() ? CSSValueBlock : CSSValueNone, true);
</span><span class="cx">         element().userAgentShadowRoot()-&gt;insertBefore(m_placeholder, m_container ? m_container.get() : innerTextElement(), ASSERT_NO_EXCEPTION);
</span><ins>+        
</ins><span class="cx">     }
</span><span class="cx">     m_placeholder-&gt;setInnerText(placeholderText, ASSERT_NO_EXCEPTION);
</span><span class="cx"> }
</span><span class="lines">@@ -563,4 +568,58 @@
</span><span class="cx">     m_capsLockIndicator-&gt;setInlineStyleProperty(CSSPropertyDisplay, shouldDrawCapsLockIndicator ? CSSValueBlock : CSSValueNone, true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool TextFieldInputType::shouldDrawAutoFillButton() const
+{
+    return element().showAutoFillButton();
+}
+
+void TextFieldInputType::autoFillButtonElementWasClicked()
+{
+    Page* page = element().document().page();
+    if (!page)
+        return;
+
+    page-&gt;chrome().client().handleAutoFillButtonClick(element());
+}
+
+void TextFieldInputType::createContainer()
+{
+    ASSERT(!m_container);
+
+    m_container = TextControlInnerContainer::create(element().document());
+    m_container-&gt;setPseudo(AtomicString(&quot;-webkit-textfield-decoration-container&quot;, AtomicString::ConstructFromLiteral));
+
+    m_innerBlock = TextControlInnerElement::create(element().document());
+    m_innerBlock-&gt;appendChild(m_innerText, IGNORE_EXCEPTION);
+    m_container-&gt;appendChild(m_innerBlock, IGNORE_EXCEPTION);
+
+    element().userAgentShadowRoot()-&gt;appendChild(m_container, IGNORE_EXCEPTION);
+}
+
+void TextFieldInputType::createAutoFillButton()
+{
+    ASSERT(!m_autoFillButton);
+
+    m_autoFillButton = AutoFillButtonElement::create(element().document(), *this);
+    m_autoFillButton-&gt;setPseudo(AtomicString(&quot;-webkit-auto-fill-button&quot;, AtomicString::ConstructFromLiteral));
+    m_container-&gt;appendChild(m_autoFillButton, IGNORE_EXCEPTION);
+}
+
+void TextFieldInputType::updateAutoFillButton()
+{
+    if (shouldDrawAutoFillButton()) {
+        if (!m_container)
+            createContainer();
+
+        if (!m_autoFillButton)
+            createAutoFillButton();
+
+        m_autoFillButton-&gt;setInlineStyleProperty(CSSPropertyDisplay, CSSValueBlock, true);
+        return;
+    }
+    
+    if (m_autoFillButton)
+        m_autoFillButton-&gt;setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone, true);        
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlTextFieldInputTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/TextFieldInputType.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/TextFieldInputType.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/html/TextFieldInputType.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #ifndef TextFieldInputType_h
</span><span class="cx"> #define TextFieldInputType_h
</span><span class="cx"> 
</span><ins>+#include &quot;AutoFillButtonElement.h&quot;
</ins><span class="cx"> #include &quot;InputType.h&quot;
</span><span class="cx"> #include &quot;SpinButtonElement.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -41,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> // The class represents types of which UI contain text fields.
</span><span class="cx"> // It supports not only the types for BaseTextInputType but also type=number.
</span><del>-class TextFieldInputType : public InputType, protected SpinButtonElement::SpinButtonOwner {
</del><ins>+class TextFieldInputType : public InputType, protected SpinButtonElement::SpinButtonOwner, protected AutoFillButtonElement::AutoFillButtonOwner {
</ins><span class="cx"> protected:
</span><span class="cx">     explicit TextFieldInputType(HTMLInputElement&amp;);
</span><span class="cx">     virtual ~TextFieldInputType();
</span><span class="lines">@@ -53,6 +54,7 @@
</span><span class="cx">     virtual TextControlInnerTextElement* innerTextElement() const override final;
</span><span class="cx">     virtual HTMLElement* innerSpinButtonElement() const override final;
</span><span class="cx">     virtual HTMLElement* capsLockIndicatorElement() const override final;
</span><ins>+    virtual HTMLElement* autoFillButtonElement() const override final;
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual bool needsContainer() const;
</span><span class="lines">@@ -96,6 +98,7 @@
</span><span class="cx">     virtual bool appendFormData(FormDataList&amp;, bool multipart) const override final;
</span><span class="cx">     virtual void subtreeHasChanged() override final;
</span><span class="cx">     virtual void capsLockStateMayHaveChanged() override final;
</span><ins>+    virtual void updateAutoFillButton() override final;
</ins><span class="cx"> 
</span><span class="cx">     // SpinButtonElement::SpinButtonOwner functions.
</span><span class="cx">     virtual void focusAndSelectSpinButtonOwner() override final;
</span><span class="lines">@@ -104,16 +107,24 @@
</span><span class="cx">     virtual void spinButtonStepDown() override final;
</span><span class="cx">     virtual void spinButtonStepUp() override final;
</span><span class="cx"> 
</span><ins>+    // AutoFillButtonElement::AutoFillButtonOwner
+    virtual void autoFillButtonElementWasClicked() override final;
+
</ins><span class="cx">     bool shouldHaveSpinButton() const;
</span><span class="cx">     bool shouldHaveCapsLockIndicator() const;
</span><span class="cx">     bool shouldDrawCapsLockIndicator() const;
</span><ins>+    bool shouldDrawAutoFillButton() const;
</ins><span class="cx"> 
</span><ins>+    void createContainer();
+    void createAutoFillButton();
+
</ins><span class="cx">     RefPtr&lt;HTMLElement&gt; m_container;
</span><span class="cx">     RefPtr&lt;HTMLElement&gt; m_innerBlock;
</span><span class="cx">     RefPtr&lt;TextControlInnerTextElement&gt; m_innerText;
</span><span class="cx">     RefPtr&lt;HTMLElement&gt; m_placeholder;
</span><span class="cx">     RefPtr&lt;SpinButtonElement&gt; m_innerSpinButton;
</span><span class="cx">     RefPtr&lt;HTMLElement&gt; m_capsLockIndicator;
</span><ins>+    RefPtr&lt;HTMLElement&gt; m_autoFillButton;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowAutoFillButtonElementcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/shadow/AutoFillButtonElement.cpp (0 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/AutoFillButtonElement.cpp                                (rev 0)
+++ trunk/Source/WebCore/html/shadow/AutoFillButtonElement.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &quot;config.h&quot;
+#include &quot;AutoFillButtonElement.h&quot;
+
+#include &quot;Event.h&quot;
+#include &quot;EventNames.h&quot;
+#include &quot;HTMLNames.h&quot;
+#include &quot;MouseEvent.h&quot;
+#include &quot;TextFieldInputType.h&quot;
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+Ref&lt;AutoFillButtonElement&gt; AutoFillButtonElement::create(Document&amp; document, AutoFillButtonOwner&amp; owner)
+{
+    return adoptRef(*new AutoFillButtonElement(document, owner));
+}
+
+AutoFillButtonElement::AutoFillButtonElement(Document&amp; document, AutoFillButtonOwner&amp; owner)
+    : HTMLDivElement(divTag, document)
+    , m_owner(owner)
+{
+}
+
+void AutoFillButtonElement::defaultEventHandler(Event* event)
+{
+    if (!is&lt;MouseEvent&gt;(*event)) {
+        if (!event-&gt;defaultHandled())
+            HTMLDivElement::defaultEventHandler(event);
+        return;
+    }
+
+    MouseEvent&amp; mouseEvent = downcast&lt;MouseEvent&gt;(*event);
+
+    if (mouseEvent.type() == eventNames().clickEvent) {
+        m_owner.autoFillButtonElementWasClicked();
+        event-&gt;setDefaultHandled();
+    }
+
+    if (!event-&gt;defaultHandled())
+        HTMLDivElement::defaultEventHandler(event);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowAutoFillButtonElementh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/shadow/AutoFillButtonElement.h (0 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/AutoFillButtonElement.h                                (rev 0)
+++ trunk/Source/WebCore/html/shadow/AutoFillButtonElement.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef AutoFillButtonElement_h
+#define AutoFillButtonElement_h
+
+#include &quot;HTMLDivElement.h&quot;
+
+namespace WebCore {
+
+class TextFieldInputType;
+
+class AutoFillButtonElement final : public HTMLDivElement {
+public:
+    class AutoFillButtonOwner {
+    public:
+        virtual ~AutoFillButtonOwner() { }
+        virtual void autoFillButtonElementWasClicked() = 0;
+    };
+
+    static Ref&lt;AutoFillButtonElement&gt; create(Document&amp;, AutoFillButtonOwner&amp;);
+
+private:
+    explicit AutoFillButtonElement(Document&amp;, AutoFillButtonOwner&amp;);
+
+    virtual void defaultEventHandler(Event*) override;
+
+    AutoFillButtonOwner&amp; m_owner;
+};
+
+} // namespace WebCore
+
+#endif // AutoFillButtonElement_h
</ins></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/page/ChromeClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -445,6 +445,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldDispatchFakeMouseMoveEvents() const { return true; }
</span><span class="cx"> 
</span><ins>+    virtual void handleAutoFillButtonClick(HTMLInputElement&amp;) { }
+
</ins><span class="cx"> protected:
</span><span class="cx">     virtual ~ChromeClient() { }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1036,9 +1036,20 @@
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    inputElement-&gt;setAutofilled(enabled);
</del><ins>+    inputElement-&gt;setAutoFilled(enabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::setShowAutoFillButton(Element* element, bool show, ExceptionCode&amp; ec)
+{
+    HTMLInputElement* inputElement = element-&gt;toInputElement();
+    if (!inputElement) {
+        ec = INVALID_ACCESS_ERR;
+        return;
+    }
+    inputElement-&gt;setShowAutoFillButton(show);
+}
+
+
</ins><span class="cx"> void Internals::scrollElementToRect(Element* element, long x, long y, long w, long h, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     if (!element || !element-&gt;document().view()) {
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/testing/Internals.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -161,6 +161,7 @@
</span><span class="cx">     bool elementShouldAutoComplete(Element* inputElement, ExceptionCode&amp;);
</span><span class="cx">     void setEditingValue(Element* inputElement, const String&amp;, ExceptionCode&amp;);
</span><span class="cx">     void setAutofilled(Element*, bool enabled, ExceptionCode&amp;);
</span><ins>+    void setShowAutoFillButton(Element*, bool enabled, ExceptionCode&amp;);
</ins><span class="cx">     void scrollElementToRect(Element*, long x, long y, long w, long h, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     void paintControlTints(ExceptionCode&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebCore/testing/Internals.idl        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -116,6 +116,7 @@
</span><span class="cx">     [RaisesException] boolean elementShouldAutoComplete(Element inputElement);
</span><span class="cx">     [RaisesException] void setEditingValue(Element inputElement, DOMString value);
</span><span class="cx">     [RaisesException] void setAutofilled(Element inputElement, boolean enabled);
</span><ins>+    [RaisesException] void setShowAutoFillButton(Element inputElement, boolean enabled);
</ins><span class="cx">     [RaisesException] unsigned long countMatchesForText(DOMString text, unsigned long findOptions, DOMString markMatches);
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] void paintControlTints();
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-03-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Allow adding a button in input elements for auto fill related functionality
+        &lt;rdar://problem/19782066&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=142564
+
+        Reviewed by Anders Carlsson.
+
+        * DOM/WebDOMOperations.mm:
+        (-[DOMHTMLInputElement _setAutofilled:]):
+        Update for consistent spelling of AutoFill.
+
</ins><span class="cx"> 2015-03-10  Timothy Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix the build
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMWebDOMOperationsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/WebDOMOperations.mm (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/WebDOMOperations.mm        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit/mac/DOM/WebDOMOperations.mm        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAutofilled:(BOOL)autofilled
</span><span class="cx"> {
</span><del>-    downcast&lt;HTMLInputElement&gt;(core((DOMElement *)self))-&gt;setAutofilled(autofilled);
</del><ins>+    downcast&lt;HTMLInputElement&gt;(core((DOMElement *)self))-&gt;setAutoFilled(autofilled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMHTMLClassescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMHTMLClasses.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMHTMLClasses.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit/win/DOMHTMLClasses.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1345,7 +1345,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(is&lt;HTMLInputElement&gt;(m_element));
</span><span class="cx">     HTMLInputElement&amp; inputElement = downcast&lt;HTMLInputElement&gt;(*m_element);
</span><del>-    inputElement.setAutofilled(!!filled);
</del><ins>+    inputElement.setAutoFilled(!!filled);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1354,7 +1354,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(is&lt;HTMLInputElement&gt;(m_element));
</span><span class="cx">     HTMLInputElement&amp; inputElement = downcast&lt;HTMLInputElement&gt;(*m_element);
</span><del>-    *result = inputElement.isAutofilled() ? TRUE : FALSE;
</del><ins>+    *result = inputElement.isAutoFilled() ? TRUE : FALSE;
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/ChangeLog        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1,3 +1,87 @@
</span><ins>+2015-03-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Allow adding a button in input elements for auto fill related functionality
+        &lt;rdar://problem/19782066&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=142564
+
+        Reviewed by Anders Carlsson.
+
+        - Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
+        - Adds new SPI to enable/disable the display of the AutoFill button on an element.
+        - Adds new SPI to get the bounds of the AutoFill button.
+        - Updates spelling of AutoFill to be consistent.
+
+        * UIProcess/API/APIUIClient.h:
+        (API::UIClient::didClickAutoFillButton):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageUIClient):
+        * UIProcess/API/C/WKPageUIClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::handleAutoFillButtonClick):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
+        (API::InjectedBundle::PageUIClient::didClickAutoFillButton):
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
+        (WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::handleAutoFillButtonClick):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
+        Pipe the didClickAutoFillButton to the SPI layer.
+
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
+        (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
+        (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
+        Update for new spelling of AutoFill.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
+        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
+        (WKBundleNodeHandleGetHTMLInputElementAutoFilled):
+        (WKBundleNodeHandleSetHTMLInputElementAutoFilled):
+        Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
+        which are now deprecated due to inconsistent spelling of AutoFill.
+
+        (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
+        (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
+        (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
+        Added.
+
+        (WKBundleNodeHandleGetHTMLInputElementAutofilled):
+        (WKBundleNodeHandleSetHTMLInputElementAutofilled):
+        Deprecated.
+
+        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
+        (WebKit::InjectedBundleNodeHandle::getOrCreate):
+        (WebKit::InjectedBundleNodeHandle::create):
+        (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
+        (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
+        (WebKit::InjectedBundleNodeHandle::coreNode):
+        (WebKit::InjectedBundleNodeHandle::document):
+        (WebKit::InjectedBundleNodeHandle::elementBounds):
+        (WebKit::InjectedBundleNodeHandle::renderRect):
+        (WebKit::InjectedBundleNodeHandle::renderedImage):
+        (WebKit::InjectedBundleNodeHandle::visibleRange):
+        (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
+        (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
+        (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
+        (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
+        (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
+        (WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
+        (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
+        (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
+        (WebKit::InjectedBundleNodeHandle::isTextField):
+        (WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
+        (WebKit::InjectedBundleNodeHandle::documentFrame):
+        (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
+        (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
+        (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
+        (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
+        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
+        Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
+        Add helpers to implement the new SPI for WKBundleNodeHandleRef.
+
</ins><span class="cx"> 2015-03-11  Timothy Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -155,6 +155,8 @@
</span><span class="cx">     virtual RetainPtr&lt;NSArray&gt; actionsForElement(_WKActivatedElementInfo *, RetainPtr&lt;NSArray&gt; defaultActions) { return WTF::move(defaultActions); }
</span><span class="cx">     virtual void didNotHandleTapAsClick(const WebCore::IntPoint&amp;) { }
</span><span class="cx"> #endif
</span><ins>+
+    virtual void didClickAutoFillButton(WebKit::WebPageProxy&amp;, API::Object*) { }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1744,6 +1744,14 @@
</span><span class="cx"> 
</span><span class="cx">             m_client.isPlayingAudioDidChange(toAPI(&amp;page), m_client.base.clientInfo);
</span><span class="cx">         }
</span><ins>+
+        virtual void didClickAutoFillButton(WebPageProxy&amp; page, API::Object* userInfo) override
+        {
+            if (!m_client.didClickAutoFillButton)
+                return;
+
+            m_client.didClickAutoFillButton(toAPI(&amp;page), toAPI(userInfo), m_client.base.clientInfo);
+        }
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     toImpl(pageRef)-&gt;setUIClient(std::make_unique&lt;UIClient&gt;(wkClient));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -91,8 +91,9 @@
</span><span class="cx"> typedef void (*WKPageDidCancelTrackingPotentialLongMousePressCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
</span><span class="cx"> typedef void (*WKPageIsPlayingAudioDidChangeCallback)(WKPageRef page, const void* clientInfo);
</span><span class="cx"> typedef void (*WKPageDecidePolicyForUserMediaPermissionRequestCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKUserMediaPermissionRequestRef permissionRequest, const void* clientInfo);
</span><ins>+typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
</ins><span class="cx"> 
</span><del>-// Deprecated    
</del><ins>+// Deprecated
</ins><span class="cx"> typedef WKPageRef (*WKPageCreateNewPageCallback_deprecatedForUseWithV0)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
</span><span class="cx"> typedef void      (*WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0)(WKPageRef page, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo);
</span><span class="cx"> typedef void (*WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, WKStringRef url, WKStringRef pluginsPageURL, const void* clientInfo);
</span><span class="lines">@@ -445,6 +446,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Version 5.
</span><span class="cx">     WKPageDecidePolicyForUserMediaPermissionRequestCallback             decidePolicyForUserMediaPermissionRequest;
</span><ins>+    WKPageDidClickAutoFillButtonCallback                                didClickAutoFillButton;
</ins><span class="cx"> } WKPageUIClientV5;
</span><span class="cx"> 
</span><span class="cx"> enum { kWKPageUIClientCurrentVersion WK_ENUM_DEPRECATED(&quot;Use an explicit version number instead&quot;) = 2 };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -5592,4 +5592,9 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::SetShouldDispatchFakeMouseMoveEvents(shouldDispatchFakeMouseMoveEvents), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::handleAutoFillButtonClick(const UserData&amp; userData)
+{
+    m_uiClient-&gt;didClickAutoFillButton(*this, m_process-&gt;transformHandlesToObjects(userData.object()).get());
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1384,6 +1384,8 @@
</span><span class="cx">     void didPerformActionMenuHitTest(const ActionMenuHitTestResult&amp;, bool forImmediateAction, const UserData&amp;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    void handleAutoFillButtonClick(const UserData&amp;);
+
</ins><span class="cx">     PageClient&amp; m_pageClient;
</span><span class="cx">     std::unique_ptr&lt;API::LoaderClient&gt; m_loaderClient;
</span><span class="cx">     std::unique_ptr&lt;API::PolicyClient&gt; m_policyClient;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -423,4 +423,6 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     DidPerformActionMenuHitTest(struct WebKit::ActionMenuHitTestResult result, bool forImmediateAction, WebKit::UserData userData)
</span><span class="cx"> #endif
</span><ins>+
+    HandleAutoFillButtonClick(WebKit::UserData userData);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIAPIInjectedBundlePageUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><ins>+class InjectedBundleNodeHandle;
</ins><span class="cx"> class WebFrame;
</span><span class="cx"> class WebPage;
</span><span class="cx"> }
</span><span class="lines">@@ -89,6 +90,8 @@
</span><span class="cx">     virtual void didBeginTrackingPotentialLongMousePress(WebKit::WebPage*, const WebCore::IntPoint&amp;, const WebCore::HitTestResult&amp;, RefPtr&lt;API::Object&gt;&amp; userData) { UNUSED_PARAM(userData); }
</span><span class="cx">     virtual void didRecognizeLongMousePress(WebKit::WebPage*, RefPtr&lt;API::Object&gt;&amp; userData) { UNUSED_PARAM(userData); }
</span><span class="cx">     virtual void didCancelTrackingPotentialLongMousePress(WebKit::WebPage*, RefPtr&lt;API::Object&gt;&amp; userData) { UNUSED_PARAM(userData); }
</span><ins>+
+    virtual void didClickAutoFillButton(WebKit::WebPage&amp;, WebKit::InjectedBundleNodeHandle&amp;, RefPtr&lt;API::Object&gt;&amp;) { }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace InjectedBundle
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPICocoaWKWebProcessPlugInNodeHandlemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -70,12 +70,12 @@
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)HTMLInputElementIsAutoFilled
</span><span class="cx"> {
</span><del>-    return _nodeHandle-&gt;isHTMLInputElementAutofilled();
</del><ins>+    return _nodeHandle-&gt;isHTMLInputElementAutoFilled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setHTMLInputElementIsAutoFilled:(BOOL)isAutoFilled
</span><span class="cx"> {
</span><del>-    _nodeHandle-&gt;setHTMLInputElementAutofilled(isAutoFilled);
</del><ins>+    _nodeHandle-&gt;setHTMLInputElementAutoFilled(isAutoFilled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)HTMLInputElementIsUserEdited
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundleNodeHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -80,16 +80,31 @@
</span><span class="cx">     toImpl(htmlInputElementHandleRef)-&gt;setHTMLInputElementValueForUser(toWTFString(valueRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WKBundleNodeHandleGetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandleRef)
</del><ins>+bool WKBundleNodeHandleGetHTMLInputElementAutoFilled(WKBundleNodeHandleRef htmlInputElementHandleRef)
</ins><span class="cx"> {
</span><del>-    return toImpl(htmlInputElementHandleRef)-&gt;isHTMLInputElementAutofilled();
</del><ins>+    return toImpl(htmlInputElementHandleRef)-&gt;isHTMLInputElementAutoFilled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKBundleNodeHandleSetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandleRef, bool filled)
</del><ins>+void WKBundleNodeHandleSetHTMLInputElementAutoFilled(WKBundleNodeHandleRef htmlInputElementHandleRef, bool filled)
</ins><span class="cx"> {
</span><del>-    toImpl(htmlInputElementHandleRef)-&gt;setHTMLInputElementAutofilled(filled);
</del><ins>+    toImpl(htmlInputElementHandleRef)-&gt;setHTMLInputElementAutoFilled(filled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled(WKBundleNodeHandleRef htmlInputElementHandleRef)
+{
+    return toImpl(htmlInputElementHandleRef)-&gt;isHTMLInputElementAutoFillButtonEnabled();
+}
+
+void WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled(WKBundleNodeHandleRef htmlInputElementHandleRef, bool enabled)
+{
+    toImpl(htmlInputElementHandleRef)-&gt;setHTMLInputElementAutoFillButtonEnabled(enabled);
+}
+
+WKRect WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds(WKBundleNodeHandleRef htmlInputElementHandleRef)
+{
+    return toAPI(toImpl(htmlInputElementHandleRef)-&gt;htmlInputElementAutoFillButtonBounds());
+}
+
</ins><span class="cx"> bool WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit(WKBundleNodeHandleRef htmlInputElementHandleRef)
</span><span class="cx"> {
</span><span class="cx">     return toImpl(htmlInputElementHandleRef)-&gt;htmlInputElementLastChangeWasUserEdit();
</span><span class="lines">@@ -123,3 +138,15 @@
</span><span class="cx">     RefPtr&lt;WebFrame&gt; frame = toImpl(htmlIFrameElementHandleRef)-&gt;htmlIFrameElementContentFrame();
</span><span class="cx">     return toAPI(frame.release().leakRef());
</span><span class="cx"> }
</span><ins>+
+// Deprecated - use WKBundleNodeHandleGetHTMLInputElementAutoFilled(WKBundleNodeHandleRef).
+bool WKBundleNodeHandleGetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandleRef)
+{
+    return toImpl(htmlInputElementHandleRef)-&gt;isHTMLInputElementAutoFilled();
+}
+
+// Deprecated - use WKBundleNodeHandleSetHTMLInputElementAutoFilled(WKBundleNodeHandleRef, bool).
+void WKBundleNodeHandleSetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandleRef, bool filled)
+{
+    toImpl(htmlInputElementHandleRef)-&gt;setHTMLInputElementAutoFilled(filled);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundleNodeHandlePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -52,8 +52,11 @@
</span><span class="cx"> 
</span><span class="cx"> /* HTMLInputElement Specific Operations */
</span><span class="cx"> WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementValueForUser(WKBundleNodeHandleRef htmlInputElementHandle, WKStringRef value);
</span><del>-WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandle);
-WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandle, bool filled);
</del><ins>+WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementAutoFilled(WKBundleNodeHandleRef htmlInputElementHandle);
+WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutoFilled(WKBundleNodeHandleRef htmlInputElementHandle, bool filled);
+WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled(WKBundleNodeHandleRef htmlInputElementHandle);
+WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled(WKBundleNodeHandleRef htmlInputElementHandle, bool enabled);
+WK_EXPORT WKRect WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds(WKBundleNodeHandleRef htmlInputElementHandle);
</ins><span class="cx"> WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit(WKBundleNodeHandleRef htmlInputElementHandle);
</span><span class="cx"> 
</span><span class="cx"> /* HTMLTextAreaElement Specific Operations */
</span><span class="lines">@@ -71,6 +74,12 @@
</span><span class="cx"> /* HTMLIFrameElement Specific Operations */
</span><span class="cx"> WK_EXPORT WKBundleFrameRef WKBundleNodeHandleCopyHTMLIFrameElementContentFrame(WKBundleNodeHandleRef htmlIFrameElementHandle);
</span><span class="cx"> 
</span><ins>+
+/* Deprecated - use WKBundleNodeHandleGetHTMLInputElementAutoFilled(WKBundleNodeHandleRef) */
+WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandle);
+/* Deprecated - use WKBundleNodeHandleSetHTMLInputElementAutoFilled(WKBundleNodeHandleRef, bool) */
+WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutofilled(WKBundleNodeHandleRef htmlInputElementHandle, bool filled);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> typedef void (*WKBundlePageDidBeginTrackingPotentialLongMousePressCallback)(WKBundlePageRef page, WKPoint mouseDownPosition, WKBundleHitTestResultRef hitTestResult, WKTypeRef* userData, const void *clientInfo);
</span><span class="cx"> typedef void (*WKBundlePageDidRecognizeLongMousePressCallback)(WKBundlePageRef page, WKTypeRef* userData, const void *clientInfo);
</span><span class="cx"> typedef void (*WKBundlePageDidCancelTrackingPotentialLongMousePressCallback)(WKBundlePageRef page, WKTypeRef* userData, const void *clientInfo);
</span><ins>+typedef void (*WKBundlePageDidClickAutoFillButtonCallback)(WKBundlePageRef page, WKBundleNodeHandleRef inputElement, WKTypeRef* userData, const void *clientInfo);
</ins><span class="cx"> 
</span><span class="cx"> typedef struct WKBundlePageUIClientBase {
</span><span class="cx">     int                                                                 version;
</span><span class="lines">@@ -169,6 +170,8 @@
</span><span class="cx">     WKBundlePageDidBeginTrackingPotentialLongMousePressCallback         didBeginTrackingPotentialLongMousePress;
</span><span class="cx">     WKBundlePageDidRecognizeLongMousePressCallback                      didRecognizeLongMousePress;
</span><span class="cx">     WKBundlePageDidCancelTrackingPotentialLongMousePressCallback        didCancelTrackingPotentialLongMousePress;
</span><ins>+
+    WKBundlePageDidClickAutoFillButtonCallback                          didClickAutoFillButton;
</ins><span class="cx"> } WKBundlePageUIClientV3;
</span><span class="cx"> 
</span><span class="cx"> enum { kWKBundlePageUIClientCurrentVersion WK_ENUM_DEPRECATED(&quot;Use an explicit version number instead&quot;) = 2 };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleDOMInjectedBundleNodeHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -68,65 +68,70 @@
</span><span class="cx">     return cache;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::getOrCreate(JSContextRef, JSObjectRef object)
</del><ins>+RefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::getOrCreate(JSContextRef, JSObjectRef object)
</ins><span class="cx"> {
</span><span class="cx">     Node* node = JSNode::toWrapped(toJS(object));
</span><span class="cx">     return getOrCreate(node);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::getOrCreate(Node* node)
</del><ins>+RefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::getOrCreate(Node* node)
</ins><span class="cx"> {
</span><span class="cx">     if (!node)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    DOMHandleCache::AddResult result = domHandleCache().add(node, nullptr);
</del><ins>+    return InjectedBundleNodeHandle::getOrCreate(*node);
+}
+
+Ref&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::getOrCreate(Node&amp; node)
+{
+    DOMHandleCache::AddResult result = domHandleCache().add(&amp;node, nullptr);
</ins><span class="cx">     if (!result.isNewEntry)
</span><del>-        return PassRefPtr&lt;InjectedBundleNodeHandle&gt;(result.iterator-&gt;value);
</del><ins>+        return Ref&lt;InjectedBundleNodeHandle&gt;(*result.iterator-&gt;value);
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;InjectedBundleNodeHandle&gt; nodeHandle = InjectedBundleNodeHandle::create(node);
-    result.iterator-&gt;value = nodeHandle.get();
-    return nodeHandle.release();
</del><ins>+    Ref&lt;InjectedBundleNodeHandle&gt; nodeHandle = InjectedBundleNodeHandle::create(node);
+    result.iterator-&gt;value = nodeHandle.ptr();
+    return nodeHandle;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::create(Node* node)
</del><ins>+Ref&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::create(Node&amp; node)
</ins><span class="cx"> {
</span><del>-    return adoptRef(new InjectedBundleNodeHandle(node));
</del><ins>+    return adoptRef(*new InjectedBundleNodeHandle(node));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-InjectedBundleNodeHandle::InjectedBundleNodeHandle(Node* node)
</del><ins>+InjectedBundleNodeHandle::InjectedBundleNodeHandle(Node&amp; node)
</ins><span class="cx">     : m_node(node)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InjectedBundleNodeHandle::~InjectedBundleNodeHandle()
</span><span class="cx"> {
</span><del>-    domHandleCache().remove(m_node.get());
</del><ins>+    domHandleCache().remove(m_node.ptr());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* InjectedBundleNodeHandle::coreNode() const
</del><ins>+Node* InjectedBundleNodeHandle::coreNode()
</ins><span class="cx"> {
</span><del>-    return m_node.get();
</del><ins>+    return m_node.ptr();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::document()
</del><ins>+Ref&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::document()
</ins><span class="cx"> {
</span><del>-    return getOrCreate(&amp;m_node-&gt;document());
</del><ins>+    return getOrCreate(m_node-&gt;document());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Additional DOM Operations
</span><span class="cx"> // Note: These should only be operations that are not exposed to JavaScript.
</span><span class="cx"> 
</span><del>-IntRect InjectedBundleNodeHandle::elementBounds() const
</del><ins>+IntRect InjectedBundleNodeHandle::elementBounds()
</ins><span class="cx"> {
</span><del>-    if (!is&lt;Element&gt;(*m_node))
</del><ins>+    if (!is&lt;Element&gt;(m_node))
</ins><span class="cx">         return IntRect();
</span><span class="cx"> 
</span><del>-    return downcast&lt;Element&gt;(*m_node).boundsInRootViewSpace();
</del><ins>+    return downcast&lt;Element&gt;(m_node.get()).boundsInRootViewSpace();
</ins><span class="cx"> }
</span><span class="cx">     
</span><del>-IntRect InjectedBundleNodeHandle::renderRect(bool* isReplaced) const
</del><ins>+IntRect InjectedBundleNodeHandle::renderRect(bool* isReplaced)
</ins><span class="cx"> {
</span><del>-    return m_node.get()-&gt;pixelSnappedRenderRect(isReplaced);
</del><ins>+    return m_node-&gt;pixelSnappedRenderRect(isReplaced);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static PassRefPtr&lt;WebImage&gt; imageForRect(FrameView* frameView, const IntRect&amp; rect, SnapshotOptions options)
</span><span class="lines">@@ -166,32 +171,32 @@
</span><span class="cx"> {
</span><span class="cx">     Frame* frame = m_node-&gt;document().frame();
</span><span class="cx">     if (!frame)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     FrameView* frameView = frame-&gt;view();
</span><span class="cx">     if (!frameView)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     m_node-&gt;document().updateLayout();
</span><span class="cx"> 
</span><span class="cx">     RenderObject* renderer = m_node-&gt;renderer();
</span><span class="cx">     if (!renderer)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     LayoutRect topLevelRect;
</span><span class="cx">     IntRect paintingRect = snappedIntRect(renderer-&gt;paintingRootRect(topLevelRect));
</span><span class="cx"> 
</span><del>-    frameView-&gt;setNodeToDraw(m_node.get());
</del><ins>+    frameView-&gt;setNodeToDraw(m_node.ptr());
</ins><span class="cx">     RefPtr&lt;WebImage&gt; image = imageForRect(frameView, paintingRect, options);
</span><span class="cx">     frameView-&gt;setNodeToDraw(0);
</span><span class="cx"> 
</span><span class="cx">     return image.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;InjectedBundleRangeHandle&gt; InjectedBundleNodeHandle::visibleRange() const
</del><ins>+PassRefPtr&lt;InjectedBundleRangeHandle&gt; InjectedBundleNodeHandle::visibleRange()
</ins><span class="cx"> {
</span><del>-    VisiblePosition start = firstPositionInNode(m_node.get());
-    VisiblePosition end = lastPositionInNode(m_node.get());
</del><ins>+    VisiblePosition start = firstPositionInNode(m_node.ptr());
+    VisiblePosition end = lastPositionInNode(m_node.ptr());
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Range&gt; range = makeRange(start, end);
</span><span class="cx">     return InjectedBundleRangeHandle::getOrCreate(range.get());
</span><span class="lines">@@ -199,55 +204,86 @@
</span><span class="cx"> 
</span><span class="cx"> void InjectedBundleNodeHandle::setHTMLInputElementValueForUser(const String&amp; value)
</span><span class="cx"> {
</span><del>-    if (!is&lt;HTMLInputElement&gt;(*m_node))
</del><ins>+    if (!is&lt;HTMLInputElement&gt;(m_node))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    downcast&lt;HTMLInputElement&gt;(*m_node).setValueForUser(value);
</del><ins>+    downcast&lt;HTMLInputElement&gt;(m_node.get()).setValueForUser(value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InjectedBundleNodeHandle::isHTMLInputElementAutofilled() const
</del><ins>+bool InjectedBundleNodeHandle::isHTMLInputElementAutoFilled() const
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLInputElement&gt;(*m_node))
</del><ins>+    if (!is&lt;HTMLInputElement&gt;(m_node))
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    return downcast&lt;HTMLInputElement&gt;(*m_node).isAutofilled();
</del><ins>+    return downcast&lt;HTMLInputElement&gt;(m_node.get()).isAutoFilled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundleNodeHandle::setHTMLInputElementAutofilled(bool filled)
</del><ins>+void InjectedBundleNodeHandle::setHTMLInputElementAutoFilled(bool filled)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLInputElement&gt;(*m_node))
</del><ins>+    if (!is&lt;HTMLInputElement&gt;(m_node))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    downcast&lt;HTMLInputElement&gt;(*m_node).setAutofilled(filled);
</del><ins>+    downcast&lt;HTMLInputElement&gt;(m_node.get()).setAutoFilled(filled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled() const
+{
+    if (!is&lt;HTMLInputElement&gt;(m_node))
+        return false;
+    
+    return downcast&lt;HTMLInputElement&gt;(m_node.get()).showAutoFillButton();
+}
+
+void InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled(bool filled)
+{
+    if (!is&lt;HTMLInputElement&gt;(m_node))
+        return;
+
+    downcast&lt;HTMLInputElement&gt;(m_node.get()).setShowAutoFillButton(filled);
+}
+
+IntRect InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds()
+{
+    if (!is&lt;HTMLInputElement&gt;(m_node))
+        return IntRect();
+
+    auto autoFillButton = downcast&lt;HTMLInputElement&gt;(m_node.get()).autoFillButtonElement();
+    if (!autoFillButton)
+        return IntRect();
+
+    return autoFillButton-&gt;boundsInRootViewSpace();
+}
+
</ins><span class="cx"> bool InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit()
</span><span class="cx"> {
</span><del>-    if (!is&lt;HTMLInputElement&gt;(*m_node))
</del><ins>+    if (!is&lt;HTMLInputElement&gt;(m_node))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return downcast&lt;HTMLInputElement&gt;(*m_node).lastChangeWasUserEdit();
</del><ins>+    return downcast&lt;HTMLInputElement&gt;(m_node.get()).lastChangeWasUserEdit();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit()
</span><span class="cx"> {
</span><del>-    if (!is&lt;HTMLTextAreaElement&gt;(*m_node))
</del><ins>+    if (!is&lt;HTMLTextAreaElement&gt;(m_node))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return downcast&lt;HTMLTextAreaElement&gt;(*m_node).lastChangeWasUserEdit();
</del><ins>+    return downcast&lt;HTMLTextAreaElement&gt;(m_node.get()).lastChangeWasUserEdit();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool InjectedBundleNodeHandle::isTextField() const
</span><span class="cx"> {
</span><del>-    return is&lt;HTMLInputElement&gt;(*m_node) &amp;&amp; downcast&lt;HTMLInputElement&gt;(*m_node).isText();
</del><ins>+    if (!is&lt;HTMLInputElement&gt;(m_node))
+        return false;
+
+    return downcast&lt;HTMLInputElement&gt;(m_node.get()).isText();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;InjectedBundleNodeHandle&gt; InjectedBundleNodeHandle::htmlTableCellElementCellAbove()
</span><span class="cx"> {
</span><del>-    if (!m_node-&gt;hasTagName(tdTag))
</del><ins>+    if (!is&lt;HTMLTableCellElement&gt;(m_node))
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return getOrCreate(static_cast&lt;HTMLTableCellElement&amp;&gt;(*m_node).cellAbove());
</del><ins>+    return getOrCreate(downcast&lt;HTMLTableCellElement&gt;(m_node.get()).cellAbove());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;WebFrame&gt; InjectedBundleNodeHandle::documentFrame()
</span><span class="lines">@@ -255,7 +291,7 @@
</span><span class="cx">     if (!m_node-&gt;isDocumentNode())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Frame* frame = static_cast&lt;Document*&gt;(m_node.get())-&gt;frame();
</del><ins>+    Frame* frame = downcast&lt;Document&gt;(m_node.get()).frame();
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -264,10 +300,10 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;WebFrame&gt; InjectedBundleNodeHandle::htmlFrameElementContentFrame()
</span><span class="cx"> {
</span><del>-    if (!m_node-&gt;hasTagName(frameTag))
</del><ins>+    if (!is&lt;HTMLFrameElement&gt;(m_node))
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Frame* frame = static_cast&lt;HTMLFrameElement*&gt;(m_node.get())-&gt;contentFrame();
</del><ins>+    Frame* frame = downcast&lt;HTMLFrameElement&gt;(m_node.get()).contentFrame();
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -276,10 +312,10 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;WebFrame&gt; InjectedBundleNodeHandle::htmlIFrameElementContentFrame()
</span><span class="cx"> {
</span><del>-    if (!is&lt;HTMLIFrameElement&gt;(*m_node))
</del><ins>+    if (!is&lt;HTMLIFrameElement&gt;(m_node))
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Frame* frame = downcast&lt;HTMLIFrameElement&gt;(*m_node).contentFrame();
</del><ins>+    Frame* frame = downcast&lt;HTMLIFrameElement&gt;(m_node.get()).contentFrame();
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleDOMInjectedBundleNodeHandleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -47,25 +47,29 @@
</span><span class="cx"> 
</span><span class="cx"> class InjectedBundleNodeHandle : public API::ObjectImpl&lt;API::Object::Type::BundleNodeHandle&gt; {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;InjectedBundleNodeHandle&gt; getOrCreate(JSContextRef, JSObjectRef);
-    static PassRefPtr&lt;InjectedBundleNodeHandle&gt; getOrCreate(WebCore::Node*);
</del><ins>+    static RefPtr&lt;InjectedBundleNodeHandle&gt; getOrCreate(JSContextRef, JSObjectRef);
+    static RefPtr&lt;InjectedBundleNodeHandle&gt; getOrCreate(WebCore::Node*);
+    static Ref&lt;InjectedBundleNodeHandle&gt; getOrCreate(WebCore::Node&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual ~InjectedBundleNodeHandle();
</span><span class="cx"> 
</span><del>-    WebCore::Node* coreNode() const;
</del><ins>+    WebCore::Node* coreNode();
</ins><span class="cx"> 
</span><span class="cx">     // Convenience DOM Operations
</span><del>-    PassRefPtr&lt;InjectedBundleNodeHandle&gt; document();
</del><ins>+    Ref&lt;InjectedBundleNodeHandle&gt; document();
</ins><span class="cx"> 
</span><span class="cx">     // Additional DOM Operations
</span><span class="cx">     // Note: These should only be operations that are not exposed to JavaScript.
</span><del>-    WebCore::IntRect elementBounds() const;
-    WebCore::IntRect renderRect(bool*) const;
</del><ins>+    WebCore::IntRect elementBounds();
+    WebCore::IntRect renderRect(bool*);
</ins><span class="cx">     PassRefPtr&lt;WebImage&gt; renderedImage(SnapshotOptions);
</span><del>-    PassRefPtr&lt;InjectedBundleRangeHandle&gt; visibleRange() const;
</del><ins>+    PassRefPtr&lt;InjectedBundleRangeHandle&gt; visibleRange();
</ins><span class="cx">     void setHTMLInputElementValueForUser(const String&amp;);
</span><del>-    bool isHTMLInputElementAutofilled() const;
-    void setHTMLInputElementAutofilled(bool);
</del><ins>+    bool isHTMLInputElementAutoFilled() const;
+    void setHTMLInputElementAutoFilled(bool);
+    bool isHTMLInputElementAutoFillButtonEnabled() const;
+    void setHTMLInputElementAutoFillButtonEnabled(bool);
+    WebCore::IntRect htmlInputElementAutoFillButtonBounds();
</ins><span class="cx">     bool htmlInputElementLastChangeWasUserEdit();
</span><span class="cx">     bool htmlTextAreaElementLastChangeWasUserEdit();
</span><span class="cx">     bool isTextField() const;
</span><span class="lines">@@ -77,10 +81,10 @@
</span><span class="cx">     PassRefPtr&lt;WebFrame&gt; htmlIFrameElementContentFrame();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    static PassRefPtr&lt;InjectedBundleNodeHandle&gt; create(WebCore::Node*);
-    InjectedBundleNodeHandle(WebCore::Node*);
</del><ins>+    static Ref&lt;InjectedBundleNodeHandle&gt; create(WebCore::Node&amp;);
+    InjectedBundleNodeHandle(WebCore::Node&amp;);
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;WebCore::Node&gt; m_node;
</del><ins>+    Ref&lt;WebCore::Node&gt; m_node;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageUIClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APISecurityOrigin.h&quot;
</span><span class="cx"> #include &quot;InjectedBundleHitTestResult.h&quot;
</span><ins>+#include &quot;InjectedBundleNodeHandle.h&quot;
</ins><span class="cx"> #include &quot;WKAPICast.h&quot;
</span><span class="cx"> #include &quot;WKBundleAPICast.h&quot;
</span><span class="cx"> #include &quot;WebFrame.h&quot;
</span><span class="lines">@@ -233,4 +234,14 @@
</span><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InjectedBundlePageUIClient::didClickAutoFillButton(WebPage&amp; page, InjectedBundleNodeHandle&amp; nodeHandle, RefPtr&lt;API::Object&gt;&amp; userData)
+{
+    if (!m_client.didClickAutoFillButton)
+        return;
+
+    WKTypeRef userDataToPass = nullptr;
+    m_client.didClickAutoFillButton(toAPI(&amp;page), toAPI(&amp;nodeHandle), &amp;userDataToPass, m_client.base.clientInfo);
+    userData = adoptRef(toImpl(userDataToPass));
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -73,6 +73,8 @@
</span><span class="cx">     void didBeginTrackingPotentialLongMousePress(WebPage*, const WebCore::IntPoint&amp;, const WebCore::HitTestResult&amp;, RefPtr&lt;API::Object&gt;&amp; userData) override;
</span><span class="cx">     void didRecognizeLongMousePress(WebPage*, RefPtr&lt;API::Object&gt;&amp; userData) override;
</span><span class="cx">     void didCancelTrackingPotentialLongMousePress(WebPage*, RefPtr&lt;API::Object&gt;&amp; userData) override;
</span><ins>+
+    void didClickAutoFillButton(WebPage&amp;, InjectedBundleNodeHandle&amp;, RefPtr&lt;API::Object&gt;&amp; userData) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;APISecurityOrigin.h&quot;
</span><span class="cx"> #include &quot;DrawingArea.h&quot;
</span><span class="cx"> #include &quot;InjectedBundleNavigationAction.h&quot;
</span><ins>+#include &quot;InjectedBundleNodeHandle.h&quot;
</ins><span class="cx"> #include &quot;LayerTreeHost.h&quot;
</span><span class="cx"> #include &quot;NavigationActionData.h&quot;
</span><span class="cx"> #include &quot;PageBanner.h&quot;
</span><span class="lines">@@ -1101,4 +1102,16 @@
</span><span class="cx">     return m_page-&gt;shouldDispatchFakeMouseMoveEvents();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebChromeClient::handleAutoFillButtonClick(HTMLInputElement&amp; inputElement)
+{
+    RefPtr&lt;API::Object&gt; userData;
+
+    // Notify the bundle client.
+    auto nodeHandle = InjectedBundleNodeHandle::getOrCreate(inputElement);
+    m_page-&gt;injectedBundleUIClient().didClickAutoFillButton(*m_page, nodeHandle.get(), userData);
+
+    // Notify the UIProcess.
+    m_page-&gt;send(Messages::WebPageProxy::HandleAutoFillButtonClick(UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -310,6 +310,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldDispatchFakeMouseMoveEvents() const override;
</span><span class="cx"> 
</span><ins>+    virtual void handleAutoFillButtonClick(WebCore::HTMLInputElement&amp;) override;
+
</ins><span class="cx">     String m_cachedToolTip;
</span><span class="cx">     mutable RefPtr&lt;WebFrame&gt; m_cachedFrameSetLargestFrame;
</span><span class="cx">     mutable bool m_cachedMainFrameHasHorizontalScrollbar;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Tools/ChangeLog        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-03-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Allow adding a button in input elements for auto fill related functionality
+        &lt;rdar://problem/19782066&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=142564
+
+        Reviewed by Anders Carlsson.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::createOtherPage):
+        (WTR::TestController::createWebViewWithOptions):
+        Update for new callback.
+
</ins><span class="cx"> 2015-03-11  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add basic support for BOL and EOL assertions to the URL Filter parser
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (181407 => 181408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2015-03-11 21:29:57 UTC (rev 181407)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2015-03-11 22:01:01 UTC (rev 181408)
</span><span class="lines">@@ -256,6 +256,7 @@
</span><span class="cx">         0, // didCancelTrackingPotentialLongMousePress
</span><span class="cx">         0, // isPlayingAudioDidChange
</span><span class="cx">         decidePolicyForUserMediaPermissionRequest,
</span><ins>+        0, // didClickAutofillButton
</ins><span class="cx">     };
</span><span class="cx">     WKPageSetPageUIClient(newPage, &amp;otherPageUIClient.base);
</span><span class="cx">     
</span><span class="lines">@@ -493,6 +494,7 @@
</span><span class="cx">         0, // didCancelTrackingPotentialLongMousePress
</span><span class="cx">         0, // isPlayingAudioDidChange
</span><span class="cx">         decidePolicyForUserMediaPermissionRequest,
</span><ins>+        0, // didClickAutofillButton
</ins><span class="cx">     };
</span><span class="cx">     WKPageSetPageUIClient(m_mainWebView-&gt;page(), &amp;pageUIClient.base);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>