<!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>[209927] trunk/Source/WebCore</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/209927">209927</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2016-12-16 10:56:24 -0800 (Fri, 16 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[ApplePay] Remove remaining custom bindings from the ApplePay code
https://bugs.webkit.org/show_bug.cgi?id=165860

Reviewed by Darin Adler.

* DerivedSources.make:
Add new IDL files.

* WebCore.xcodeproj/project.pbxproj:
Add/remove files.

* bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Removed.
* bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Removed.
* bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Removed.
* bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Removed.
Remove custom bindings.

* Modules/applepay/ApplePayLineItem.h: Added.
* Modules/applepay/ApplePayLineItem.idl: Added.
* Modules/applepay/ApplePayPayment.h: Added.
* Modules/applepay/ApplePayPayment.idl: Added.
* Modules/applepay/ApplePayPaymentContact.h: Added.
* Modules/applepay/ApplePayPaymentContact.idl: Added.
* Modules/applepay/ApplePayPaymentMethod.h: Added.
* Modules/applepay/ApplePayPaymentMethod.idl: Added.
* Modules/applepay/ApplePayPaymentPass.h: Added.
* Modules/applepay/ApplePayPaymentPass.idl: Added.
* Modules/applepay/ApplePayPaymentRequest.h: Added.
* Modules/applepay/ApplePayPaymentRequest.idl: Added.
* Modules/applepay/ApplePayShippingMethod.h: Added.
* Modules/applepay/ApplePayShippingMethod.idl: Added.
Split out dictionaries and enums into separate files where needed.

* Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
(WebCore::ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent):
* Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
* Modules/applepay/ApplePayPaymentAuthorizedEvent.idl:
Convert the 'payment' property to return an ApplePayPayment dictionary, removing
the need for custom bindings.

* Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
(WebCore::ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent):
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl:
Convert the 'paymentMethod' property to return an ApplePayPaymentMethod dictionary, removing
the need for custom bindings.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::ApplePaySession):
(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
(WebCore::ApplePaySession::didSelectShippingMethod):
* Modules/applepay/ApplePaySession.h:
Update for new names, remove need for ExecState in the create function, and simplify
billingContact and shippingContact now that they are strongly typed.

* Modules/applepay/ApplePaySession.idl:
Move dictionaries and enums to their own files.

* Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
(WebCore::ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent):
* Modules/applepay/ApplePayShippingContactSelectedEvent.h:
* Modules/applepay/ApplePayShippingContactSelectedEvent.idl:
Convert the 'shippingContact' property to return an ApplePayPaymentContact dictionary, removing
the need for custom bindings.

* Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.idl:
Convert the 'shippingMethod' property to return an ApplePayShippingMethod dictionary, removing
the need for custom bindings.

* Modules/applepay/Payment.h:
* Modules/applepay/PaymentContact.h:
* Modules/applepay/PaymentMethod.h:
* Modules/applepay/cocoa/PaymentCocoa.mm:
* Modules/applepay/cocoa/PaymentContactCocoa.mm:
* Modules/applepay/cocoa/PaymentMethodCocoa.mm:
Replace toJS/fromJS functions with ones that convert to/from the associated dictionary type.

* bindings/generic/IDLTypes.h:
(WebCore::IDLJSON::nullValue):
(WebCore::IDLJSON::isNullValue):
(WebCore::IDLJSON::extractValueFromNullable):
* bindings/js/JSDOMConvert.h:
(WebCore::Converter&lt;IDLJSON&gt;::convert):
(WebCore::JSConverter&lt;IDLJSON&gt;::convert):
Add a new custom type, JSON, which converts from a String to a JS object.

* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorJS.pm:
Add support for the new JSON type, and improve scoped naming to allow for enums
in dictionary only IDL files.

* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
Update test result for improved scoped naming.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentAuthorizedEventcpp">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentAuthorizedEventh">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentAuthorizedEventidl">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentMethodSelectedEventcpp">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentMethodSelectedEventh">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentMethodSelectedEventidl">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePaySessioncpp">trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePaySessionh">trunk/Source/WebCore/Modules/applepay/ApplePaySession.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePaySessionidl">trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingContactSelectedEventcpp">trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingContactSelectedEventh">trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingContactSelectedEventidl">trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingMethodSelectedEventcpp">trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingMethodSelectedEventh">trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingMethodSelectedEventidl">trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayPaymenth">trunk/Source/WebCore/Modules/applepay/Payment.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayPaymentContacth">trunk/Source/WebCore/Modules/applepay/PaymentContact.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayPaymentMethodh">trunk/Source/WebCore/Modules/applepay/PaymentMethod.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepaycocoaPaymentCocoamm">trunk/Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepaycocoaPaymentContactCocoamm">trunk/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepaycocoaPaymentMethodCocoamm">trunk/Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaTrackConstraintsidl">trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericIDLTypesh">trunk/Source/WebCore/bindings/generic/IDLTypes.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorpm">trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayLineItemh">trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayLineItemidl">trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymenth">trunk/Source/WebCore/Modules/applepay/ApplePayPayment.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentidl">trunk/Source/WebCore/Modules/applepay/ApplePayPayment.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentContacth">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentContactidl">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentMethodh">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentMethodidl">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentPassh">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentPassidl">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentRequesth">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayPaymentRequestidl">trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingMethodh">trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.h</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayShippingMethodidl">trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.idl</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSApplePayPaymentAuthorizedEventCustomcpp">trunk/Source/WebCore/bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSApplePayPaymentMethodSelectedEventCustomcpp">trunk/Source/WebCore/bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSApplePayShippingContactSelectedEventCustomcpp">trunk/Source/WebCore/bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSApplePayShippingMethodSelectedEventCustomcpp">trunk/Source/WebCore/bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/ChangeLog        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -1,3 +1,105 @@
</span><ins>+2016-12-14  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [ApplePay] Remove remaining custom bindings from the ApplePay code
+        https://bugs.webkit.org/show_bug.cgi?id=165860
+
+        Reviewed by Darin Adler.
+
+        * DerivedSources.make:
+        Add new IDL files.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        Add/remove files.
+
+        * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Removed.
+        * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Removed.
+        * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Removed.
+        * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Removed.
+        Remove custom bindings.
+
+        * Modules/applepay/ApplePayLineItem.h: Added.
+        * Modules/applepay/ApplePayLineItem.idl: Added.
+        * Modules/applepay/ApplePayPayment.h: Added.
+        * Modules/applepay/ApplePayPayment.idl: Added.
+        * Modules/applepay/ApplePayPaymentContact.h: Added.
+        * Modules/applepay/ApplePayPaymentContact.idl: Added.
+        * Modules/applepay/ApplePayPaymentMethod.h: Added.
+        * Modules/applepay/ApplePayPaymentMethod.idl: Added.
+        * Modules/applepay/ApplePayPaymentPass.h: Added.
+        * Modules/applepay/ApplePayPaymentPass.idl: Added.
+        * Modules/applepay/ApplePayPaymentRequest.h: Added.
+        * Modules/applepay/ApplePayPaymentRequest.idl: Added.
+        * Modules/applepay/ApplePayShippingMethod.h: Added.
+        * Modules/applepay/ApplePayShippingMethod.idl: Added.
+        Split out dictionaries and enums into separate files where needed.
+
+        * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
+        (WebCore::ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent):
+        * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
+        * Modules/applepay/ApplePayPaymentAuthorizedEvent.idl:
+        Convert the 'payment' property to return an ApplePayPayment dictionary, removing
+        the need for custom bindings.
+
+        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
+        (WebCore::ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent):
+        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
+        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl:
+        Convert the 'paymentMethod' property to return an ApplePayPaymentMethod dictionary, removing
+        the need for custom bindings.
+
+        * Modules/applepay/ApplePaySession.cpp:
+        (WebCore::convertAndValidate):
+        (WebCore::ApplePaySession::create):
+        (WebCore::ApplePaySession::ApplePaySession):
+        (WebCore::ApplePaySession::completeShippingMethodSelection):
+        (WebCore::ApplePaySession::completeShippingContactSelection):
+        (WebCore::ApplePaySession::completePaymentMethodSelection):
+        (WebCore::ApplePaySession::didSelectShippingMethod):
+        * Modules/applepay/ApplePaySession.h:
+        Update for new names, remove need for ExecState in the create function, and simplify
+        billingContact and shippingContact now that they are strongly typed.
+
+        * Modules/applepay/ApplePaySession.idl:
+        Move dictionaries and enums to their own files.
+
+        * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
+        (WebCore::ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent):
+        * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
+        * Modules/applepay/ApplePayShippingContactSelectedEvent.idl:
+        Convert the 'shippingContact' property to return an ApplePayPaymentContact dictionary, removing
+        the need for custom bindings.
+
+        * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
+        * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
+        * Modules/applepay/ApplePayShippingMethodSelectedEvent.idl:
+        Convert the 'shippingMethod' property to return an ApplePayShippingMethod dictionary, removing
+        the need for custom bindings.
+
+        * Modules/applepay/Payment.h:
+        * Modules/applepay/PaymentContact.h:
+        * Modules/applepay/PaymentMethod.h:
+        * Modules/applepay/cocoa/PaymentCocoa.mm:
+        * Modules/applepay/cocoa/PaymentContactCocoa.mm:
+        * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
+        Replace toJS/fromJS functions with ones that convert to/from the associated dictionary type.
+
+        * bindings/generic/IDLTypes.h:
+        (WebCore::IDLJSON::nullValue):
+        (WebCore::IDLJSON::isNullValue):
+        (WebCore::IDLJSON::extractValueFromNullable):
+        * bindings/js/JSDOMConvert.h:
+        (WebCore::Converter&lt;IDLJSON&gt;::convert):
+        (WebCore::JSConverter&lt;IDLJSON&gt;::convert):
+        Add a new custom type, JSON, which converts from a String to a JS object.
+
+        * bindings/scripts/CodeGenerator.pm:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        Add support for the new JSON type, and improve scoped naming to allow for enums
+        in dictionary only IDL files.
+
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
+        Update test result for improved scoped naming.
+
</ins><span class="cx"> 2016-12-16  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Defer certain accessibility callbacks until after layout is finished.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/DerivedSources.make        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -79,10 +79,17 @@
</span><span class="cx"> 
</span><span class="cx"> JS_BINDING_IDLS = \
</span><span class="cx">     $(WebCore)/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl \
</span><ins>+    $(WebCore)/Modules/applepay/ApplePayLineItem.idl \
+    $(WebCore)/Modules/applepay/ApplePayPayment.idl \
</ins><span class="cx">     $(WebCore)/Modules/applepay/ApplePayPaymentAuthorizedEvent.idl \
</span><ins>+    $(WebCore)/Modules/applepay/ApplePayPaymentContact.idl \
+    $(WebCore)/Modules/applepay/ApplePayPaymentMethod.idl \
</ins><span class="cx">     $(WebCore)/Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl \
</span><ins>+    $(WebCore)/Modules/applepay/ApplePayPaymentPass.idl \
+    $(WebCore)/Modules/applepay/ApplePayPaymentRequest.idl \
</ins><span class="cx">     $(WebCore)/Modules/applepay/ApplePaySession.idl \
</span><span class="cx">     $(WebCore)/Modules/applepay/ApplePayShippingContactSelectedEvent.idl \
</span><ins>+    $(WebCore)/Modules/applepay/ApplePayShippingMethod.idl \
</ins><span class="cx">     $(WebCore)/Modules/applepay/ApplePayShippingMethodSelectedEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/applepay/ApplePayValidateMerchantEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/encryptedmedia/MediaKeyMessageEvent.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayLineItemh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &quot;PaymentRequest.h&quot;
+
+namespace WebCore {
+
+struct ApplePayLineItem {
+    using Type = PaymentRequest::LineItem::Type;
+
+    Type type { Type::Final };
+    String label;
+    String amount;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayLineItemidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayLineItem.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+] enum ApplePayLineItemType {
+    &quot;pending&quot;,
+    &quot;final&quot;
+};
+
+[
+    Conditional=APPLE_PAY,
+] dictionary ApplePayLineItem {
+    ApplePayLineItemType type = &quot;final&quot;;
+    DOMString label;
+    DOMString amount;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymenth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPayment.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPayment.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPayment.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &quot;ApplePayPaymentContact.h&quot;
+#include &quot;ApplePayPaymentMethod.h&quot;
+
+namespace WebCore {
+
+struct ApplePayPayment {
+    struct Token {
+        ApplePayPaymentMethod paymentMethod;
+        String transactionIdentifier;
+        String paymentData;
+    };
+
+    Token token;
+    std::optional&lt;ApplePayPaymentContact&gt; billingContact;
+    std::optional&lt;ApplePayPaymentContact&gt; shippingContact;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPayment.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPayment.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPayment.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+    JSGenerateToJSObject
+] dictionary ApplePayPayment {
+    required ApplePayPaymentToken token;
+    ApplePayPaymentContact billingContact;
+    ApplePayPaymentContact shippingContact;
+};
+
+[
+    Conditional=APPLE_PAY,
+    JSGenerateToJSObject
+] dictionary ApplePayPaymentToken {
+    required ApplePayPaymentMethod paymentMethod;
+    DOMString transactionIdentifier;
+    JSON paymentData;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentAuthorizedEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,11 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;Payment.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent(const AtomicString&amp; type, const Payment&amp; payment)
</span><span class="cx">     : Event(type, false, false)
</span><del>-    , m_payment(payment)
</del><ins>+    , m_payment(payment.toApplePayPayment())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentAuthorizedEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,11 +27,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;ApplePayPayment.h&quot;
</ins><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;Payment.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class Payment;
+
</ins><span class="cx"> class ApplePayPaymentAuthorizedEvent final : public Event {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;ApplePayPaymentAuthorizedEvent&gt; create(const AtomicString&amp; type, const Payment&amp; payment)
</span><span class="lines">@@ -41,7 +43,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~ApplePayPaymentAuthorizedEvent();
</span><span class="cx"> 
</span><del>-    const Payment&amp; payment() const { return m_payment; }
</del><ins>+    const ApplePayPayment&amp; payment() const { return m_payment; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     ApplePayPaymentAuthorizedEvent(const AtomicString&amp; type, const Payment&amp;);
</span><span class="lines">@@ -49,7 +51,7 @@
</span><span class="cx">     // Event.
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="cx"> 
</span><del>-    const Payment m_payment;
</del><ins>+    const ApplePayPayment m_payment;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentAuthorizedEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.idl (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.idl        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,5 +27,5 @@
</span><span class="cx">     Conditional=APPLE_PAY,
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx"> ] interface ApplePayPaymentAuthorizedEvent : Event {
</span><del>-    [CachedAttribute, CustomGetter] readonly attribute Object payment;
</del><ins>+    [CachedAttribute] readonly attribute ApplePayPayment payment;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentContacth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &lt;wtf/Optional.h&gt;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+struct ApplePayPaymentContact {
+    String phoneNumber;
+    String emailAddress;
+    String givenName;
+    String familyName;
+    std::optional&lt;Vector&lt;String&gt;&gt; addressLines;
+    String locality;
+    String postalCode;
+    String administrativeArea;
+    String country;
+    String countryCode;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentContactidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentContact.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+    JSGenerateToJSObject
+] dictionary ApplePayPaymentContact {
+    DOMString phoneNumber;
+    DOMString emailAddress;
+    DOMString givenName;
+    DOMString familyName;
+    sequence&lt;DOMString&gt; addressLines;
+    DOMString locality;
+    DOMString postalCode;
+    DOMString administrativeArea;
+    DOMString country;
+    DOMString countryCode;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentMethodh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &quot;ApplePayPaymentPass.h&quot;
+#include &lt;wtf/Optional.h&gt;
+
+namespace WebCore {
+
+enum class ApplePayPaymentMethodType { Debit, Credit, Prepaid, Store };
+
+struct ApplePayPaymentMethod {    
+    using Type = ApplePayPaymentMethodType;
+    
+    String displayName;
+    String network;
+    std::optional&lt;Type&gt; type;
+    std::optional&lt;ApplePayPaymentPass&gt; paymentPass;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentMethodidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+] enum ApplePayPaymentMethodType { 
+    &quot;debit&quot;, 
+    &quot;credit&quot;,
+    &quot;prepaid&quot;,
+    &quot;store&quot; 
+};
+
+[
+    Conditional=APPLE_PAY,
+    JSGenerateToJSObject
+] dictionary ApplePayPaymentMethod {
+    DOMString displayName;
+    DOMString network;
+    ApplePayPaymentMethodType type;
+    ApplePayPaymentPass paymentPass;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentMethodSelectedEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent(const AtomicString&amp; type, const PaymentMethod&amp; paymentMethod)
</span><span class="cx">     : Event(type, false, false)
</span><del>-    , m_paymentMethod(paymentMethod)
</del><ins>+    , m_paymentMethod(paymentMethod.toApplePayPaymentMethod())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentMethodSelectedEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,8 +27,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;ApplePayPaymentMethod.h&quot;
</ins><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;PaymentMethod.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~ApplePayPaymentMethodSelectedEvent();
</span><span class="cx"> 
</span><del>-    const PaymentMethod&amp; paymentMethod() { return m_paymentMethod; }
</del><ins>+    const ApplePayPaymentMethod&amp; paymentMethod() { return m_paymentMethod; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     ApplePayPaymentMethodSelectedEvent(const AtomicString&amp; type, const PaymentMethod&amp;);
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     // Event.
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="cx"> 
</span><del>-    const PaymentMethod m_paymentMethod;
</del><ins>+    const ApplePayPaymentMethod m_paymentMethod;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentMethodSelectedEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,5 +27,5 @@
</span><span class="cx">     Conditional=APPLE_PAY,
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx"> ] interface ApplePayPaymentMethodSelectedEvent : Event {
</span><del>-    [CachedAttribute, CustomGetter] readonly attribute Object paymentMethod;
</del><ins>+    [CachedAttribute] readonly attribute ApplePayPaymentMethod paymentMethod;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentPassh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+struct ApplePayPaymentPass {
+    enum class ActivationState { Activated, RequiresActivation, Activating, Suspended, Deactivated };
+    
+    String primaryAccountIdentifier;
+    String primaryAccountNumberSuffix;
+    String deviceAccountIdentifier;
+    String deviceAccountNumberSuffix;
+    ActivationState activationState;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentPassidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentPass.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+] enum ApplePayPaymentPassActivationState { 
+    &quot;activated&quot;,
+    &quot;requiresActivation&quot;,
+    &quot;activating&quot;,
+    &quot;suspended&quot;,
+    &quot;deactivated&quot; 
+};
+
+[
+    Conditional=APPLE_PAY,
+    JSGenerateToJSObject
+] dictionary ApplePayPaymentPass {
+    required DOMString primaryAccountIdentifier;
+    required DOMString primaryAccountNumberSuffix;
+    DOMString deviceAccountIdentifier;
+    DOMString deviceAccountNumberSuffix;
+    required ApplePayPaymentPassActivationState activationState;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentRequesth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &quot;ApplePayLineItem.h&quot;
+#include &quot;ApplePayPaymentContact.h&quot;
+#include &quot;ApplePayShippingMethod.h&quot;
+#include &quot;PaymentRequest.h&quot;
+#include &lt;heap/Strong.h&gt;
+
+namespace WebCore {
+
+struct ApplePayPaymentRequest {
+    enum class MerchantCapability { Supports3DS, SupportsEMV, SupportsCredit, SupportsDebit };
+    enum class ContactField { Email, Name, Phone, PostalAddress };
+
+    using ShippingType = PaymentRequest::ShippingType;
+
+    Vector&lt;MerchantCapability&gt; merchantCapabilities;
+    Vector&lt;String&gt; supportedNetworks;
+    String countryCode;
+    String currencyCode;
+
+    std::optional&lt;Vector&lt;ContactField&gt;&gt; requiredBillingContactFields;
+    std::optional&lt;ApplePayPaymentContact&gt; billingContact;
+
+    std::optional&lt;Vector&lt;ContactField&gt;&gt;  requiredShippingContactFields;
+    std::optional&lt;ApplePayPaymentContact&gt; shippingContact;
+
+    ShippingType shippingType { ShippingType::Shipping };
+    std::optional&lt;Vector&lt;ApplePayShippingMethod&gt;&gt; shippingMethods;
+
+    ApplePayLineItem total;
+    Vector&lt;ApplePayLineItem&gt; lineItems;
+
+    String applicationData;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayPaymentRequestidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentRequest.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+] enum ApplePayMerchantCapability {
+    &quot;supports3DS&quot;,
+    &quot;supportsEMV&quot;,
+    &quot;supportsCredit&quot;,
+    &quot;supportsDebit&quot;
+};
+
+[
+    Conditional=APPLE_PAY,
+] enum ApplePayContactField {
+    &quot;email&quot;,
+    &quot;name&quot;,
+    &quot;phone&quot;,
+    &quot;postalAddress&quot;
+};
+
+[
+    Conditional=APPLE_PAY,
+] enum ApplePayShippingType {
+    &quot;shipping&quot;,
+    &quot;delivery&quot;,
+    &quot;storePickup&quot;,
+    &quot;servicePickup&quot;
+};
+
+[
+    Conditional=APPLE_PAY,
+] dictionary ApplePayPaymentRequest {
+    required ApplePayLineItem total;
+    sequence&lt;ApplePayLineItem&gt; lineItems;
+
+    required sequence&lt;ApplePayMerchantCapability&gt; merchantCapabilities;
+    required sequence&lt;DOMString&gt; supportedNetworks; // FIXME: Should this be an sequence of enums?
+    required DOMString countryCode;
+    required DOMString currencyCode;
+
+    sequence&lt;ApplePayContactField&gt; requiredBillingContactFields;
+    ApplePayPaymentContact billingContact;
+
+    sequence&lt;ApplePayContactField&gt; requiredShippingContactFields;
+    ApplePayPaymentContact shippingContact;
+
+    ApplePayShippingType shippingType = &quot;shipping&quot;;
+    sequence&lt;ApplePayShippingMethod&gt; shippingMethods;
+
+    DOMString applicationData;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePaySessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,9 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;ApplePayLineItem.h&quot;
</ins><span class="cx"> #include &quot;ApplePayPaymentAuthorizedEvent.h&quot;
</span><span class="cx"> #include &quot;ApplePayPaymentMethodSelectedEvent.h&quot;
</span><ins>+#include &quot;ApplePayPaymentRequest.h&quot;
</ins><span class="cx"> #include &quot;ApplePayShippingContactSelectedEvent.h&quot;
</span><ins>+#include &quot;ApplePayShippingMethod.h&quot;
</ins><span class="cx"> #include &quot;ApplePayShippingMethodSelectedEvent.h&quot;
</span><span class="cx"> #include &quot;ApplePayValidateMerchantEvent.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="lines">@@ -159,7 +162,7 @@
</span><span class="cx">     return amount;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;PaymentRequest::LineItem&gt; convertAndValidate(ApplePaySession::LineItem&amp;&amp; lineItem)
</del><ins>+static ExceptionOr&lt;PaymentRequest::LineItem&gt; convertAndValidate(ApplePayLineItem&amp;&amp; lineItem)
</ins><span class="cx"> {
</span><span class="cx">     auto amount = parseAmount(lineItem.amount);
</span><span class="cx">     if (!amount)
</span><span class="lines">@@ -173,7 +176,7 @@
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;Vector&lt;PaymentRequest::LineItem&gt;&gt; convertAndValidate(Vector&lt;ApplePaySession::LineItem&gt;&amp;&amp; lineItems)
</del><ins>+static ExceptionOr&lt;Vector&lt;PaymentRequest::LineItem&gt;&gt; convertAndValidate(Vector&lt;ApplePayLineItem&gt;&amp;&amp; lineItems)
</ins><span class="cx"> {
</span><span class="cx">     Vector&lt;PaymentRequest::LineItem&gt; result;
</span><span class="cx">     result.reserveInitialCapacity(lineItems.size());
</span><span class="lines">@@ -188,7 +191,7 @@
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;PaymentRequest::MerchantCapabilities&gt; convertAndValidate(Vector&lt;ApplePaySession::MerchantCapability&gt;&amp;&amp; merchantCapabilities)
</del><ins>+static ExceptionOr&lt;PaymentRequest::MerchantCapabilities&gt; convertAndValidate(Vector&lt;ApplePayPaymentRequest::MerchantCapability&gt;&amp;&amp; merchantCapabilities)
</ins><span class="cx"> {
</span><span class="cx">     if (merchantCapabilities.isEmpty())
</span><span class="cx">         return Exception { TypeError, &quot;At least one merchant capability must be provided.&quot; };
</span><span class="lines">@@ -197,16 +200,16 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; merchantCapability : merchantCapabilities) {
</span><span class="cx">         switch (merchantCapability) {
</span><del>-        case ApplePaySession::MerchantCapability::Supports3DS:
</del><ins>+        case ApplePayPaymentRequest::MerchantCapability::Supports3DS:
</ins><span class="cx">             result.supports3DS = true;
</span><span class="cx">             break;
</span><del>-        case ApplePaySession::MerchantCapability::SupportsEMV:
</del><ins>+        case ApplePayPaymentRequest::MerchantCapability::SupportsEMV:
</ins><span class="cx">             result.supportsEMV = true;
</span><span class="cx">             break;
</span><del>-        case ApplePaySession::MerchantCapability::SupportsCredit:
</del><ins>+        case ApplePayPaymentRequest::MerchantCapability::SupportsCredit:
</ins><span class="cx">             result.supportsCredit = true;
</span><span class="cx">             break;
</span><del>-        case ApplePaySession::MerchantCapability::SupportsDebit:
</del><ins>+        case ApplePayPaymentRequest::MerchantCapability::SupportsDebit:
</ins><span class="cx">             result.supportsDebit = true;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -228,7 +231,7 @@
</span><span class="cx">     return WTFMove(supportedNetworks);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;PaymentRequest::ContactFields&gt; convertAndValidate(Vector&lt;ApplePaySession::ContactField&gt;&amp;&amp; contactFields)
</del><ins>+static ExceptionOr&lt;PaymentRequest::ContactFields&gt; convertAndValidate(Vector&lt;ApplePayPaymentRequest::ContactField&gt;&amp;&amp; contactFields)
</ins><span class="cx"> {
</span><span class="cx">     if (contactFields.isEmpty())
</span><span class="cx">         return Exception { TypeError, &quot;At least one contact field must be provided.&quot; };
</span><span class="lines">@@ -237,16 +240,16 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; contactField : contactFields) {
</span><span class="cx">         switch (contactField) {
</span><del>-        case ApplePaySession::ContactField::Email:
</del><ins>+        case ApplePayPaymentRequest::ContactField::Email:
</ins><span class="cx">             result.email = true;
</span><span class="cx">             break;
</span><del>-        case ApplePaySession::ContactField::Name:
</del><ins>+        case ApplePayPaymentRequest::ContactField::Name:
</ins><span class="cx">             result.name = true;
</span><span class="cx">             break;
</span><del>-        case ApplePaySession::ContactField::Phone:
</del><ins>+        case ApplePayPaymentRequest::ContactField::Phone:
</ins><span class="cx">             result.phone = true;
</span><span class="cx">             break;
</span><del>-        case ApplePaySession::ContactField::PostalAddress:
</del><ins>+        case ApplePayPaymentRequest::ContactField::PostalAddress:
</ins><span class="cx">             result.postalAddress = true;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -255,7 +258,7 @@
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;PaymentRequest::ShippingMethod&gt; convertAndValidate(ApplePaySession::ShippingMethod&amp;&amp; shippingMethod)
</del><ins>+static ExceptionOr&lt;PaymentRequest::ShippingMethod&gt; convertAndValidate(ApplePayShippingMethod&amp;&amp; shippingMethod)
</ins><span class="cx"> {
</span><span class="cx">     auto amount = parseAmount(shippingMethod.amount);
</span><span class="cx">     if (!amount)
</span><span class="lines">@@ -270,7 +273,7 @@
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;Vector&lt;PaymentRequest::ShippingMethod&gt;&gt; convertAndValidate(Vector&lt;ApplePaySession::ShippingMethod&gt;&amp;&amp; shippingMethods)
</del><ins>+static ExceptionOr&lt;Vector&lt;PaymentRequest::ShippingMethod&gt;&gt; convertAndValidate(Vector&lt;ApplePayShippingMethod&gt;&amp;&amp; shippingMethods)
</ins><span class="cx"> {
</span><span class="cx">     if (shippingMethods.isEmpty())
</span><span class="cx">         return Exception { TypeError, &quot;At least one shipping method must be provided.&quot; };
</span><span class="lines">@@ -288,7 +291,7 @@
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ExceptionOr&lt;PaymentRequest&gt; convertAndValidate(JSC::ExecState&amp; state, unsigned version, ApplePaySession::PaymentRequest&amp;&amp; paymentRequest)
</del><ins>+static ExceptionOr&lt;PaymentRequest&gt; convertAndValidate(unsigned version, ApplePayPaymentRequest&amp;&amp; paymentRequest)
</ins><span class="cx"> {
</span><span class="cx">     PaymentRequest result;
</span><span class="cx"> 
</span><span class="lines">@@ -323,15 +326,9 @@
</span><span class="cx">         result.setRequiredBillingContactFields(requiredBillingContactFields.releaseReturnValue());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (paymentRequest.billingContact) {
-        String errorMessage;
-        auto billingContact = PaymentContact::fromJS(state, paymentRequest.billingContact.get(), errorMessage);
-        if (!billingContact)
-            return Exception { TypeError, WTFMove(errorMessage) };
</del><ins>+    if (paymentRequest.billingContact)
+        result.setBillingContact(PaymentContact::fromApplePayPaymentContact(paymentRequest.billingContact.value()));
</ins><span class="cx"> 
</span><del>-        result.setBillingContact(*billingContact);
-    }
-
</del><span class="cx">     if (paymentRequest.requiredShippingContactFields) {
</span><span class="cx">         auto requiredShippingContactFields = convertAndValidate(WTFMove(*paymentRequest.requiredShippingContactFields));
</span><span class="cx">         if (requiredShippingContactFields.hasException())
</span><span class="lines">@@ -339,15 +336,9 @@
</span><span class="cx">         result.setRequiredShippingContactFields(requiredShippingContactFields.releaseReturnValue());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (paymentRequest.shippingContact) {
-        String errorMessage;
-        auto shippingContact = PaymentContact::fromJS(state, paymentRequest.shippingContact.get(), errorMessage);
-        if (!shippingContact)
-            return Exception { TypeError, WTFMove(errorMessage) };
</del><ins>+    if (paymentRequest.shippingContact)
+        result.setShippingContact(PaymentContact::fromApplePayPaymentContact(paymentRequest.shippingContact.value()));
</ins><span class="cx"> 
</span><del>-        result.setShippingContact(*shippingContact);
-    }
-
</del><span class="cx">     result.setShippingType(paymentRequest.shippingType);
</span><span class="cx"> 
</span><span class="cx">     if (paymentRequest.shippingMethods) {
</span><span class="lines">@@ -402,7 +393,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;Ref&lt;ApplePaySession&gt;&gt; ApplePaySession::create(JSC::ExecState&amp; state, Document&amp; document, unsigned version, ApplePaySession::PaymentRequest&amp;&amp; paymentRequest)
</del><ins>+ExceptionOr&lt;Ref&lt;ApplePaySession&gt;&gt; ApplePaySession::create(Document&amp; document, unsigned version, ApplePayPaymentRequest&amp;&amp; paymentRequest)
</ins><span class="cx"> {
</span><span class="cx">     auto canCall = canCallApplePaySessionAPIs(document);
</span><span class="cx">     if (canCall.hasException())
</span><span class="lines">@@ -416,7 +407,7 @@
</span><span class="cx">     if (!version || !paymentCoordinator.supportsVersion(version))
</span><span class="cx">         return Exception { INVALID_ACCESS_ERR, makeString(&quot;\&quot;&quot; + String::number(version), &quot;\&quot; is not a supported version.&quot;) };
</span><span class="cx"> 
</span><del>-    auto convertedPaymentRequest = convertAndValidate(state, version, WTFMove(paymentRequest));
</del><ins>+    auto convertedPaymentRequest = convertAndValidate(version, WTFMove(paymentRequest));
</ins><span class="cx">     if (convertedPaymentRequest.hasException())
</span><span class="cx">         return convertedPaymentRequest.releaseException();
</span><span class="cx"> 
</span><span class="lines">@@ -423,7 +414,7 @@
</span><span class="cx">     return adoptRef(*new ApplePaySession(document, convertedPaymentRequest.releaseReturnValue()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ApplePaySession::ApplePaySession(Document&amp; document, WebCore::PaymentRequest&amp;&amp; paymentRequest)
</del><ins>+ApplePaySession::ApplePaySession(Document&amp; document, PaymentRequest&amp;&amp; paymentRequest)
</ins><span class="cx">     : ActiveDOMObject(&amp;document)
</span><span class="cx">     , m_paymentRequest(WTFMove(paymentRequest))
</span><span class="cx"> {
</span><span class="lines">@@ -609,7 +600,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;void&gt; ApplePaySession::completeShippingMethodSelection(unsigned short status, LineItem&amp;&amp; newTotal, Vector&lt;LineItem&gt;&amp;&amp; newLineItems)
</del><ins>+ExceptionOr&lt;void&gt; ApplePaySession::completeShippingMethodSelection(unsigned short status, ApplePayLineItem&amp;&amp; newTotal, Vector&lt;ApplePayLineItem&gt;&amp;&amp; newLineItems)
</ins><span class="cx"> {
</span><span class="cx">     if (!canCompleteShippingMethodSelection())
</span><span class="cx">         return Exception { INVALID_ACCESS_ERR };
</span><span class="lines">@@ -622,7 +613,7 @@
</span><span class="cx">     if (convertedNewTotal.hasException())
</span><span class="cx">         return convertedNewTotal.releaseException();
</span><span class="cx"> 
</span><del>-    WebCore::PaymentRequest::TotalAndLineItems totalAndLineItems;
</del><ins>+    PaymentRequest::TotalAndLineItems totalAndLineItems;
</ins><span class="cx">     totalAndLineItems.total = convertedNewTotal.releaseReturnValue();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Merge this validation into the validation we are doing above.
</span><span class="lines">@@ -642,7 +633,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;void&gt; ApplePaySession::completeShippingContactSelection(unsigned short status, Vector&lt;ShippingMethod&gt;&amp;&amp; newShippingMethods, LineItem&amp;&amp; newTotal, Vector&lt;LineItem&gt;&amp;&amp; newLineItems)
</del><ins>+ExceptionOr&lt;void&gt; ApplePaySession::completeShippingContactSelection(unsigned short status, Vector&lt;ApplePayShippingMethod&gt;&amp;&amp; newShippingMethods, ApplePayLineItem&amp;&amp; newTotal, Vector&lt;ApplePayLineItem&gt;&amp;&amp; newLineItems)
</ins><span class="cx"> {
</span><span class="cx">     if (!canCompleteShippingContactSelection())
</span><span class="cx">         return Exception { INVALID_ACCESS_ERR };
</span><span class="lines">@@ -659,7 +650,7 @@
</span><span class="cx">     if (convertedNewTotal.hasException())
</span><span class="cx">         return convertedNewTotal.releaseException();
</span><span class="cx"> 
</span><del>-    WebCore::PaymentRequest::TotalAndLineItems totalAndLineItems;
</del><ins>+    PaymentRequest::TotalAndLineItems totalAndLineItems;
</ins><span class="cx">     totalAndLineItems.total = convertedNewTotal.releaseReturnValue();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Merge this validation into the validation we are doing above.
</span><span class="lines">@@ -679,7 +670,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;void&gt; ApplePaySession::completePaymentMethodSelection(LineItem&amp;&amp; newTotal, Vector&lt;LineItem&gt;&amp;&amp; newLineItems)
</del><ins>+ExceptionOr&lt;void&gt; ApplePaySession::completePaymentMethodSelection(ApplePayLineItem&amp;&amp; newTotal, Vector&lt;ApplePayLineItem&gt;&amp;&amp; newLineItems)
</ins><span class="cx"> {
</span><span class="cx">     if (!canCompletePaymentMethodSelection())
</span><span class="cx">         return Exception { INVALID_ACCESS_ERR };
</span><span class="lines">@@ -688,7 +679,7 @@
</span><span class="cx">     if (convertedNewTotal.hasException())
</span><span class="cx">         return convertedNewTotal.releaseException();
</span><span class="cx"> 
</span><del>-    WebCore::PaymentRequest::TotalAndLineItems totalAndLineItems;
</del><ins>+    PaymentRequest::TotalAndLineItems totalAndLineItems;
</ins><span class="cx">     totalAndLineItems.total = convertedNewTotal.releaseReturnValue();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Merge this validation into the validation we are doing above.
</span><span class="lines">@@ -761,7 +752,7 @@
</span><span class="cx">     dispatchEvent(event.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ApplePaySession::didSelectShippingMethod(const WebCore::PaymentRequest::ShippingMethod&amp; shippingMethod)
</del><ins>+void ApplePaySession::didSelectShippingMethod(const PaymentRequest::ShippingMethod&amp; shippingMethod)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_state == State::Active);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePaySessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,10 +28,9 @@
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ActiveDOMObject.h&quot;
</span><ins>+#include &quot;ApplePayPaymentRequest.h&quot;
</ins><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;ExceptionOr.h&quot;
</span><del>-#include &quot;PaymentRequest.h&quot;
-#include &lt;heap/Strong.h&gt;
</del><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -45,52 +44,15 @@
</span><span class="cx"> class PaymentMethod;
</span><span class="cx"> class URL;
</span><span class="cx"> 
</span><ins>+struct ApplePayLineItem;
+struct ApplePayPaymentRequest;
+struct ApplePayShippingMethod;
+
</ins><span class="cx"> class ApplePaySession final : public RefCounted&lt;ApplePaySession&gt;, public ActiveDOMObject, public EventTargetWithInlineData {
</span><span class="cx"> public:
</span><del>-    enum class MerchantCapability { Supports3DS, SupportsEMV, SupportsCredit, SupportsDebit };
-    enum class ContactField { Email, Name, Phone, PostalAddress };
-
-    using ShippingType = WebCore::PaymentRequest::ShippingType;
-    using LineItemType = WebCore::PaymentRequest::LineItem::Type;
-
-    struct ShippingMethod {
-        String label;
-        String detail;
-        String amount;
-        String identifier;
-    };
-
-    struct LineItem {
-        LineItemType type { LineItemType::Final };
-        String label;
-        String amount;
-    };
-
-    struct PaymentRequest {
-        Vector&lt;MerchantCapability&gt; merchantCapabilities;
-        Vector&lt;String&gt; supportedNetworks;
-        String countryCode;
-        String currencyCode;
-
-        std::optional&lt;Vector&lt;ContactField&gt;&gt; requiredBillingContactFields;
-        JSC::Strong&lt;JSC::JSObject&gt; billingContact;
-
-        std::optional&lt;Vector&lt;ContactField&gt;&gt;  requiredShippingContactFields;
-        JSC::Strong&lt;JSC::JSObject&gt; shippingContact;
-
-        ShippingType shippingType { ShippingType::Shipping };
-        std::optional&lt;Vector&lt;ShippingMethod&gt;&gt; shippingMethods;
-
-        LineItem total;
-        Vector&lt;LineItem&gt; lineItems;
-
-        String applicationData;
-    };
-
-    static ExceptionOr&lt;Ref&lt;ApplePaySession&gt;&gt; create(JSC::ExecState&amp;, Document&amp;, unsigned version, PaymentRequest&amp;&amp;);
</del><ins>+    static ExceptionOr&lt;Ref&lt;ApplePaySession&gt;&gt; create(Document&amp;, unsigned version, ApplePayPaymentRequest&amp;&amp;);
</ins><span class="cx">     virtual ~ApplePaySession();
</span><span class="cx"> 
</span><del>-    // DOM API.
</del><span class="cx">     static const unsigned short STATUS_SUCCESS = 0;
</span><span class="cx">     static const unsigned short STATUS_FAILURE = 1;
</span><span class="cx">     static const unsigned short STATUS_INVALID_BILLING_POSTAL_ADDRESS = 2;
</span><span class="lines">@@ -108,16 +70,16 @@
</span><span class="cx">     ExceptionOr&lt;void&gt; begin();
</span><span class="cx">     ExceptionOr&lt;void&gt; abort();
</span><span class="cx">     ExceptionOr&lt;void&gt; completeMerchantValidation(JSC::ExecState&amp;, JSC::JSValue merchantSession);
</span><del>-    ExceptionOr&lt;void&gt; completeShippingMethodSelection(unsigned short status, LineItem&amp;&amp; newTotal, Vector&lt;LineItem&gt;&amp;&amp; newLineItems);
-    ExceptionOr&lt;void&gt; completeShippingContactSelection(unsigned short status, Vector&lt;ShippingMethod&gt;&amp;&amp; newShippingMethods, LineItem&amp;&amp; newTotal, Vector&lt;LineItem&gt;&amp;&amp; newLineItems);
-    ExceptionOr&lt;void&gt; completePaymentMethodSelection(LineItem&amp;&amp; newTotal, Vector&lt;LineItem&gt;&amp;&amp; newLineItems);
</del><ins>+    ExceptionOr&lt;void&gt; completeShippingMethodSelection(unsigned short status, ApplePayLineItem&amp;&amp; newTotal, Vector&lt;ApplePayLineItem&gt;&amp;&amp; newLineItems);
+    ExceptionOr&lt;void&gt; completeShippingContactSelection(unsigned short status, Vector&lt;ApplePayShippingMethod&gt;&amp;&amp; newShippingMethods, ApplePayLineItem&amp;&amp; newTotal, Vector&lt;ApplePayLineItem&gt;&amp;&amp; newLineItems);
+    ExceptionOr&lt;void&gt; completePaymentMethodSelection(ApplePayLineItem&amp;&amp; newTotal, Vector&lt;ApplePayLineItem&gt;&amp;&amp; newLineItems);
</ins><span class="cx">     ExceptionOr&lt;void&gt; completePayment(unsigned short status);
</span><span class="cx"> 
</span><del>-    const WebCore::PaymentRequest&amp; paymentRequest() const { return m_paymentRequest; }
</del><ins>+    const PaymentRequest&amp; paymentRequest() const { return m_paymentRequest; }
</ins><span class="cx"> 
</span><span class="cx">     void validateMerchant(const URL&amp;);
</span><span class="cx">     void didAuthorizePayment(const Payment&amp;);
</span><del>-    void didSelectShippingMethod(const WebCore::PaymentRequest::ShippingMethod&amp;);
</del><ins>+    void didSelectShippingMethod(const PaymentRequest::ShippingMethod&amp;);
</ins><span class="cx">     void didSelectShippingContact(const PaymentContact&amp;);
</span><span class="cx">     void didSelectPaymentMethod(const PaymentMethod&amp;);
</span><span class="cx">     void didCancelPayment();
</span><span class="lines">@@ -126,7 +88,7 @@
</span><span class="cx">     using RefCounted&lt;ApplePaySession&gt;::deref;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    ApplePaySession(Document&amp;, WebCore::PaymentRequest&amp;&amp;);
</del><ins>+    ApplePaySession(Document&amp;, PaymentRequest&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // ActiveDOMObject.
</span><span class="cx">     const char* activeDOMObjectName() const override;
</span><span class="lines">@@ -173,7 +135,7 @@
</span><span class="cx">         ValidationComplete,
</span><span class="cx">     } m_merchantValidationState { MerchantValidationState::Idle };
</span><span class="cx"> 
</span><del>-    const WebCore::PaymentRequest m_paymentRequest;
</del><ins>+    const PaymentRequest m_paymentRequest;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePaySessionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">     ActiveDOMObject,
</span><span class="cx">     Conditional=APPLE_PAY,
</span><span class="cx">     Constructor(unsigned long version, ApplePayPaymentRequest paymentRequest),
</span><del>-    ConstructorCallWith=ScriptState&amp;Document,
</del><ins>+    ConstructorCallWith=Document,
</ins><span class="cx">     ConstructorMayThrowException,
</span><span class="cx">     EnabledBySetting=ApplePay,
</span><span class="cx"> ] interface ApplePaySession : EventTarget {
</span><span class="lines">@@ -60,63 +60,3 @@
</span><span class="cx">     attribute EventHandler onshippingcontactselected;
</span><span class="cx">     attribute EventHandler oncancel;
</span><span class="cx"> };
</span><del>-
-enum ApplePayMerchantCapability {
-    &quot;supports3DS&quot;,
-    &quot;supportsEMV&quot;,
-    &quot;supportsCredit&quot;,
-    &quot;supportsDebit&quot;
-};
-
-enum ApplePayContactField {
-    &quot;email&quot;,
-    &quot;name&quot;,
-    &quot;phone&quot;,
-    &quot;postalAddress&quot;
-};
-
-enum ApplePayShippingType {
-    &quot;shipping&quot;,
-    &quot;delivery&quot;,
-    &quot;storePickup&quot;,
-    &quot;servicePickup&quot;
-};
-
-dictionary ApplePayShippingMethod {
-    required DOMString label;
-    required DOMString detail;
-    required DOMString amount;
-    required DOMString identifier;
-};
-
-enum ApplePayLineItemType {
-    &quot;pending&quot;,
-    &quot;final&quot;
-};
-
-dictionary ApplePayLineItem {
-    ApplePayLineItemType type = &quot;final&quot;;
-    DOMString label;
-    DOMString amount;
-};
-
-dictionary ApplePayPaymentRequest {
-    required ApplePayLineItem total;
-    sequence&lt;ApplePayLineItem&gt; lineItems;
-
-    required sequence&lt;ApplePayMerchantCapability&gt; merchantCapabilities;
-    required sequence&lt;DOMString&gt; supportedNetworks; // FIXME: Should this be an sequence of enums?
-    required DOMString countryCode;
-    required DOMString currencyCode;
-
-    sequence&lt;ApplePayContactField&gt; requiredBillingContactFields;
-    object billingContact;
-
-    sequence&lt;ApplePayContactField&gt; requiredShippingContactFields;
-    object shippingContact;
-
-    ApplePayShippingType shippingType = &quot;shipping&quot;;
-    sequence&lt;ApplePayShippingMethod&gt; shippingMethods;
-
-    DOMString applicationData;
-};
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingContactSelectedEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,11 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;PaymentContact.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent(const AtomicString&amp; type, const PaymentContact&amp; shippingContact)
</span><span class="cx">     : Event(type, false, false)
</span><del>-    , m_shippingContact(shippingContact)
</del><ins>+    , m_shippingContact(shippingContact.toApplePayPaymentContact())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingContactSelectedEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,11 +27,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;ApplePayPaymentContact.h&quot;
</ins><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;PaymentContact.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class PaymentContact;
+
</ins><span class="cx"> class ApplePayShippingContactSelectedEvent final : public Event {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;ApplePayShippingContactSelectedEvent&gt; create(const AtomicString&amp; type, const PaymentContact&amp; shippingContact)
</span><span class="lines">@@ -41,7 +43,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~ApplePayShippingContactSelectedEvent();
</span><span class="cx"> 
</span><del>-    const PaymentContact&amp; shippingContact() const { return m_shippingContact; }
</del><ins>+    const ApplePayPaymentContact&amp; shippingContact() const { return m_shippingContact; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     ApplePayShippingContactSelectedEvent(const AtomicString&amp; type, const PaymentContact&amp;);
</span><span class="lines">@@ -49,7 +51,7 @@
</span><span class="cx">     // Event.
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="cx"> 
</span><del>-    const PaymentContact m_shippingContact;
</del><ins>+    const ApplePayPaymentContact m_shippingContact;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingContactSelectedEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.idl (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.idl        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,5 +27,5 @@
</span><span class="cx">     Conditional=APPLE_PAY,
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx"> ] interface ApplePayShippingContactSelectedEvent : Event {
</span><del>-    [CachedAttribute, CustomGetter] readonly attribute Object shippingContact;
</del><ins>+    [CachedAttribute] readonly attribute ApplePayPaymentContact shippingContact;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingMethodh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.h (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(APPLE_PAY)
+
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+struct ApplePayShippingMethod {
+    String label;
+    String detail;
+    String amount;
+    String identifier;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingMethodidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.idl (0 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethod.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+[
+    Conditional=APPLE_PAY,
+    JSGenerateToJSObject
+] dictionary ApplePayShippingMethod {
+    required DOMString label;
+    required DOMString detail;
+    required DOMString amount;
+    required DOMString identifier;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingMethodSelectedEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,11 +28,38 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &lt;wtf/text/StringBuilder.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+static inline String convert(int64_t amount)
+{
+    StringBuilder amountString;
+    amountString.appendNumber(amount / 100);
+    amountString.append('.');
+
+    unsigned decimals = amount % 100;
+    if (decimals &lt; 10)
+        amountString.append('0');
+    amountString.appendNumber(decimals);
+
+    return amountString.toString();
+}
+
+static inline ApplePayShippingMethod convert(const PaymentRequest::ShippingMethod&amp; shippingMethod)
+{
+    ApplePayShippingMethod convertedMethod;
+    convertedMethod.label = shippingMethod.label;
+    convertedMethod.detail = shippingMethod.detail;
+    convertedMethod.identifier = shippingMethod.identifier;
+    convertedMethod.amount = convert(shippingMethod.amount);
+
+    return convertedMethod; 
+}
+
</ins><span class="cx"> ApplePayShippingMethodSelectedEvent::ApplePayShippingMethodSelectedEvent(const AtomicString&amp; type, const PaymentRequest::ShippingMethod&amp; shippingMethod)
</span><span class="cx">     : Event(type, false, false)
</span><del>-    , m_shippingMethod(shippingMethod)
</del><ins>+    , m_shippingMethod(convert(shippingMethod))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingMethodSelectedEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include &quot;ApplePayShippingMethod.h&quot;
</ins><span class="cx"> #include &quot;Event.h&quot;
</span><span class="cx"> #include &quot;PaymentRequest.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -41,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~ApplePayShippingMethodSelectedEvent();
</span><span class="cx"> 
</span><del>-    const PaymentRequest::ShippingMethod&amp; shippingMethod() const { return m_shippingMethod; }
</del><ins>+    const ApplePayShippingMethod&amp; shippingMethod() const { return m_shippingMethod; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     ApplePayShippingMethodSelectedEvent(const AtomicString&amp; type, const PaymentRequest::ShippingMethod&amp;);
</span><span class="lines">@@ -49,7 +50,7 @@
</span><span class="cx">     // Event.
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="cx"> 
</span><del>-    const PaymentRequest::ShippingMethod m_shippingMethod;
</del><ins>+    const ApplePayShippingMethod m_shippingMethod;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayShippingMethodSelectedEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.idl (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.idl        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -27,5 +27,5 @@
</span><span class="cx">     Conditional=APPLE_PAY,
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx"> ] interface ApplePayShippingMethodSelectedEvent : Event {
</span><del>-    [CachedAttribute, CustomGetter] readonly attribute Object shippingMethod;
</del><ins>+    [CachedAttribute] readonly attribute ApplePayShippingMethod shippingMethod;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayPaymenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/Payment.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/Payment.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/Payment.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -29,15 +29,12 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><del>-namespace JSC {
-class ExecState;
-class JSValue;
-}
-
</del><span class="cx"> OBJC_CLASS PKPayment;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+struct ApplePayPayment;
+
</ins><span class="cx"> class Payment {
</span><span class="cx"> public:
</span><span class="cx">     Payment()
</span><span class="lines">@@ -53,7 +50,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    JSC::JSValue toJS(JSC::ExecState&amp;) const;
</del><ins>+    ApplePayPayment toApplePayPayment() const;
</ins><span class="cx"> 
</span><span class="cx">     PKPayment *pkPayment() const { return m_pkPayment.get(); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayPaymentContacth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/PaymentContact.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/PaymentContact.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/PaymentContact.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -30,16 +30,12 @@
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><del>-namespace JSC {
-class ExecState;
-class JSValue;
-}
-
-OBJC_CLASS NSDictionary;
</del><span class="cx"> OBJC_CLASS PKContact;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+struct ApplePayPaymentContact;
+
</ins><span class="cx"> class PaymentContact {
</span><span class="cx"> public:
</span><span class="cx">     PaymentContact() = default;
</span><span class="lines">@@ -48,8 +44,8 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static std::optional&lt;PaymentContact&gt; fromJS(JSC::ExecState&amp;, JSC::JSValue, String&amp; errorMessage);
-    JSC::JSValue toJS(JSC::ExecState&amp;) const;
</del><ins>+    static PaymentContact fromApplePayPaymentContact(const ApplePayPaymentContact&amp;);
+    ApplePayPaymentContact toApplePayPaymentContact() const;
</ins><span class="cx"> 
</span><span class="cx">     PKContact *pkContact() const { return m_pkContact.get(); }
</span><span class="cx"> 
</span><span class="lines">@@ -57,8 +53,6 @@
</span><span class="cx">     RetainPtr&lt;PKContact&gt; m_pkContact;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-RetainPtr&lt;NSDictionary&gt; toDictionary(PKContact *);
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayPaymentMethodh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/PaymentMethod.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/PaymentMethod.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/PaymentMethod.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -29,16 +29,12 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><del>-namespace JSC {
-class ExecState;
-class JSValue;
-}
-
-OBJC_CLASS NSDictionary;
</del><span class="cx"> OBJC_CLASS PKPaymentMethod;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+struct ApplePayPaymentMethod;
+
</ins><span class="cx"> class PaymentMethod {
</span><span class="cx"> public:
</span><span class="cx">     PaymentMethod()
</span><span class="lines">@@ -50,7 +46,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    JSC::JSValue toJS(JSC::ExecState&amp;) const;
</del><ins>+    ApplePayPaymentMethod toApplePayPaymentMethod() const;
</ins><span class="cx"> 
</span><span class="cx">     PKPaymentMethod *pkPaymentMethod() const { return m_pkPaymentMethod.get(); }
</span><span class="cx"> 
</span><span class="lines">@@ -58,8 +54,6 @@
</span><span class="cx">     RetainPtr&lt;PKPaymentMethod&gt; m_pkPaymentMethod;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-RetainPtr&lt;NSDictionary&gt; toDictionary(PKPaymentMethod *);
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepaycocoaPaymentCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,51 +28,48 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#import &quot;ApplePayPayment.h&quot;
</ins><span class="cx"> #import &quot;PassKitSPI.h&quot;
</span><span class="cx"> #import &quot;PaymentContact.h&quot;
</span><span class="cx"> #import &quot;PaymentMethod.h&quot;
</span><del>-#import &lt;runtime/JSONObject.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static RetainPtr&lt;NSDictionary&gt; toDictionary(PKPaymentToken *paymentToken)
</del><ins>+static ApplePayPayment::Token convert(PKPaymentToken *paymentToken)
</ins><span class="cx"> {
</span><del>-    auto result = adoptNS([[NSMutableDictionary alloc] init]);
</del><ins>+    ASSERT(paymentToken);
</ins><span class="cx"> 
</span><del>-    [result setObject:toDictionary(paymentToken.paymentMethod).get() forKey:@&quot;paymentMethod&quot;];
</del><ins>+    ApplePayPayment::Token result;
</ins><span class="cx"> 
</span><ins>+    result.paymentMethod = PaymentMethod(paymentToken.paymentMethod).toApplePayPaymentMethod();
+
</ins><span class="cx">     if (NSString *transactionIdentifier = paymentToken.transactionIdentifier)
</span><del>-        [result setObject:transactionIdentifier forKey:@&quot;transactionIdentifier&quot;];
</del><ins>+        result.transactionIdentifier = transactionIdentifier;
+    if (NSData *paymentData = paymentToken.paymentData)
+        result.paymentData = String::fromUTF8((const char*)paymentData.bytes, paymentData.length);
</ins><span class="cx"> 
</span><del>-    if (id paymentData = [NSJSONSerialization JSONObjectWithData:paymentToken.paymentData options:0 error:nullptr])
-        [result setObject:paymentData forKey:@&quot;paymentData&quot;];
-
</del><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RetainPtr&lt;NSDictionary&gt; toDictionary(PKPayment *payment)
</del><ins>+static ApplePayPayment convert(PKPayment *payment)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(payment);
</span><span class="cx"> 
</span><del>-    auto result = adoptNS([[NSMutableDictionary alloc] init]);
</del><ins>+    ApplePayPayment result;
</ins><span class="cx"> 
</span><del>-    [result setObject:toDictionary(payment.token).get() forKey:@&quot;token&quot;];
</del><ins>+    result.token = convert(payment.token);
</ins><span class="cx"> 
</span><span class="cx">     if (payment.billingContact)
</span><del>-        [result setObject:toDictionary(payment.billingContact).get() forKey:@&quot;billingContact&quot;];
</del><ins>+        result.billingContact = PaymentContact(payment.billingContact).toApplePayPaymentContact();
</ins><span class="cx">     if (payment.shippingContact)
</span><del>-        [result setObject:toDictionary(payment.shippingContact).get() forKey:@&quot;shippingContact&quot;];
</del><ins>+        result.shippingContact = PaymentContact(payment.shippingContact).toApplePayPaymentContact();
</ins><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue Payment::toJS(JSC::ExecState&amp; exec) const
</del><ins>+ApplePayPayment Payment::toApplePayPayment() const
</ins><span class="cx"> {
</span><del>-    auto dictionary = toDictionary(m_pkPayment.get());
-
-    // FIXME: Don't round-trip using NSString.
-    auto jsonString = adoptNS([[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:dictionary.get() options:0 error:nullptr] encoding:NSUTF8StringEncoding]);
-    return JSONParse(&amp;exec, jsonString.get());
</del><ins>+    return convert(m_pkPayment.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepaycocoaPaymentContactCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,11 +28,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><del>-#import &quot;JSMainThreadExecState.h&quot;
</del><ins>+#import &quot;ApplePayPaymentContact.h&quot;
</ins><span class="cx"> #import &quot;PassKitSPI.h&quot;
</span><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><span class="cx"> #import &lt;Contacts/Contacts.h&gt;
</span><del>-#import &lt;runtime/JSONObject.h&gt;
</del><ins>+#import &lt;wtf/text/StringBuilder.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> SOFT_LINK_FRAMEWORK(Contacts)
</span><span class="cx"> SOFT_LINK_CLASS(Contacts, CNMutablePostalAddress)
</span><span class="lines">@@ -48,55 +48,46 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static bool isValidPaymentContactPropertyName(NSString* propertyName)
</del><ins>+static RetainPtr&lt;PKContact&gt; convert(const ApplePayPaymentContact&amp; contact)
</ins><span class="cx"> {
</span><del>-    static NSSet *validPropertyNames = [[NSSet alloc] initWithObjects:@&quot;familyName&quot;, @&quot;givenName&quot;, @&quot;emailAddress&quot;, @&quot;phoneNumber&quot;, @&quot;addressLines&quot;, @&quot;locality&quot;, @&quot;postalCode&quot;, @&quot;administrativeArea&quot;, @&quot;country&quot;, @&quot;countryCode&quot;, nil ];
-
-    return [validPropertyNames containsObject:propertyName];
-}
-
-static RetainPtr&lt;PKContact&gt; fromDictionary(NSDictionary *dictionary, String&amp; errorMessage)
-{
-    for (NSString *propertyName in dictionary) {
-        if (!isValidPaymentContactPropertyName(propertyName)) {
-            errorMessage = makeString(&quot;\&quot;&quot; + String(propertyName), &quot;\&quot; is not a valid payment contact property name.&quot;);
-            return nullptr;
-        }
-    }
-
</del><span class="cx">     auto result = adoptNS([allocPKContactInstance() init]);
</span><span class="cx"> 
</span><del>-    NSString *familyName = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;familyName&quot;]);
-    NSString *givenName = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;givenName&quot;]);
-
-    if (familyName || givenName) {
</del><ins>+    if (!contact.familyName.isEmpty() || !contact.givenName.isEmpty()) {
</ins><span class="cx">         auto name = adoptNS([[NSPersonNameComponents alloc] init]);
</span><del>-        [name setFamilyName:familyName];
-        [name setGivenName:givenName];
</del><ins>+        [name setFamilyName:contact.familyName];
+        [name setGivenName:contact.givenName];
</ins><span class="cx">         [result setName:name.get()];
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    [result setEmailAddress:dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;emailAddress&quot;])];
</del><ins>+    if (!contact.emailAddress.isEmpty())
+        [result setEmailAddress:contact.emailAddress];
</ins><span class="cx"> 
</span><del>-    if (NSString *phoneNumber = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;phoneNumber&quot;]))
-        [result setPhoneNumber:adoptNS([allocCNPhoneNumberInstance() initWithStringValue:phoneNumber]).get()];
</del><ins>+    if (!contact.phoneNumber.isEmpty())
+        [result setPhoneNumber:adoptNS([allocCNPhoneNumberInstance() initWithStringValue:contact.phoneNumber]).get()];
</ins><span class="cx"> 
</span><del>-    NSArray *addressLines = dynamic_objc_cast&lt;NSArray&gt;(dictionary[@&quot;addressLines&quot;]);
-    if (addressLines.count) {
</del><ins>+    if (contact.addressLines &amp;&amp; !contact.addressLines-&gt;isEmpty()) {
</ins><span class="cx">         auto address = adoptNS([allocCNMutablePostalAddressInstance() init]);
</span><span class="cx"> 
</span><del>-        [address setStreet:[addressLines componentsJoinedByString:@&quot;\n&quot;]];
</del><ins>+        StringBuilder builder;
+        for (unsigned i = 0; i &lt; contact.addressLines-&gt;size(); ++i) {
+            builder.append(contact.addressLines-&gt;at(i));
+            if (i != contact.addressLines-&gt;size() - 1)
+                builder.append('\n');
+        }
+        
+        // FIXME: StringBuilder should hava a toNSString() function to avoid the extra String allocation.
+        [address setStreet:builder.toString()];
</ins><span class="cx"> 
</span><del>-        if (NSString *locality = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;locality&quot;]))
-            [address setCity:locality];
-        if (NSString *postalCode = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;postalCode&quot;]))
-            [address setPostalCode:postalCode];
-        if (NSString *administrativeArea = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;administrativeArea&quot;]))
-            [address setState:administrativeArea];
-        if (NSString *country = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;country&quot;]))
-            [address setCountry:country];
-        if (NSString *countryCode = dynamic_objc_cast&lt;NSString&gt;(dictionary[@&quot;countryCode&quot;]))
-            [address setISOCountryCode:countryCode];
</del><ins>+        if (!contact.locality.isEmpty())
+            [address setCity:contact.locality];
+        if (!contact.postalCode.isEmpty())
+            [address setPostalCode:contact.postalCode];
+        if (!contact.administrativeArea.isEmpty())
+            [address setState:contact.administrativeArea];
+        if (!contact.country.isEmpty())
+            [address setCountry:contact.country];
+        if (!contact.countryCode.isEmpty())
+            [address setISOCountryCode:contact.countryCode];
</ins><span class="cx"> 
</span><span class="cx">         [result setPostalAddress:address.get()];
</span><span class="cx">     }
</span><span class="lines">@@ -104,65 +95,49 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::optional&lt;PaymentContact&gt; PaymentContact::fromJS(JSC::ExecState&amp; state, JSC::JSValue value, String&amp; errorMessage)
</del><ins>+static ApplePayPaymentContact convert(PKContact *contact)
</ins><span class="cx"> {
</span><del>-    // FIXME: Don't round-trip using NSString.
-    auto jsonString = JSONStringify(&amp;state, value, 0);
-    if (!jsonString)
-        return std::nullopt;
-
-    auto dictionary = dynamic_objc_cast&lt;NSDictionary&gt;([NSJSONSerialization JSONObjectWithData:[(NSString *)jsonString dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil]);
-    if (!dictionary || ![dictionary isKindOfClass:[NSDictionary class]])
-        return std::nullopt;
-
-    auto pkContact = fromDictionary(dictionary, errorMessage);
-    if (!pkContact)
-        return std::nullopt;
-
-    return PaymentContact(pkContact.get());
-}
-
-// FIXME: This should use the PassKit SPI.
-RetainPtr&lt;NSDictionary&gt; toDictionary(PKContact *contact)
-{
</del><span class="cx">     ASSERT(contact);
</span><span class="cx"> 
</span><del>-    auto result = adoptNS([[NSMutableDictionary alloc] init]);
</del><ins>+    ApplePayPaymentContact result;
</ins><span class="cx"> 
</span><span class="cx">     if (contact.phoneNumber)
</span><del>-        [result setObject:contact.phoneNumber.stringValue forKey:@&quot;phoneNumber&quot;];
</del><ins>+        result.phoneNumber = contact.phoneNumber.stringValue;
</ins><span class="cx">     if (contact.emailAddress)
</span><del>-        [result setObject:contact.emailAddress forKey:@&quot;emailAddress&quot;];
</del><ins>+        result.emailAddress = contact.emailAddress;
</ins><span class="cx">     if (contact.name.givenName)
</span><del>-        [result setObject:contact.name.givenName forKey:@&quot;givenName&quot;];
</del><ins>+        result.givenName = contact.name.givenName;
</ins><span class="cx">     if (contact.name.familyName)
</span><del>-        [result setObject:contact.name.familyName forKey:@&quot;familyName&quot;];
-    if (contact.postalAddress.street.length)
-        [result setObject:[contact.postalAddress.street componentsSeparatedByString:@&quot;\n&quot;] forKey:@&quot;addressLines&quot;];
</del><ins>+        result.familyName = contact.name.familyName;
+    if (contact.postalAddress.street.length) {
+        Vector&lt;String&gt; addressLines;
+        String(contact.postalAddress.street).split(&quot;\n&quot;, addressLines);
+        result.addressLines = WTFMove(addressLines);
+    }
</ins><span class="cx">     if (contact.postalAddress.city)
</span><del>-        [result setObject:contact.postalAddress.city forKey:@&quot;locality&quot;];
-    if (contact.postalAddress.city)
-        [result setObject:contact.postalAddress.postalCode forKey:@&quot;postalCode&quot;];
-    if (contact.postalAddress.city)
-        [result setObject:contact.postalAddress.state forKey:@&quot;administrativeArea&quot;];
-    if (contact.postalAddress.city)
-        [result setObject:contact.postalAddress.country forKey:@&quot;country&quot;];
-    if (contact.postalAddress.city)
-        [result setObject:contact.postalAddress.ISOCountryCode forKey:@&quot;countryCode&quot;];
</del><ins>+        result.locality = contact.postalAddress.city;
+    if (contact.postalAddress.postalCode)
+        result.postalCode = contact.postalAddress.postalCode;
+    if (contact.postalAddress.state)
+        result.administrativeArea = contact.postalAddress.state;
+    if (contact.postalAddress.country)
+        result.country = contact.postalAddress.country;
+    if (contact.postalAddress.ISOCountryCode)
+        result.countryCode = contact.postalAddress.ISOCountryCode;
</ins><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue PaymentContact::toJS(JSC::ExecState&amp; exec) const
</del><ins>+PaymentContact PaymentContact::fromApplePayPaymentContact(const ApplePayPaymentContact&amp; contact)
</ins><span class="cx"> {
</span><del>-    auto dictionary = toDictionary(m_pkContact.get());
</del><ins>+    return PaymentContact(convert(contact).get());
+}
</ins><span class="cx"> 
</span><del>-    // FIXME: Don't round-trip using NSString.
-    auto jsonString = adoptNS([[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:dictionary.get() options:0 error:nullptr] encoding:NSUTF8StringEncoding]);
-    return JSONParse(&amp;exec, jsonString.get());
</del><ins>+ApplePayPaymentContact PaymentContact::toApplePayPaymentContact() const
+{
+    return convert(m_pkContact.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepaycocoaPaymentMethodCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,88 +28,83 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#import &quot;ApplePayPaymentMethod.h&quot;
</ins><span class="cx"> #import &quot;PassKitSPI.h&quot;
</span><del>-#import &lt;runtime/JSONObject.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static NSString *toString(PKPaymentPassActivationState paymentPassActivationState)
</del><ins>+static ApplePayPaymentPass::ActivationState convert(PKPaymentPassActivationState paymentPassActivationState)
</ins><span class="cx"> {
</span><span class="cx">     switch (paymentPassActivationState) {
</span><span class="cx">     case PKPaymentPassActivationStateActivated:
</span><del>-        return @&quot;activated&quot;;
</del><ins>+        return ApplePayPaymentPass::ActivationState::Activated;
</ins><span class="cx">     case PKPaymentPassActivationStateRequiresActivation:
</span><del>-        return @&quot;requiresActivation&quot;;
</del><ins>+        return ApplePayPaymentPass::ActivationState::RequiresActivation;
</ins><span class="cx">     case PKPaymentPassActivationStateActivating:
</span><del>-        return @&quot;activating&quot;;
</del><ins>+        return ApplePayPaymentPass::ActivationState::Activating;
</ins><span class="cx">     case PKPaymentPassActivationStateSuspended:
</span><del>-        return @&quot;suspended&quot;;
</del><ins>+        return ApplePayPaymentPass::ActivationState::Suspended;
</ins><span class="cx">     case PKPaymentPassActivationStateDeactivated:
</span><del>-        return @&quot;deactivated&quot;;
-    default:
-        return nil;
</del><ins>+        return ApplePayPaymentPass::ActivationState::Deactivated;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RetainPtr&lt;NSDictionary&gt; toDictionary(PKPaymentPass *paymentPass)
</del><ins>+static std::optional&lt;ApplePayPaymentPass&gt; convert(PKPaymentPass *paymentPass)
</ins><span class="cx"> {
</span><del>-    auto result = adoptNS([[NSMutableDictionary alloc] init]);
</del><ins>+    if (!paymentPass)
+        return std::nullopt;
</ins><span class="cx"> 
</span><del>-    [result setObject:paymentPass.primaryAccountIdentifier forKey:@&quot;primaryAccountIdentifier&quot;];
-    [result setObject:paymentPass.primaryAccountNumberSuffix forKey:@&quot;primaryAccountNumberSuffix&quot;];
</del><ins>+    ApplePayPaymentPass result;
+
+    result.primaryAccountIdentifier = paymentPass.primaryAccountIdentifier;
+    result.primaryAccountNumberSuffix = paymentPass.primaryAccountNumberSuffix;
+
</ins><span class="cx">     if (NSString *deviceAccountIdentifier = paymentPass.deviceAccountIdentifier)
</span><del>-        [result setObject:deviceAccountIdentifier forKey:@&quot;deviceAccountIdentifier&quot;];
</del><ins>+        result.deviceAccountIdentifier = deviceAccountIdentifier;
</ins><span class="cx">     if (NSString *deviceAccountNumberSuffix = paymentPass.deviceAccountNumberSuffix)
</span><del>-        [result setObject:deviceAccountNumberSuffix forKey:@&quot;deviceAccountNumberSuffix&quot;];
-    if (NSString *activationState = toString(paymentPass.activationState))
-        [result setObject:activationState forKey:@&quot;activationState&quot;];
</del><ins>+        result.deviceAccountNumberSuffix = deviceAccountNumberSuffix;
</ins><span class="cx"> 
</span><ins>+    result.activationState = convert(paymentPass.activationState);
+
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static NSString *toString(PKPaymentMethodType paymentMethodType)
</del><ins>+static std::optional&lt;ApplePayPaymentMethod::Type&gt; convert(PKPaymentMethodType paymentMethodType)
</ins><span class="cx"> {
</span><span class="cx">     switch (paymentMethodType) {
</span><span class="cx">     case PKPaymentMethodTypeDebit:
</span><del>-        return @&quot;debit&quot;;
</del><ins>+        return ApplePayPaymentMethod::Type::Debit;
</ins><span class="cx">     case PKPaymentMethodTypeCredit:
</span><del>-        return @&quot;credit&quot;;
</del><ins>+        return ApplePayPaymentMethod::Type::Credit;
</ins><span class="cx">     case PKPaymentMethodTypePrepaid:
</span><del>-        return @&quot;prepaid&quot;;
</del><ins>+        return ApplePayPaymentMethod::Type::Prepaid;
</ins><span class="cx">     case PKPaymentMethodTypeStore:
</span><del>-        return @&quot;store&quot;;
-    default:
-        return nil;
</del><ins>+        return ApplePayPaymentMethod::Type::Store;
+    case PKPaymentMethodTypeUnknown:
+        return std::nullopt;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RetainPtr&lt;NSDictionary&gt; toDictionary(PKPaymentMethod *paymentMethod)
</del><ins>+static ApplePayPaymentMethod convert(PKPaymentMethod *paymentMethod)
</ins><span class="cx"> {
</span><del>-    auto result = adoptNS([[NSMutableDictionary alloc] init]);
-
</del><ins>+    ApplePayPaymentMethod result;
+    
</ins><span class="cx">     if (NSString *displayName = paymentMethod.displayName)
</span><del>-        [result setObject:displayName forKey:@&quot;displayName&quot;];
-
</del><ins>+        result.displayName = displayName;
</ins><span class="cx">     if (NSString *network = paymentMethod.network)
</span><del>-        [result setObject:network forKey:@&quot;network&quot;];
</del><ins>+        result.network = network;
</ins><span class="cx"> 
</span><del>-    if (NSString *paymentMethodType = toString(paymentMethod.type))
-        [result setObject:paymentMethodType forKey:@&quot;type&quot;];
</del><ins>+    result.type = convert(paymentMethod.type);
+    result.paymentPass = convert(paymentMethod.paymentPass);
</ins><span class="cx"> 
</span><del>-    if (PKPaymentPass *paymentPass = paymentMethod.paymentPass)
-        [result setObject:toDictionary(paymentPass).get() forKey:@&quot;paymentPass&quot;];
-
</del><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue PaymentMethod::toJS(JSC::ExecState&amp; exec) const
</del><ins>+ApplePayPaymentMethod PaymentMethod::toApplePayPaymentMethod() const
</ins><span class="cx"> {
</span><del>-    auto dictionary = toDictionary(m_pkPaymentMethod.get());
</del><ins>+    return convert(m_pkPaymentMethod.get());
+}
</ins><span class="cx"> 
</span><del>-    // FIXME: Don't round-trip using NSString.
-    auto jsonString = adoptNS([[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:dictionary.get() options:0 error:nullptr] encoding:NSUTF8StringEncoding]);
-    return JSONParse(&amp;exec, jsonString.get());
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-}
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaTrackConstraintsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.idl (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.idl        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.idl        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     JSGenerateToJSObject,
</span><ins>+    ImplementedAs=MediaTrackConstraintSet
</ins><span class="cx"> ] dictionary MediaTrackConstraintSet {
</span><span class="cx">     ConstrainLong width;
</span><span class="cx">     ConstrainLong height;
</span><span class="lines">@@ -54,6 +55,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     JSGenerateToJSObject,
</span><ins>+    ImplementedAs=ConstrainBooleanParameters
</ins><span class="cx"> ] dictionary ConstrainBooleanParameters {
</span><span class="cx">     boolean exact;
</span><span class="cx">     boolean ideal;
</span><span class="lines">@@ -61,6 +63,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     JSGenerateToJSObject,
</span><ins>+    ImplementedAs=ConstrainDOMStringParameters
</ins><span class="cx"> ] dictionary ConstrainDOMStringParameters {
</span><span class="cx">     (DOMString or sequence&lt;DOMString&gt;) exact;
</span><span class="cx">     (DOMString or sequence&lt;DOMString&gt;) ideal;
</span><span class="lines">@@ -68,6 +71,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     JSGenerateToJSObject,
</span><ins>+    ImplementedAs=ConstrainDoubleRange
</ins><span class="cx"> ] dictionary ConstrainDoubleRange : DoubleRange {
</span><span class="cx">     double exact;
</span><span class="cx">     double ideal;
</span><span class="lines">@@ -75,17 +79,22 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     JSGenerateToJSObject,
</span><ins>+    ImplementedAs=ConstrainLongRange
</ins><span class="cx"> ] dictionary ConstrainLongRange : LongRange {
</span><span class="cx">     long exact;
</span><span class="cx">     long ideal;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-dictionary DoubleRange {
</del><ins>+[
+    ImplementedAs=DoubleRange
+] dictionary DoubleRange {
</ins><span class="cx">     double max;
</span><span class="cx">     double min;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-dictionary LongRange {
</del><ins>+[
+    ImplementedAs=LongRange
+] dictionary LongRange {
</ins><span class="cx">     long max;
</span><span class="cx">     long min;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -694,7 +694,6 @@
</span><span class="cx">                 1A22464C0CC98DDB00C05240 /* SQLiteStatement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246460CC98DDB00C05240 /* SQLiteStatement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1A22464D0CC98DDB00C05240 /* SQLiteTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246470CC98DDB00C05240 /* SQLiteTransaction.cpp */; };
</span><span class="cx">                 1A22464E0CC98DDB00C05240 /* SQLiteTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246480CC98DDB00C05240 /* SQLiteTransaction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                1A24844D1D1A272A00F56BA7 /* PaymentHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A24844C1D1A270100F56BA7 /* PaymentHeaders.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 1A250E0D1CDD632000D0BE63 /* LinkIconType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A250E0C1CDD632000D0BE63 /* LinkIconType.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1A299FE71D7F5FA600A60093 /* RenderThemeCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A299FE51D7F5FA600A60093 /* RenderThemeCocoa.mm */; };
</span><span class="cx">                 1A299FE81D7F5FA600A60093 /* RenderThemeCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A299FE61D7F5FA600A60093 /* RenderThemeCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -954,11 +953,6 @@
</span><span class="cx">                 1AE96A921D1A0DDD00B86768 /* JSApplePayShippingMethodSelectedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE96A821D1A0A8000B86768 /* JSApplePayShippingMethodSelectedEvent.cpp */; };
</span><span class="cx">                 1AE96A931D1A0DDD00B86768 /* JSApplePayShippingMethodSelectedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE96A831D1A0A8000B86768 /* JSApplePayShippingMethodSelectedEvent.h */; };
</span><span class="cx">                 1AE96A941D1A0DDD00B86768 /* JSApplePayValidateMerchantEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE96A841D1A0A8000B86768 /* JSApplePayValidateMerchantEvent.cpp */; };
</span><del>-                1AE96A951D1A0DDD00B86768 /* JSApplePayValidateMerchantEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE96A851D1A0A8000B86768 /* JSApplePayValidateMerchantEvent.h */; };
-                1AE96A961D1A100700B86768 /* JSApplePayPaymentAuthorizedEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE96A741D1A04D300B86768 /* JSApplePayPaymentAuthorizedEventCustom.cpp */; };
-                1AE96A971D1A100700B86768 /* JSApplePayPaymentMethodSelectedEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE96A751D1A04D300B86768 /* JSApplePayPaymentMethodSelectedEventCustom.cpp */; };
-                1AE96A991D1A100700B86768 /* JSApplePayShippingContactSelectedEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE96A771D1A04D300B86768 /* JSApplePayShippingContactSelectedEventCustom.cpp */; };
-                1AE96A9A1D1A100700B86768 /* JSApplePayShippingMethodSelectedEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE96A781D1A04D300B86768 /* JSApplePayShippingMethodSelectedEventCustom.cpp */; };
</del><span class="cx">                 1AED3BDA1D3D5F260099FD78 /* PassKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AED3BD91D3D5F260099FD78 /* PassKitSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AEF4E67170E160300AB2799 /* CachedFontClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEF4E66170E160300AB2799 /* CachedFontClient.h */; };
</span><span class="cx">                 1AEF4E69170E174800AB2799 /* CachedSVGDocumentClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEF4E68170E174800AB2799 /* CachedSVGDocumentClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2863,6 +2857,27 @@
</span><span class="cx">                 7C5343FD17B74B63004232F0 /* JSMediaQueryListListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C5343FB17B74B63004232F0 /* JSMediaQueryListListener.h */; };
</span><span class="cx">                 7C5F28FB1A827D8400C0F31F /* HTMLAttachmentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C5F28F91A827D8400C0F31F /* HTMLAttachmentElement.cpp */; };
</span><span class="cx">                 7C5F28FC1A827D8400C0F31F /* HTMLAttachmentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C5F28FA1A827D8400C0F31F /* HTMLAttachmentElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                7C6522EF1E00A4C700677F22 /* ApplePayPaymentMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6522EC1E00A4C700677F22 /* ApplePayPaymentMethod.h */; };
+                7C6522F51E00A51700677F22 /* ApplePayPaymentPass.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6522F21E00A51700677F22 /* ApplePayPaymentPass.h */; };
+                7C6522FB1E00C90900677F22 /* ApplePayPaymentContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6522F81E00C90900677F22 /* ApplePayPaymentContact.h */; };
+                7C6523011E00D03400677F22 /* ApplePayPayment.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6522FE1E00D03400677F22 /* ApplePayPayment.h */; };
+                7C6523141E00DBB400677F22 /* JSApplePayPayment.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C65230A1E00DBB400677F22 /* JSApplePayPayment.h */; };
+                7C6523151E00DBB500677F22 /* JSApplePayPaymentContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C65230B1E00DBB400677F22 /* JSApplePayPaymentContact.cpp */; };
+                7C6523161E00DBB500677F22 /* JSApplePayPaymentContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C65230C1E00DBB400677F22 /* JSApplePayPaymentContact.h */; };
+                7C6523171E00DBB500677F22 /* JSApplePayPaymentMethod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C65230D1E00DBB400677F22 /* JSApplePayPaymentMethod.cpp */; };
+                7C6523181E00DBB500677F22 /* JSApplePayPaymentMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C65230E1E00DBB400677F22 /* JSApplePayPaymentMethod.h */; };
+                7C6523191E00DBB500677F22 /* JSApplePayPaymentPass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C65230F1E00DBB400677F22 /* JSApplePayPaymentPass.cpp */; };
+                7C65231A1E00DBB500677F22 /* JSApplePayPaymentPass.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6523101E00DBB400677F22 /* JSApplePayPaymentPass.h */; };
+                7C65231E1E018B5A00677F22 /* JSApplePayPayment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C65231D1E018B5A00677F22 /* JSApplePayPayment.cpp */; };
+                7C6579E01E0079F900E3A27A /* ApplePayPaymentRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6579DF1E0079F900E3A27A /* ApplePayPaymentRequest.h */; };
+                7C6579E31E00827000E3A27A /* ApplePayLineItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6579E21E00827000E3A27A /* ApplePayLineItem.h */; };
+                7C6579E81E00831600E3A27A /* ApplePayShippingMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6579E71E00831600E3A27A /* ApplePayShippingMethod.h */; };
+                7C6579EF1E00856600E3A27A /* JSApplePayLineItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C6579E91E00856600E3A27A /* JSApplePayLineItem.cpp */; };
+                7C6579F01E00856600E3A27A /* JSApplePayLineItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6579EA1E00856600E3A27A /* JSApplePayLineItem.h */; };
+                7C6579F11E00856600E3A27A /* JSApplePayPaymentRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C6579EB1E00856600E3A27A /* JSApplePayPaymentRequest.cpp */; };
+                7C6579F21E00856600E3A27A /* JSApplePayPaymentRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6579EC1E00856600E3A27A /* JSApplePayPaymentRequest.h */; };
+                7C6579F31E00856600E3A27A /* JSApplePayShippingMethod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C6579ED1E00856600E3A27A /* JSApplePayShippingMethod.cpp */; };
+                7C6579F41E00856600E3A27A /* JSApplePayShippingMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C6579EE1E00856600E3A27A /* JSApplePayShippingMethod.h */; };
</ins><span class="cx">                 7C73FB07191EF417007DE061 /* UserMessageHandlersNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C73FB05191EF416007DE061 /* UserMessageHandlersNamespace.cpp */; };
</span><span class="cx">                 7C73FB08191EF417007DE061 /* UserMessageHandlersNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C73FB06191EF417007DE061 /* UserMessageHandlersNamespace.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7C73FB0C191EF5A8007DE061 /* JSUserMessageHandlersNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C73FB0A191EF5A8007DE061 /* JSUserMessageHandlersNamespace.cpp */; };
</span><span class="lines">@@ -2913,6 +2928,7 @@
</span><span class="cx">                 7CE6CBFB187F370700D46BF5 /* FormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE6CBFA187F370700D46BF5 /* FormatConverter.h */; };
</span><span class="cx">                 7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE6CBFC187F394900D46BF5 /* FormatConverter.cpp */; };
</span><span class="cx">                 7CEF26191D6A931700BE905D /* JSCryptoCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEF26181D6A92E300BE905D /* JSCryptoCustom.cpp */; };
</span><ins>+                7CF930E71E01F9B400BAFFBE /* PaymentHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CF930E61E01F9AD00BAFFBE /* PaymentHeaders.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7CFDC57C1AC1D80500E24A57 /* ContentExtensionError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFDC57A1AC1D80500E24A57 /* ContentExtensionError.cpp */; };
</span><span class="cx">                 7CFDC57D1AC1D80500E24A57 /* ContentExtensionError.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CFDC57B1AC1D80500E24A57 /* ContentExtensionError.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7D4C96DC1AD4483500365A50 /* JSFetchHeaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7D4C96D81AD4483500365A50 /* JSFetchHeaders.cpp */; };
</span><span class="lines">@@ -7702,7 +7718,6 @@
</span><span class="cx">                 1A2246460CC98DDB00C05240 /* SQLiteStatement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteStatement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A2246470CC98DDB00C05240 /* SQLiteTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLiteTransaction.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A2246480CC98DDB00C05240 /* SQLiteTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1A24844C1D1A270100F56BA7 /* PaymentHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentHeaders.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1A250E0C1CDD632000D0BE63 /* LinkIconType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkIconType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A299FE51D7F5FA600A60093 /* RenderThemeCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderThemeCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A299FE61D7F5FA600A60093 /* RenderThemeCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderThemeCocoa.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7828,7 +7843,7 @@
</span><span class="cx">                 1A8A64431D19FCFB00D0E00F /* ApplePayPaymentMethodSelectedEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayPaymentMethodSelectedEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A8A64441D19FCFB00D0E00F /* ApplePaySession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplePaySession.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A8A64451D19FCFB00D0E00F /* ApplePaySession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePaySession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1A8A64461D19FCFB00D0E00F /* ApplePaySession.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePaySession.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                1A8A64461D19FCFB00D0E00F /* ApplePaySession.idl */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ApplePaySession.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A8A64471D19FCFB00D0E00F /* ApplePayShippingContactSelectedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplePayShippingContactSelectedEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A8A64481D19FCFB00D0E00F /* ApplePayShippingContactSelectedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayShippingContactSelectedEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A8A64491D19FCFB00D0E00F /* ApplePayShippingContactSelectedEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayShippingContactSelectedEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7992,10 +8007,6 @@
</span><span class="cx">                 1AE82F8E0CAAFA9D002237AE /* JSDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDatabase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE82FEA0CAB07EE002237AE /* JSSQLResultSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLResultSet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE82FEB0CAB07EE002237AE /* JSSQLResultSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLResultSet.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1AE96A741D1A04D300B86768 /* JSApplePayPaymentAuthorizedEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentAuthorizedEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1AE96A751D1A04D300B86768 /* JSApplePayPaymentMethodSelectedEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentMethodSelectedEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1AE96A771D1A04D300B86768 /* JSApplePayShippingContactSelectedEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayShippingContactSelectedEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1AE96A781D1A04D300B86768 /* JSApplePayShippingMethodSelectedEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayShippingMethodSelectedEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1AE96A7A1D1A0A8000B86768 /* JSApplePayPaymentAuthorizedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentAuthorizedEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE96A7B1D1A0A8000B86768 /* JSApplePayPaymentAuthorizedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayPaymentAuthorizedEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE96A7C1D1A0A8000B86768 /* JSApplePayPaymentMethodSelectedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentMethodSelectedEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8007,7 +8018,6 @@
</span><span class="cx">                 1AE96A821D1A0A8000B86768 /* JSApplePayShippingMethodSelectedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayShippingMethodSelectedEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE96A831D1A0A8000B86768 /* JSApplePayShippingMethodSelectedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayShippingMethodSelectedEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE96A841D1A0A8000B86768 /* JSApplePayValidateMerchantEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayValidateMerchantEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1AE96A851D1A0A8000B86768 /* JSApplePayValidateMerchantEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayValidateMerchantEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1AE96A861D1A0CEB00B86768 /* PaymentAuthorizationStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentAuthorizationStatus.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE96A871D1A0CEB00B86768 /* PaymentMerchantSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentMerchantSession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AEA88FF1D6CBF5E00E5AD64 /* WebKitLegacyStub.iOS.tbd */ = {isa = PBXFileReference; lastKnownFileType = &quot;sourcecode.text-based-dylib-definition&quot;; path = WebKitLegacyStub.iOS.tbd; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -10331,6 +10341,34 @@
</span><span class="cx">                 7C6136F71710C35200FF4A57 /* InFilesCompiler.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = InFilesCompiler.pm; path = scripts/InFilesCompiler.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C6136F81710C35200FF4A57 /* InFilesParser.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = InFilesParser.pm; path = scripts/InFilesParser.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C6136F91710C35200FF4A57 /* StaticString.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = StaticString.pm; path = scripts/StaticString.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7C6522EC1E00A4C700677F22 /* ApplePayPaymentMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayPaymentMethod.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522ED1E00A4C700677F22 /* ApplePayPaymentMethod.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayPaymentMethod.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522F21E00A51700677F22 /* ApplePayPaymentPass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayPaymentPass.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522F31E00A51700677F22 /* ApplePayPaymentPass.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayPaymentPass.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522F81E00C90900677F22 /* ApplePayPaymentContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayPaymentContact.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522F91E00C90900677F22 /* ApplePayPaymentContact.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayPaymentContact.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522FE1E00D03400677F22 /* ApplePayPayment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayPayment.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6522FF1E00D03400677F22 /* ApplePayPayment.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayPayment.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65230A1E00DBB400677F22 /* JSApplePayPayment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayPayment.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65230B1E00DBB400677F22 /* JSApplePayPaymentContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentContact.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65230C1E00DBB400677F22 /* JSApplePayPaymentContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayPaymentContact.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65230D1E00DBB400677F22 /* JSApplePayPaymentMethod.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentMethod.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65230E1E00DBB400677F22 /* JSApplePayPaymentMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayPaymentMethod.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65230F1E00DBB400677F22 /* JSApplePayPaymentPass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentPass.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6523101E00DBB400677F22 /* JSApplePayPaymentPass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayPaymentPass.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C65231D1E018B5A00677F22 /* JSApplePayPayment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPayment.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579DF1E0079F900E3A27A /* ApplePayPaymentRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayPaymentRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579E11E007A1100E3A27A /* ApplePayPaymentRequest.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ApplePayPaymentRequest.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579E21E00827000E3A27A /* ApplePayLineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayLineItem.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579E41E0082C800E3A27A /* ApplePayLineItem.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ApplePayLineItem.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579E51E00830600E3A27A /* ApplePayShippingMethod.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ApplePayShippingMethod.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579E71E00831600E3A27A /* ApplePayShippingMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplePayShippingMethod.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579E91E00856600E3A27A /* JSApplePayLineItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayLineItem.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579EA1E00856600E3A27A /* JSApplePayLineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayLineItem.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579EB1E00856600E3A27A /* JSApplePayPaymentRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayPaymentRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579EC1E00856600E3A27A /* JSApplePayPaymentRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayPaymentRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579ED1E00856600E3A27A /* JSApplePayShippingMethod.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSApplePayShippingMethod.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7C6579EE1E00856600E3A27A /* JSApplePayShippingMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSApplePayShippingMethod.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7C6752BA1B06E82000C279CB /* NonElementParentNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NonElementParentNode.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C73FB05191EF416007DE061 /* UserMessageHandlersNamespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessageHandlersNamespace.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C73FB06191EF417007DE061 /* UserMessageHandlersNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMessageHandlersNamespace.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -10389,6 +10427,7 @@
</span><span class="cx">                 7CE6CBFA187F370700D46BF5 /* FormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormatConverter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CE6CBFC187F394900D46BF5 /* FormatConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormatConverter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CEF26181D6A92E300BE905D /* JSCryptoCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7CF930E61E01F9AD00BAFFBE /* PaymentHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentHeaders.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7CFDC57A1AC1D80500E24A57 /* ContentExtensionError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtensionError.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CFDC57B1AC1D80500E24A57 /* ContentExtensionError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentExtensionError.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7D4C96D81AD4483500365A50 /* JSFetchHeaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFetchHeaders.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15755,12 +15794,24 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1A58E8691D19D8C000C0EA73 /* cocoa */,
</span><ins>+                                7C6579E21E00827000E3A27A /* ApplePayLineItem.h */,
+                                7C6579E41E0082C800E3A27A /* ApplePayLineItem.idl */,
+                                7C6522FE1E00D03400677F22 /* ApplePayPayment.h */,
+                                7C6522FF1E00D03400677F22 /* ApplePayPayment.idl */,
</ins><span class="cx">                                 1A8A643D1D19FCFB00D0E00F /* ApplePayPaymentAuthorizedEvent.cpp */,
</span><span class="cx">                                 1A8A643E1D19FCFB00D0E00F /* ApplePayPaymentAuthorizedEvent.h */,
</span><span class="cx">                                 1A8A643F1D19FCFB00D0E00F /* ApplePayPaymentAuthorizedEvent.idl */,
</span><ins>+                                7C6522F81E00C90900677F22 /* ApplePayPaymentContact.h */,
+                                7C6522F91E00C90900677F22 /* ApplePayPaymentContact.idl */,
+                                7C6522EC1E00A4C700677F22 /* ApplePayPaymentMethod.h */,
+                                7C6522ED1E00A4C700677F22 /* ApplePayPaymentMethod.idl */,
</ins><span class="cx">                                 1A8A64401D19FCFB00D0E00F /* ApplePayPaymentMethodSelectedEvent.cpp */,
</span><span class="cx">                                 1A8A64421D19FCFB00D0E00F /* ApplePayPaymentMethodSelectedEvent.h */,
</span><span class="cx">                                 1A8A64431D19FCFB00D0E00F /* ApplePayPaymentMethodSelectedEvent.idl */,
</span><ins>+                                7C6522F21E00A51700677F22 /* ApplePayPaymentPass.h */,
+                                7C6522F31E00A51700677F22 /* ApplePayPaymentPass.idl */,
+                                7C6579DF1E0079F900E3A27A /* ApplePayPaymentRequest.h */,
+                                7C6579E11E007A1100E3A27A /* ApplePayPaymentRequest.idl */,
</ins><span class="cx">                                 1A8A64441D19FCFB00D0E00F /* ApplePaySession.cpp */,
</span><span class="cx">                                 1A8A64451D19FCFB00D0E00F /* ApplePaySession.h */,
</span><span class="cx">                                 1A8A64461D19FCFB00D0E00F /* ApplePaySession.idl */,
</span><span class="lines">@@ -15767,6 +15818,8 @@
</span><span class="cx">                                 1A8A64471D19FCFB00D0E00F /* ApplePayShippingContactSelectedEvent.cpp */,
</span><span class="cx">                                 1A8A64481D19FCFB00D0E00F /* ApplePayShippingContactSelectedEvent.h */,
</span><span class="cx">                                 1A8A64491D19FCFB00D0E00F /* ApplePayShippingContactSelectedEvent.idl */,
</span><ins>+                                7C6579E71E00831600E3A27A /* ApplePayShippingMethod.h */,
+                                7C6579E51E00830600E3A27A /* ApplePayShippingMethod.idl */,
</ins><span class="cx">                                 1A8A644B1D19FCFB00D0E00F /* ApplePayShippingMethodSelectedEvent.cpp */,
</span><span class="cx">                                 1A8A644C1D19FCFB00D0E00F /* ApplePayShippingMethodSelectedEvent.h */,
</span><span class="cx">                                 1A8A644D1D19FCFB00D0E00F /* ApplePayShippingMethodSelectedEvent.idl */,
</span><span class="lines">@@ -15779,7 +15832,7 @@
</span><span class="cx">                                 1A58E86B1D19E42D00C0EA73 /* PaymentCoordinator.cpp */,
</span><span class="cx">                                 1A58E86C1D19E42D00C0EA73 /* PaymentCoordinator.h */,
</span><span class="cx">                                 1A58E8621D19D3BF00C0EA73 /* PaymentCoordinatorClient.h */,
</span><del>-                                1A24844C1D1A270100F56BA7 /* PaymentHeaders.h */,
</del><ins>+                                7CF930E61E01F9AD00BAFFBE /* PaymentHeaders.h */,
</ins><span class="cx">                                 1AE96A871D1A0CEB00B86768 /* PaymentMerchantSession.h */,
</span><span class="cx">                                 1A8A64391D19FC5300D0E00F /* PaymentMethod.h */,
</span><span class="cx">                                 1A58E8631D19D4DF00C0EA73 /* PaymentRequest.cpp */,
</span><span class="lines">@@ -15891,18 +15944,31 @@
</span><span class="cx">                 1AE96A791D1A0A5C00B86768 /* ApplePay */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                7C6579E91E00856600E3A27A /* JSApplePayLineItem.cpp */,
+                                7C6579EA1E00856600E3A27A /* JSApplePayLineItem.h */,
+                                7C65231D1E018B5A00677F22 /* JSApplePayPayment.cpp */,
+                                7C65230A1E00DBB400677F22 /* JSApplePayPayment.h */,
</ins><span class="cx">                                 1AE96A7A1D1A0A8000B86768 /* JSApplePayPaymentAuthorizedEvent.cpp */,
</span><span class="cx">                                 1AE96A7B1D1A0A8000B86768 /* JSApplePayPaymentAuthorizedEvent.h */,
</span><ins>+                                7C65230B1E00DBB400677F22 /* JSApplePayPaymentContact.cpp */,
+                                7C65230C1E00DBB400677F22 /* JSApplePayPaymentContact.h */,
+                                7C65230D1E00DBB400677F22 /* JSApplePayPaymentMethod.cpp */,
+                                7C65230E1E00DBB400677F22 /* JSApplePayPaymentMethod.h */,
</ins><span class="cx">                                 1AE96A7C1D1A0A8000B86768 /* JSApplePayPaymentMethodSelectedEvent.cpp */,
</span><span class="cx">                                 1AE96A7D1D1A0A8000B86768 /* JSApplePayPaymentMethodSelectedEvent.h */,
</span><ins>+                                7C65230F1E00DBB400677F22 /* JSApplePayPaymentPass.cpp */,
+                                7C6523101E00DBB400677F22 /* JSApplePayPaymentPass.h */,
+                                7C6579EB1E00856600E3A27A /* JSApplePayPaymentRequest.cpp */,
+                                7C6579EC1E00856600E3A27A /* JSApplePayPaymentRequest.h */,
</ins><span class="cx">                                 1AE96A7E1D1A0A8000B86768 /* JSApplePaySession.cpp */,
</span><span class="cx">                                 1AE96A7F1D1A0A8000B86768 /* JSApplePaySession.h */,
</span><span class="cx">                                 1AE96A801D1A0A8000B86768 /* JSApplePayShippingContactSelectedEvent.cpp */,
</span><span class="cx">                                 1AE96A811D1A0A8000B86768 /* JSApplePayShippingContactSelectedEvent.h */,
</span><ins>+                                7C6579ED1E00856600E3A27A /* JSApplePayShippingMethod.cpp */,
+                                7C6579EE1E00856600E3A27A /* JSApplePayShippingMethod.h */,
</ins><span class="cx">                                 1AE96A821D1A0A8000B86768 /* JSApplePayShippingMethodSelectedEvent.cpp */,
</span><span class="cx">                                 1AE96A831D1A0A8000B86768 /* JSApplePayShippingMethodSelectedEvent.h */,
</span><span class="cx">                                 1AE96A841D1A0A8000B86768 /* JSApplePayValidateMerchantEvent.cpp */,
</span><del>-                                1AE96A851D1A0A8000B86768 /* JSApplePayValidateMerchantEvent.h */,
</del><span class="cx">                         );
</span><span class="cx">                         name = ApplePay;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -21966,10 +22032,6 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1221E0721C03E4C2006A1A00 /* JSAnimationTimelineCustom.cpp */,
</span><del>-                                1AE96A741D1A04D300B86768 /* JSApplePayPaymentAuthorizedEventCustom.cpp */,
-                                1AE96A751D1A04D300B86768 /* JSApplePayPaymentMethodSelectedEventCustom.cpp */,
-                                1AE96A771D1A04D300B86768 /* JSApplePayShippingContactSelectedEventCustom.cpp */,
-                                1AE96A781D1A04D300B86768 /* JSApplePayShippingMethodSelectedEventCustom.cpp */,
</del><span class="cx">                                 BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */,
</span><span class="cx">                                 BE6DF70E171CA2DA00DD52B8 /* JSAudioTrackCustom.cpp */,
</span><span class="cx">                                 BE6DF710171CA2DA00DD52B8 /* JSAudioTrackListCustom.cpp */,
</span><span class="lines">@@ -25021,6 +25083,7 @@
</span><span class="cx">                                 EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */,
</span><span class="cx">                                 9382DF5810A8D5C900925652 /* ColorSpace.h in Headers */,
</span><span class="cx">                                 BCDD454E1236C95C009A7985 /* ColumnInfo.h in Headers */,
</span><ins>+                                7C6579F41E00856600E3A27A /* JSApplePayShippingMethod.h in Headers */,
</ins><span class="cx">                                 43EDD67F1B485DBF00640E75 /* CombinedFiltersAlphabet.h in Headers */,
</span><span class="cx">                                 26E944D91AC4B2DD007B85B5 /* CombinedURLFilters.h in Headers */,
</span><span class="cx">                                 A584FE351864D5AF00843B10 /* CommandLineAPIHost.h in Headers */,
</span><span class="lines">@@ -25156,6 +25219,7 @@
</span><span class="cx">                                 AA21ECCD0ABF0FC6002B834C /* CSSCursorImageValue.h in Headers */,
</span><span class="cx">                                 9444CBE41D8861990073A074 /* CSSCustomIdentValue.h in Headers */,
</span><span class="cx">                                 BC779E141BB215BB00CAA8BF /* CSSCustomPropertyValue.h in Headers */,
</span><ins>+                                7C6523011E00D03400677F22 /* ApplePayPayment.h in Headers */,
</ins><span class="cx">                                 4A9CC81816BB9AC600EC645A /* CSSDefaultStyleSheets.h in Headers */,
</span><span class="cx">                                 94476BDB1DFCAC0300690E23 /* CSSDeferredParser.h in Headers */,
</span><span class="cx">                                 FBB0C5B817BBD629003D3677 /* CSSFilterImageValue.h in Headers */,
</span><span class="lines">@@ -25316,6 +25380,7 @@
</span><span class="cx">                                 267725FF1A5B3AD9003C24DD /* DFANode.h in Headers */,
</span><span class="cx">                                 CD19A2681A13E700008D650E /* DiagnosticLoggingClient.h in Headers */,
</span><span class="cx">                                 46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */,
</span><ins>+                                7C6523161E00DBB500677F22 /* JSApplePayPaymentContact.h in Headers */,
</ins><span class="cx">                                 8372DB311A6780A800C697C5 /* DiagnosticLoggingResultType.h in Headers */,
</span><span class="cx">                                 CECADFC7153778FF00E37068 /* DictationAlternative.h in Headers */,
</span><span class="cx">                                 CECADFC9153778FF00E37068 /* DictationCommand.h in Headers */,
</span><span class="lines">@@ -25490,6 +25555,7 @@
</span><span class="cx">                                 84730D871248F0B300D3A9C9 /* FEOffset.h in Headers */,
</span><span class="cx">                                 84730D891248F0B300D3A9C9 /* FESpecularLighting.h in Headers */,
</span><span class="cx">                                 416E6FE81BBD12DF000A6023 /* FetchInternalsBuiltins.h in Headers */,
</span><ins>+                                7C6579F21E00856600E3A27A /* JSApplePayPaymentRequest.h in Headers */,
</ins><span class="cx">                                 41AD753A1CEF6BD100A31486 /* FetchOptions.h in Headers */,
</span><span class="cx">                                 84730D8B1248F0B300D3A9C9 /* FETile.h in Headers */,
</span><span class="cx">                                 84730D8D1248F0B300D3A9C9 /* FETurbulence.h in Headers */,
</span><span class="lines">@@ -25678,6 +25744,7 @@
</span><span class="cx">                                 B562DB6017D3CD630010AF96 /* HTMLElementTypeHelpers.h in Headers */,
</span><span class="cx">                                 A871D45C0A127CBC00B12A68 /* HTMLEmbedElement.h in Headers */,
</span><span class="cx">                                 977B386A122883E900B81FF8 /* HTMLEntityParser.h in Headers */,
</span><ins>+                                7C6579E31E00827000E3A27A /* ApplePayLineItem.h in Headers */,
</ins><span class="cx">                                 977B386C122883E900B81FF8 /* HTMLEntitySearch.h in Headers */,
</span><span class="cx">                                 977B386D122883E900B81FF8 /* HTMLEntityTable.h in Headers */,
</span><span class="cx">                                 A81369D4097374F600D74463 /* HTMLFieldSetElement.h in Headers */,
</span><span class="lines">@@ -25846,6 +25913,7 @@
</span><span class="cx">                                 22BD9F81135364FE009BD102 /* ImageBufferDataCG.h in Headers */,
</span><span class="cx">                                 2D25396318CE7F6200270222 /* ImageControlsButtonElementMac.h in Headers */,
</span><span class="cx">                                 510192D618B6B9B7007FC7A1 /* ImageControlsRootElement.h in Headers */,
</span><ins>+                                7C6579E81E00831600E3A27A /* ApplePayShippingMethod.h in Headers */,
</ins><span class="cx">                                 510192D218B6B9AB007FC7A1 /* ImageControlsRootElementMac.h in Headers */,
</span><span class="cx">                                 A779791A0D6B9D0C003851B9 /* ImageData.h in Headers */,
</span><span class="cx">                                 555B87ED1CAAF0AB00349425 /* ImageDecoderCG.h in Headers */,
</span><span class="lines">@@ -25954,7 +26022,6 @@
</span><span class="cx">                                 1AE96A8F1D1A0DDD00B86768 /* JSApplePaySession.h in Headers */,
</span><span class="cx">                                 1AE96A911D1A0DDD00B86768 /* JSApplePayShippingContactSelectedEvent.h in Headers */,
</span><span class="cx">                                 1AE96A931D1A0DDD00B86768 /* JSApplePayShippingMethodSelectedEvent.h in Headers */,
</span><del>-                                1AE96A951D1A0DDD00B86768 /* JSApplePayValidateMerchantEvent.h in Headers */,
</del><span class="cx">                                 65DF31DB09D1C123000BE325 /* JSAttr.h in Headers */,
</span><span class="cx">                                 FDA15E9E12B03EE1003A583A /* JSAudioBuffer.h in Headers */,
</span><span class="cx">                                 FDF7E9C413AC21DB00A51EAC /* JSAudioBufferCallback.h in Headers */,
</span><span class="lines">@@ -25969,6 +26036,7 @@
</span><span class="cx">                                 BE8EF045171C8FF9009B48C3 /* JSAudioTrackList.h in Headers */,
</span><span class="cx">                                 76FB9FF919A73E3A00420562 /* JSAutocompleteErrorEvent.h in Headers */,
</span><span class="cx">                                 BC124F000C26447A009E2349 /* JSBarProp.h in Headers */,
</span><ins>+                                7C65231A1E00DBB500677F22 /* JSApplePayPaymentPass.h in Headers */,
</ins><span class="cx">                                 BC946348107A936600857193 /* JSBeforeLoadEvent.h in Headers */,
</span><span class="cx">                                 6FA4454E898F2FC168BC38C1 /* JSBeforeUnloadEvent.h in Headers */,
</span><span class="cx">                                 FDF09DC91399B62200688E5B /* JSBiquadFilterNode.h in Headers */,
</span><span class="lines">@@ -26007,6 +26075,7 @@
</span><span class="cx">                                 E125F83E182411E700D84CD9 /* JSCryptoOperationData.h in Headers */,
</span><span class="cx">                                 409EBDC316B7F3A600CBA3FC /* JSCSSFontFaceLoadEvent.h in Headers */,
</span><span class="cx">                                 BC46C1FD0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h in Headers */,
</span><ins>+                                7C6522FB1E00C90900677F22 /* ApplePayPaymentContact.h in Headers */,
</ins><span class="cx">                                 BC46C1FF0C0DDC8F0020CFC3 /* JSCSSImportRule.h in Headers */,
</span><span class="cx">                                 316FE0720E6CCBEE00BF6088 /* JSCSSKeyframeRule.h in Headers */,
</span><span class="cx">                                 316FE0740E6CCBEE00BF6088 /* JSCSSKeyframesRule.h in Headers */,
</span><span class="lines">@@ -26943,6 +27012,7 @@
</span><span class="cx">                                 DAED203116F244480070EC0F /* PageConsoleClient.h in Headers */,
</span><span class="cx">                                 A5A2AF0C1829734300DE1729 /* PageDebuggable.h in Headers */,
</span><span class="cx">                                 F34742DD134362F000531BC2 /* PageDebuggerAgent.h in Headers */,
</span><ins>+                                7C6579F01E00856600E3A27A /* JSApplePayLineItem.h in Headers */,
</ins><span class="cx">                                 9302B0BF0D79F82C00C7EE83 /* PageGroup.h in Headers */,
</span><span class="cx">                                 7A674BDC0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h in Headers */,
</span><span class="cx">                                 A5F8CD121D18F32E00AC0E53 /* PageHeapAgent.h in Headers */,
</span><span class="lines">@@ -26980,7 +27050,6 @@
</span><span class="cx">                                 1A8A643B1D19FC5300D0E00F /* PaymentContact.h in Headers */,
</span><span class="cx">                                 1A58E86E1D19E42D00C0EA73 /* PaymentCoordinator.h in Headers */,
</span><span class="cx">                                 1A58E8661D19D4F000C0EA73 /* PaymentCoordinatorClient.h in Headers */,
</span><del>-                                1A24844D1D1A272A00F56BA7 /* PaymentHeaders.h in Headers */,
</del><span class="cx">                                 1AE96A891D1A0CEB00B86768 /* PaymentMerchantSession.h in Headers */,
</span><span class="cx">                                 1A8A643C1D19FC5300D0E00F /* PaymentMethod.h in Headers */,
</span><span class="cx">                                 1A58E8651D19D4EB00C0EA73 /* PaymentRequest.h in Headers */,
</span><span class="lines">@@ -27160,6 +27229,7 @@
</span><span class="cx">                                 B595FF471824CEE300FF51CD /* RenderIterator.h in Headers */,
</span><span class="cx">                                 BCEA487A097D93020094C9E4 /* RenderLayer.h in Headers */,
</span><span class="cx">                                 0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */,
</span><ins>+                                7C6522EF1E00A4C700677F22 /* ApplePayPaymentMethod.h in Headers */,
</ins><span class="cx">                                 0F580CFD0F12DE9B0051D689 /* RenderLayerCompositor.h in Headers */,
</span><span class="cx">                                 50D10D9A1545F5760096D288 /* RenderLayerFilterInfo.h in Headers */,
</span><span class="cx">                                 3C244FEAA375AC633F88BE6F /* RenderLayerModelObject.h in Headers */,
</span><span class="lines">@@ -27880,6 +27950,7 @@
</span><span class="cx">                                 6550B6A6099DF0270090D781 /* Text.h in Headers */,
</span><span class="cx">                                 93309E17099E64920056E581 /* TextAffinity.h in Headers */,
</span><span class="cx">                                 CE7B2DB51586ABAD0098B3FA /* TextAlternativeWithRange.h in Headers */,
</span><ins>+                                7C6579E01E0079F900E3A27A /* ApplePayPaymentRequest.h in Headers */,
</ins><span class="cx">                                 0F54DCE61881051D003EEDBB /* TextAutoSizing.h in Headers */,
</span><span class="cx">                                 B2C3DA340D006C1D00EF6F26 /* TextBoundaries.h in Headers */,
</span><span class="cx">                                 A7151BD812F1558F005A0F64 /* TextCheckerClient.h in Headers */,
</span><span class="lines">@@ -27983,6 +28054,7 @@
</span><span class="cx">                                 C375D7FE16639519006184AB /* TypeAhead.h in Headers */,
</span><span class="cx">                                 E46A2B1C17CA65B9000DBCD8 /* TypedElementDescendantIterator.h in Headers */,
</span><span class="cx">                                 93309E1A099E64920056E581 /* TypingCommand.h in Headers */,
</span><ins>+                                7C6523181E00DBB500677F22 /* JSApplePayPaymentMethod.h in Headers */,
</ins><span class="cx">                                 85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */,
</span><span class="cx">                                 83FE7CA71DA9F1A70037237C /* UIEventInit.h in Headers */,
</span><span class="cx">                                 85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */,
</span><span class="lines">@@ -28178,6 +28250,7 @@
</span><span class="cx">                                 1CAF34810A6C405200ABE06E /* WebScriptObject.h in Headers */,
</span><span class="cx">                                 1CAF34830A6C405200ABE06E /* WebScriptObjectPrivate.h in Headers */,
</span><span class="cx">                                 1A569D1B0D7E2B82007C3983 /* WebScriptObjectProtocol.h in Headers */,
</span><ins>+                                7C6523141E00DBB400677F22 /* JSApplePayPayment.h in Headers */,
</ins><span class="cx">                                 97AABD1B14FA09D5007457AE /* WebSocket.h in Headers */,
</span><span class="cx">                                 97AABD1E14FA09D5007457AE /* WebSocketChannel.h in Headers */,
</span><span class="cx">                                 97AABD1F14FA09D5007457AE /* WebSocketChannelClient.h in Headers */,
</span><span class="lines">@@ -28249,8 +28322,10 @@
</span><span class="cx">                                 A7D6B3490F61104500B79FD1 /* WorkerScriptLoader.h in Headers */,
</span><span class="cx">                                 2EA768040FE7126400AB9C8A /* WorkerScriptLoaderClient.h in Headers */,
</span><span class="cx">                                 2E4346550F546A8200B0F1BA /* WorkerThread.h in Headers */,
</span><ins>+                                7C6522F51E00A51700677F22 /* ApplePayPaymentPass.h in Headers */,
</ins><span class="cx">                                 0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */,
</span><span class="cx">                                 97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */,
</span><ins>+                                7CF930E71E01F9B400BAFFBE /* PaymentHeaders.h in Headers */,
</ins><span class="cx">                                 A54A0C681DB807D90017A90B /* WorkerToPageFrontendChannel.h in Headers */,
</span><span class="cx">                                 93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */,
</span><span class="cx">                                 416E6FE91BBD12E5000A6053 /* WritableStreamBuiltins.h in Headers */,
</span><span class="lines">@@ -29075,6 +29150,7 @@
</span><span class="cx">                                 CCC2B51515F613060048CDD6 /* DeviceController.cpp in Sources */,
</span><span class="cx">                                 31EAF97F121435A400E7C1BF /* DeviceMotionClientIOS.mm in Sources */,
</span><span class="cx">                                 31FB1A58120A5D0600DC02A0 /* DeviceMotionController.cpp in Sources */,
</span><ins>+                                7C6523191E00DBB500677F22 /* JSApplePayPaymentPass.cpp in Sources */,
</ins><span class="cx">                                 31FB1A5A120A5D0600DC02A0 /* DeviceMotionData.cpp in Sources */,
</span><span class="cx">                                 31FB1A5C120A5D0600DC02A0 /* DeviceMotionEvent.cpp in Sources */,
</span><span class="cx">                                 3140379E124BEA7F00AF40E4 /* DeviceOrientationClientIOS.mm in Sources */,
</span><span class="lines">@@ -29650,14 +29726,10 @@
</span><span class="cx">                                 1221E06C1C03D224006A1A00 /* JSAnimationTimeline.cpp in Sources */,
</span><span class="cx">                                 1221E0731C03E4C2006A1A00 /* JSAnimationTimelineCustom.cpp in Sources */,
</span><span class="cx">                                 1AE96A8A1D1A0DDD00B86768 /* JSApplePayPaymentAuthorizedEvent.cpp in Sources */,
</span><del>-                                1AE96A961D1A100700B86768 /* JSApplePayPaymentAuthorizedEventCustom.cpp in Sources */,
</del><span class="cx">                                 1AE96A8C1D1A0DDD00B86768 /* JSApplePayPaymentMethodSelectedEvent.cpp in Sources */,
</span><del>-                                1AE96A971D1A100700B86768 /* JSApplePayPaymentMethodSelectedEventCustom.cpp in Sources */,
</del><span class="cx">                                 1AE96A8E1D1A0DDD00B86768 /* JSApplePaySession.cpp in Sources */,
</span><span class="cx">                                 1AE96A901D1A0DDD00B86768 /* JSApplePayShippingContactSelectedEvent.cpp in Sources */,
</span><del>-                                1AE96A991D1A100700B86768 /* JSApplePayShippingContactSelectedEventCustom.cpp in Sources */,
</del><span class="cx">                                 1AE96A921D1A0DDD00B86768 /* JSApplePayShippingMethodSelectedEvent.cpp in Sources */,
</span><del>-                                1AE96A9A1D1A100700B86768 /* JSApplePayShippingMethodSelectedEventCustom.cpp in Sources */,
</del><span class="cx">                                 1AE96A941D1A0DDD00B86768 /* JSApplePayValidateMerchantEvent.cpp in Sources */,
</span><span class="cx">                                 65DF31DA09D1C123000BE325 /* JSAttr.cpp in Sources */,
</span><span class="cx">                                 BC2ED6BC0C6BD2F000920BFF /* JSAttrCustom.cpp in Sources */,
</span><span class="lines">@@ -29696,6 +29768,7 @@
</span><span class="cx">                                 BCC065870F3CE2A700CD2D87 /* JSClientRect.cpp in Sources */,
</span><span class="cx">                                 BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */,
</span><span class="cx">                                 836D03311DA8A13F00FFD96B /* JSClipboardEvent.cpp in Sources */,
</span><ins>+                                7C6523151E00DBB500677F22 /* JSApplePayPaymentContact.cpp in Sources */,
</ins><span class="cx">                                 51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */,
</span><span class="cx">                                 A584FE3B1864E2D800843B10 /* JSCommandLineAPIHost.cpp in Sources */,
</span><span class="cx">                                 A584FE381864DAC100843B10 /* JSCommandLineAPIHostCustom.cpp in Sources */,
</span><span class="lines">@@ -29893,6 +29966,7 @@
</span><span class="cx">                                 1AE2AA2E0A1CDAB400B42B25 /* JSHTMLHeadingElement.cpp in Sources */,
</span><span class="cx">                                 1AE2AA300A1CDAB400B42B25 /* JSHTMLHRElement.cpp in Sources */,
</span><span class="cx">                                 1A85B18F0A1B18A200D8C87C /* JSHTMLHtmlElement.cpp in Sources */,
</span><ins>+                                7C6579EF1E00856600E3A27A /* JSApplePayLineItem.cpp in Sources */,
</ins><span class="cx">                                 BC4918C80BFEA050009D6316 /* JSHTMLIFrameElement.cpp in Sources */,
</span><span class="cx">                                 1AE2AA970A1CDD2D00B42B25 /* JSHTMLImageElement.cpp in Sources */,
</span><span class="cx">                                 A80E7E980A1A83E3007FB8C5 /* JSHTMLInputElement.cpp in Sources */,
</span><span class="lines">@@ -30042,6 +30116,7 @@
</span><span class="cx">                                 33503CA510179AD7003B47E1 /* JSNotificationCenter.cpp in Sources */,
</span><span class="cx">                                 31EC1E2814FF60EE00C94662 /* JSNotificationPermissionCallback.cpp in Sources */,
</span><span class="cx">                                 7E46F6FA1627A2CA00062223 /* JSOESElementIndexUint.cpp in Sources */,
</span><ins>+                                7C6579F31E00856600E3A27A /* JSApplePayShippingMethod.cpp in Sources */,
</ins><span class="cx">                                 9001788012E0370700648462 /* JSOESStandardDerivatives.cpp in Sources */,
</span><span class="cx">                                 6EBF0E7612A9868800DB1709 /* JSOESTextureFloat.cpp in Sources */,
</span><span class="cx">                                 3146FE7418442370001A937C /* JSOESTextureFloatLinear.cpp in Sources */,
</span><span class="lines">@@ -30482,6 +30557,7 @@
</span><span class="cx">                                 B59CA390CED66C3255F72B48 /* MathMLScriptsElement.cpp in Sources */,
</span><span class="cx">                                 FED48390CED66C3255F72C59 /* MathMLSelectElement.cpp in Sources */,
</span><span class="cx">                                 4FA65A6B1108ABED002615E0 /* MathMLSpaceElement.cpp in Sources */,
</span><ins>+                                7C6579F11E00856600E3A27A /* JSApplePayPaymentRequest.cpp in Sources */,
</ins><span class="cx">                                 439176DF12DA25E17BAF80A2 /* MathMLStyle.cpp in Sources */,
</span><span class="cx">                                 FA654A6B1108ABED002615E0 /* MathMLTokenElement.cpp in Sources */,
</span><span class="cx">                                 FA654A6B1108ABED002626F1 /* MathMLUnderOverElement.cpp in Sources */,
</span><span class="lines">@@ -30864,6 +30940,7 @@
</span><span class="cx">                                 439046EB12DA25E800AF80A9 /* RenderMathMLToken.cpp in Sources */,
</span><span class="cx">                                 439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */,
</span><span class="cx">                                 E4C279580CF9741900E97B98 /* RenderMedia.cpp in Sources */,
</span><ins>+                                7C6523171E00DBB500677F22 /* JSApplePayPaymentMethod.cpp in Sources */,
</ins><span class="cx">                                 DE49B309165F2FE10010338D /* RenderMediaControlElements.cpp in Sources */,
</span><span class="cx">                                 41FA303E1316C29C00C0BFC5 /* RenderMediaControls.cpp in Sources */,
</span><span class="cx">                                 ABDDFE790A5C6E7000A3E11D /* RenderMenuList.cpp in Sources */,
</span><span class="lines">@@ -30913,6 +30990,7 @@
</span><span class="cx">                                 93F19AD508245E59001E9ABC /* RenderTreeAsText.cpp in Sources */,
</span><span class="cx">                                 5824ABAA1AE849C8009074B7 /* RenderTreePosition.cpp in Sources */,
</span><span class="cx">                                 E461802B1C8A06D90026C02C /* RenderTreeUpdater.cpp in Sources */,
</span><ins>+                                7C65231E1E018B5A00677F22 /* JSApplePayPayment.cpp in Sources */,
</ins><span class="cx">                                 E44614510CD68A3500FADA75 /* RenderVideo.cpp in Sources */,
</span><span class="cx">                                 BCEA4867097D93020094C9E4 /* RenderView.cpp in Sources */,
</span><span class="cx">                                 BE20507D18A458BF0080647E /* RenderVTTCue.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericIDLTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/IDLTypes.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/IDLTypes.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/generic/IDLTypes.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -174,7 +174,15 @@
</span><span class="cx"> template&lt;typename T&gt; struct IDLEventListener : IDLWrapper&lt;T&gt; { };
</span><span class="cx"> template&lt;typename T&gt; struct IDLXPathNSResolver : IDLWrapper&lt;T&gt; { };
</span><span class="cx"> 
</span><ins>+struct IDLJSON : IDLType&lt;String&gt; { 
+    using ParameterType = const String&amp;;
</ins><span class="cx"> 
</span><ins>+    using NullableType = String;
+    static String nullValue() { return String(); }
+    static bool isNullValue(const String&amp; value) { return value.isNull(); }
+    template &lt;typename U&gt; static U&amp;&amp; extractValueFromNullable(U&amp;&amp; value) { return std::forward&lt;U&gt;(value); }
+};
+
</ins><span class="cx"> // Non-WebIDL convenience type aliases
</span><span class="cx"> 
</span><span class="cx"> using IDLBufferSource = IDLUnion&lt;IDLInterface&lt;JSC::ArrayBufferView&gt;, IDLInterface&lt;JSC::ArrayBuffer&gt;&gt;;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSApplePayPaymentAuthorizedEventCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -1,46 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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;JSApplePayPaymentAuthorizedEvent.h&quot;
-
-#if ENABLE(APPLE_PAY)
-
-#include &lt;heap/HeapInlines.h&gt;
-#include &lt;runtime/JSCJSValueInlines.h&gt;
-
-namespace WebCore {
-
-JSC::JSValue JSApplePayPaymentAuthorizedEvent::payment(JSC::ExecState&amp; exec) const
-{
-    if (!m_payment)
-        m_payment.set(exec.vm(), this, wrapped().payment().toJS(exec));
-
-    return m_payment.get();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSApplePayPaymentMethodSelectedEventCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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;JSApplePayPaymentMethodSelectedEvent.h&quot;
-
-#if ENABLE(APPLE_PAY)
-
-#include &lt;heap/HeapInlines.h&gt;
-#include &lt;runtime/JSCJSValueInlines.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSApplePayPaymentMethodSelectedEvent::paymentMethod(ExecState&amp; exec) const
-{
-    if (!m_paymentMethod)
-        m_paymentMethod.set(exec.vm(), this, wrapped().paymentMethod().toJS(exec));
-
-    return m_paymentMethod.get();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSApplePayShippingContactSelectedEventCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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;JSApplePayShippingContactSelectedEvent.h&quot;
-
-#if ENABLE(APPLE_PAY)
-
-#include &lt;heap/HeapInlines.h&gt;
-#include &lt;runtime/JSCJSValueInlines.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSApplePayShippingContactSelectedEvent::shippingContact(ExecState&amp; exec) const
-{
-    if (!m_shippingContact)
-        m_shippingContact.set(exec.vm(), this, wrapped().shippingContact().toJS(exec));
-
-    return m_shippingContact.get();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSApplePayShippingMethodSelectedEventCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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;JSApplePayShippingMethodSelectedEvent.h&quot;
-
-#if ENABLE(APPLE_PAY)
-
-#include &lt;runtime/JSCInlines.h&gt;
-#include &lt;runtime/ObjectConstructor.h&gt;
-#include &lt;wtf/text/StringBuilder.h&gt;
-
-using namespace JSC;
-
-namespace WebCore {
-
-static JSValue toJS(ExecState&amp; state, const PaymentRequest::ShippingMethod&amp; shippingMethod)
-{
-    JSObject* object = constructEmptyObject(&amp;state);
-
-    object-&gt;putDirect(state.vm(), Identifier::fromString(&amp;state, &quot;label&quot;), jsString(&amp;state, shippingMethod.label));
-    object-&gt;putDirect(state.vm(), Identifier::fromString(&amp;state, &quot;detail&quot;), jsString(&amp;state, shippingMethod.detail));
-
-    StringBuilder amountString;
-    amountString.appendNumber(shippingMethod.amount / 100);
-    amountString.appendLiteral(&quot;.&quot;);
-
-    unsigned decimals = shippingMethod.amount % 100;
-    if (decimals &lt; 10)
-        amountString.appendLiteral(&quot;0&quot;);
-    amountString.appendNumber(decimals);
-    object-&gt;putDirect(state.vm(), Identifier::fromString(&amp;state, &quot;amount&quot;), jsString(&amp;state, amountString.toString()));
-
-    object-&gt;putDirect(state.vm(), Identifier::fromString(&amp;state, &quot;identifier&quot;), jsString(&amp;state, shippingMethod.identifier));
-
-    return object;
-}
-
-JSValue JSApplePayShippingMethodSelectedEvent::shippingMethod(ExecState&amp; exec) const
-{
-    if (!m_shippingMethod)
-        m_shippingMethod.set(exec.vm(), this, toJS(exec, wrapped().shippingMethod()));
-
-    return m_shippingMethod.get();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;BufferSource.h&quot;
</span><span class="cx"> #include &quot;IDLTypes.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><ins>+#include &lt;runtime/JSONObject.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -1516,6 +1517,26 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // MARK: -
</span><ins>+// MARK: IDLJSON type
+
+template&lt;&gt; struct Converter&lt;IDLJSON&gt; : DefaultConverter&lt;IDLJSON&gt; {
+    static String convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        return JSC::JSONStringify(&amp;state, value, 0);
+    }
+};
+
+template&lt;&gt; struct JSConverter&lt;IDLJSON&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = false;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, const String&amp; value)
+    {
+        return JSC::JSONParse(&amp;state, value);
+    }
+};
+
+// MARK: -
</ins><span class="cx"> // MARK: Support for variadic tail convertions
</span><span class="cx"> 
</span><span class="cx"> namespace Detail {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -883,6 +883,7 @@
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;XPathNSResolver&quot;;    
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;EventListener&quot;;    
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;SerializedScriptValue&quot;;    
</span><ins>+    return 1 if $type-&gt;name eq &quot;JSON&quot;;    
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -1149,7 +1149,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDefaultValue
</span><span class="cx"> {
</span><del>-    my ($interface, $context, $type, $defaultValue) = @_;
</del><ins>+    my ($typeScope, $context, $type, $defaultValue) = @_;
</ins><span class="cx"> 
</span><span class="cx">     if ($codeGenerator-&gt;IsStringType($type)) {
</span><span class="cx">         my $useAtomicString = $context-&gt;extendedAttributes-&gt;{AtomicString};
</span><span class="lines">@@ -1165,7 +1165,7 @@
</span><span class="cx">     if ($codeGenerator-&gt;IsEnumType($type)) {
</span><span class="cx">         # FIXME: Would be nice to report an error if the value does not have quote marks around it.
</span><span class="cx">         # FIXME: Would be nice to report an error if the value is not one of the enumeration values.
</span><del>-        my $className = GetEnumerationClassName($type, $interface);
</del><ins>+        my $className = GetEnumerationClassName($type, $typeScope);
</ins><span class="cx">         my $enumerationValueName = GetEnumerationValueName(substr($defaultValue, 1, -1));
</span><span class="cx">         return $className . &quot;::&quot; . $enumerationValueName;
</span><span class="cx">     }
</span><span class="lines">@@ -1173,7 +1173,7 @@
</span><span class="cx">         if ($type-&gt;isUnion) {
</span><span class="cx">             return &quot;std::nullopt&quot; if $type-&gt;isNullable;
</span><span class="cx"> 
</span><del>-            my $IDLType = GetIDLType($interface, $type);
</del><ins>+            my $IDLType = GetIDLType($typeScope, $type);
</ins><span class="cx">             return &quot;convert&lt;${IDLType}&gt;(state, jsNull());&quot;;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1184,10 +1184,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ($defaultValue eq &quot;[]&quot;) {
</span><del>-        my $IDLType = GetIDLType($interface, $type);
</del><ins>+        my $IDLType = GetIDLType($typeScope, $type);
</ins><span class="cx">         return &quot;Converter&lt;${IDLType}&gt;::ReturnType{ }&quot; if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
</span><span class="cx"> 
</span><del>-        my $nativeType = GetNativeType($interface, $type);
</del><ins>+        my $nativeType = GetNativeType($typeScope, $type);
</ins><span class="cx">         return &quot;$nativeType()&quot;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1215,7 +1215,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDictionariesHeaderContent
</span><span class="cx"> {
</span><del>-    my ($interface, $allDictionaries) = @_;
</del><ins>+    my ($typeScope, $allDictionaries) = @_;
</ins><span class="cx"> 
</span><span class="cx">     return &quot;&quot; unless @$allDictionaries;
</span><span class="cx"> 
</span><span class="lines">@@ -1223,8 +1223,8 @@
</span><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx">     foreach my $dictionary (@$allDictionaries) {
</span><del>-        $headerIncludes{$interface-&gt;type-&gt;name . &quot;.h&quot;} = 1 if $interface;
-        my $className = GetDictionaryClassName($dictionary-&gt;type, $interface);
</del><ins>+        $headerIncludes{$typeScope-&gt;type-&gt;name . &quot;.h&quot;} = 1 if $typeScope;
+        my $className = GetDictionaryClassName($dictionary-&gt;type, $typeScope);
</ins><span class="cx">         my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</span><span class="cx">         $result .= GenerateDictionaryHeaderContent($dictionary, $className, $conditionalString);
</span><span class="cx">     }
</span><span class="lines">@@ -1238,6 +1238,7 @@
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx"> 
</span><span class="cx">     my $name = $dictionary-&gt;type-&gt;name;
</span><ins>+    my $typeScope = $interface || $dictionary;
</ins><span class="cx"> 
</span><span class="cx">     $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</span><span class="cx"> 
</span><span class="lines">@@ -1299,7 +1300,7 @@
</span><span class="cx">             # 5.2. Let value be an ECMAScript value, depending on Type(V):
</span><span class="cx">             $result .= &quot;    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, \&quot;${key}\&quot;));\n&quot;;
</span><span class="cx"> 
</span><del>-            my $IDLType = GetIDLType($interface, $type);
</del><ins>+            my $IDLType = GetIDLType($typeScope, $type);
</ins><span class="cx"> 
</span><span class="cx">             # 5.3. If value is not undefined, then:
</span><span class="cx">             $result .= &quot;    if (!${key}Value.isUndefined()) {\n&quot;;
</span><span class="lines">@@ -1310,7 +1311,7 @@
</span><span class="cx">             # 5.4. Otherwise, if value is undefined but the dictionary member has a default value, then:
</span><span class="cx">             if (!$member-&gt;isRequired &amp;&amp; defined $member-&gt;default) {
</span><span class="cx">                 $result .= &quot;    } else\n&quot;;
</span><del>-                $result .= &quot;        result.$key = &quot; . GenerateDefaultValue($interface, $member, $member-&gt;type, $member-&gt;default) . &quot;;\n&quot;;
</del><ins>+                $result .= &quot;        result.$key = &quot; . GenerateDefaultValue($typeScope, $member, $member-&gt;type, $member-&gt;default) . &quot;;\n&quot;;
</ins><span class="cx">             } elsif ($member-&gt;isRequired) {
</span><span class="cx">                 # 5.5. Otherwise, if value is undefined and the dictionary member is a required dictionary member, then throw a TypeError.
</span><span class="cx">                 $result .= &quot;    } else {\n&quot;;
</span><span class="lines">@@ -1344,7 +1345,7 @@
</span><span class="cx">             my @sortedMembers = sort { $a-&gt;name cmp $b-&gt;name } @{$dictionary-&gt;members};
</span><span class="cx">             foreach my $member (@sortedMembers) {
</span><span class="cx">                 my $key = $member-&gt;name;
</span><del>-                my $IDLType = GetIDLType($interface, $member-&gt;type);
</del><ins>+                my $IDLType = GetIDLType($typeScope, $member-&gt;type);
</ins><span class="cx"> 
</span><span class="cx">                 # 1. Let key be the identifier of member.
</span><span class="cx">                 # 2. If the dictionary member named key is present in V, then:
</span><span class="lines">@@ -1374,13 +1375,13 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDictionariesImplementationContent
</span><span class="cx"> {
</span><del>-    my ($interface, $allDictionaries) = @_;
</del><ins>+    my ($typeScope, $allDictionaries) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx">     foreach my $dictionary (@$allDictionaries) {
</span><del>-        my $className = GetDictionaryClassName($dictionary-&gt;type, $interface);
</del><ins>+        my $className = GetDictionaryClassName($dictionary-&gt;type, $typeScope);
</ins><span class="cx">         my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</span><del>-        $result .= GenerateDictionaryImplementationContent($dictionary, $className, $interface, $conditionalString);
</del><ins>+        $result .= GenerateDictionaryImplementationContent($dictionary, $className, $typeScope, $conditionalString);
</ins><span class="cx">     }
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="lines">@@ -4544,7 +4545,7 @@
</span><span class="cx">     push(@headerContent, &quot;\nnamespace WebCore {\n\n&quot;);
</span><span class="cx">     push(@headerContent, GenerateDictionaryHeaderContent($dictionary, $className));
</span><span class="cx">     push(@headerContent, GenerateEnumerationsHeaderContent($dictionary, $enumerations));
</span><del>-    push(@headerContent, GenerateDictionariesHeaderContent(undef, $otherDictionaries)) if $otherDictionaries;
</del><ins>+    push(@headerContent, GenerateDictionariesHeaderContent($dictionary, $otherDictionaries)) if $otherDictionaries;
</ins><span class="cx">     push(@headerContent, &quot;} // namespace WebCore\n&quot;);
</span><span class="cx"> 
</span><span class="cx">     my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</span><span class="lines">@@ -4576,7 +4577,7 @@
</span><span class="cx">     push(@implContent, &quot;namespace WebCore {\n\n&quot;);
</span><span class="cx">     push(@implContent, GenerateDictionaryImplementationContent($dictionary, $className));
</span><span class="cx">     push(@implContent, GenerateEnumerationsImplementationContent($dictionary, $enumerations));
</span><del>-    push(@implContent, GenerateDictionariesImplementationContent(undef, $otherDictionaries)) if $otherDictionaries;
</del><ins>+    push(@implContent, GenerateDictionariesImplementationContent($dictionary, $otherDictionaries)) if $otherDictionaries;
</ins><span class="cx">     push(@implContent, &quot;} // namespace WebCore\n&quot;);
</span><span class="cx"> 
</span><span class="cx">     my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</span><span class="lines">@@ -5110,6 +5111,7 @@
</span><span class="cx">         &quot;SerializedScriptValue&quot; =&gt; &quot;IDLSerializedScriptValue&lt;SerializedScriptValue&gt;&quot;,
</span><span class="cx">         &quot;EventListener&quot; =&gt; &quot;IDLEventListener&lt;JSEventListener&gt;&quot;,
</span><span class="cx">         &quot;XPathNSResolver&quot; =&gt; &quot;IDLXPathNSResolver&lt;XPathNSResolver&gt;&quot;,
</span><ins>+        &quot;JSON&quot; =&gt; &quot;IDLJSON&quot;,
</ins><span class="cx"> 
</span><span class="cx">         # Convenience type aliases
</span><span class="cx">         &quot;BufferSource&quot; =&gt; &quot;IDLBufferSource&quot;,
</span><span class="lines">@@ -5334,6 +5336,7 @@
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;Date&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;SerializedScriptValue&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;XPathNSResolver&quot;;
</span><ins>+    return 1 if $type-&gt;name eq &quot;JSON&quot;;
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp (209926 => 209927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-12-16 18:48:31 UTC (rev 209926)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-12-16 18:56:24 UTC (rev 209927)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     }
</span><span class="cx">     JSValue enumMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumMember&quot;));
</span><span class="cx">     if (!enumMemberValue.isUndefined()) {
</span><del>-        result.enumMember = convert&lt;IDLEnumeration&lt;TestEnumInStandaloneDictionaryFile&gt;&gt;(state, enumMemberValue);
</del><ins>+        result.enumMember = convert&lt;IDLEnumeration&lt;TestStandaloneDictionary::EnumInStandaloneDictionaryFile&gt;&gt;(state, enumMemberValue);
</ins><span class="cx">         RETURN_IF_EXCEPTION(throwScope, { });
</span><span class="cx">     }
</span><span class="cx">     JSValue stringMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringMember&quot;));
</span></span></pre>
</div>
</div>

</body>
</html>