<!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>[209612] trunk</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/209574">r209574</a>.

This change broke the Windows build.

Reverted changeset:

&quot;[WebIDL] Remove custom bindings for Geolocation&quot;
https://bugs.webkit.org/show_bug.cgi?id=165625
http://trac.webkit.org/changeset/209574</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomGeolocationargumenttypesexpectedtxt">trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomGeolocationnotenoughargumentsexpectedtxt">trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomGeolocationscripttestsargumenttypesjs">trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeoNotifiercpp">trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeoNotifierh">trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationcpp">trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationh">trunk/Source/WebCore/Modules/geolocation/Geolocation.h</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationidl">trunk/Source/WebCore/Modules/geolocation/Geolocation.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeopositionh">trunk/Source/WebCore/Modules/geolocation/Geoposition.h</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationPositionOptionsh">trunk/Source/WebCore/Modules/geolocation/PositionOptions.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp">trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSGeolocationCustomcpp">trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesgeolocationPositionOptionsidl">trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/LayoutTests/ChangeLog        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-12-09  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r209574.
+
+        This change broke the Windows build.
+
+        Reverted changeset:
+
+        &quot;[WebIDL] Remove custom bindings for Geolocation&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=165625
+        http://trac.webkit.org/changeset/209574
+
</ins><span class="cx"> 2016-12-09  Gustavo Noronha Silva  &lt;gustavo.noronha@collabora.co.uk&gt;
</span><span class="cx"> 
</span><span class="cx">         Fedora also needs a PHP7 config file alternative
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomGeolocationargumenttypesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -3,41 +3,41 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS navigator.geolocation.getCurrentPosition() threw exception TypeError: Not enough arguments.
-PASS navigator.geolocation.getCurrentPosition(undefined) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(null) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition({}) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
</del><ins>+PASS navigator.geolocation.getCurrentPosition() threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(undefined) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(null) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition({}) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</ins><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(Math.abs) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(testRunner.setGeolocationPermission) did not throw exception.
</span><del>-PASS navigator.geolocation.getCurrentPosition(true) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(42) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(&quot;string&quot;) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
</del><ins>+PASS navigator.geolocation.getCurrentPosition(true) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(42) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(&quot;string&quot;) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</ins><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw exception.
</span><del>-PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
</del><ins>+PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</ins><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, testRunner.setGeolocationPermission) did not throw exception.
</span><del>-PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, &quot;string&quot;) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
</del><ins>+PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, &quot;string&quot;) threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</ins><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, undefined) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, null) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {}) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, objectThrowingException) threw exception Error: enableHighAccuracy getter exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, emptyFunction) did not throw exception.
</span><del>-PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, true) threw exception TypeError: Type error.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, 42) threw exception TypeError: Type error.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, Infinity) threw exception TypeError: Type error.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, -Infinity) threw exception TypeError: Type error.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, &quot;string&quot;) threw exception TypeError: Type error.
</del><ins>+PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, true) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, 42) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, Infinity) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, -Infinity) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, &quot;string&quot;) did not throw exception.
</ins><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyProperty:undefined}) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyProperty:null}) did not throw exception.
</span><span class="cx"> PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyProperty:{}}) did not throw exception.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomGeolocationnotenoughargumentsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -3,8 +3,8 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS window.navigator.geolocation.getCurrentPosition() threw exception TypeError: Not enough arguments.
-PASS window.navigator.geolocation.watchPosition() threw exception TypeError: Not enough arguments.
</del><ins>+PASS window.navigator.geolocation.getCurrentPosition() threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
+PASS window.navigator.geolocation.watchPosition() threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</ins><span class="cx"> PASS window.navigator.geolocation.clearWatch() threw exception TypeError: Not enough arguments.
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomGeolocationscripttestsargumenttypesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">         if (expectedException)
</span><span class="cx">             shouldThrow(expression, '(function() { return &quot;' + expectedException + '&quot;; })();');
</span><span class="cx">         else
</span><del>-            shouldThrow(expression, '(function() { return &quot;TypeError: Type error&quot;; })();');
</del><ins>+            shouldThrow(expression, '(function() { return &quot;TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object.&quot;; })();');
</ins><span class="cx">     } else {
</span><span class="cx">         shouldNotThrow(expression);
</span><span class="cx">     }
</span><span class="lines">@@ -33,33 +33,33 @@
</span><span class="cx"> var objectThrowingException = new ObjectThrowingException();
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-test('navigator.geolocation.getCurrentPosition()', true, &quot;TypeError: Not enough arguments&quot;);
</del><ins>+test('navigator.geolocation.getCurrentPosition()', true);
</ins><span class="cx"> 
</span><del>-test('navigator.geolocation.getCurrentPosition(undefined)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(null)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition({})', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(objectThrowingException)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
</del><ins>+test('navigator.geolocation.getCurrentPosition(undefined)', true);
+test('navigator.geolocation.getCurrentPosition(null)', true);
+test('navigator.geolocation.getCurrentPosition({})', true);
+test('navigator.geolocation.getCurrentPosition(objectThrowingException)', true);
</ins><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction)', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(Math.abs)', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(testRunner.setGeolocationPermission)', false);
</span><del>-test('navigator.geolocation.getCurrentPosition(true)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(42)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(Infinity)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(-Infinity)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(&quot;string&quot;)', true, &quot;TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function&quot;);
</del><ins>+test('navigator.geolocation.getCurrentPosition(true)', true);
+test('navigator.geolocation.getCurrentPosition(42)', true);
+test('navigator.geolocation.getCurrentPosition(Infinity)', true);
+test('navigator.geolocation.getCurrentPosition(-Infinity)', true);
+test('navigator.geolocation.getCurrentPosition(&quot;string&quot;)', true);
</ins><span class="cx"> 
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined)', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', false);
</span><del>-test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
</del><ins>+test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true);
</ins><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction)', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs)', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, testRunner.setGeolocationPermission)', false);
</span><del>-test('navigator.geolocation.getCurrentPosition(emptyFunction, true)', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, Infinity)', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity)', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, &quot;string&quot;)', true, &quot;TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function&quot;);
</del><ins>+test('navigator.geolocation.getCurrentPosition(emptyFunction, true)', true);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, Infinity)', true);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity)', true);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, &quot;string&quot;)', true);
</ins><span class="cx"> 
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, undefined)', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, null)', false);
</span><span class="lines">@@ -66,11 +66,11 @@
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {})', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, objectThrowingException)', true, 'Error: enableHighAccuracy getter exception');
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, emptyFunction)', false);
</span><del>-test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, true)', true);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, 42)', true);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, Infinity)', true);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, -Infinity)', true);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, &quot;string&quot;)', true);
</del><ins>+test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, true)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, 42)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, Infinity)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, -Infinity)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, &quot;string&quot;)', false);
</ins><span class="cx"> 
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyProperty:undefined})', false);
</span><span class="cx"> test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyProperty:null})', false);
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -183,7 +183,6 @@
</span><span class="cx">     Modules/geolocation/PositionCallback.idl
</span><span class="cx">     Modules/geolocation/PositionError.idl
</span><span class="cx">     Modules/geolocation/PositionErrorCallback.idl
</span><del>-    Modules/geolocation/PositionOptions.idl
</del><span class="cx"> 
</span><span class="cx">     Modules/indexeddb/DOMWindowIndexedDatabase.idl
</span><span class="cx">     Modules/indexeddb/IDBCursor.idl
</span><span class="lines">@@ -1136,6 +1135,7 @@
</span><span class="cx">     bindings/js/JSEventTargetCustom.cpp
</span><span class="cx">     bindings/js/JSExceptionBase.cpp
</span><span class="cx">     bindings/js/JSFileReaderCustom.cpp
</span><ins>+    bindings/js/JSGeolocationCustom.cpp
</ins><span class="cx">     bindings/js/JSHTMLAllCollectionCustom.cpp
</span><span class="cx">     bindings/js/JSHTMLAppletElementCustom.cpp
</span><span class="cx">     bindings/js/JSHTMLCanvasElementCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/ChangeLog        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-12-09  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r209574.
+
+        This change broke the Windows build.
+
+        Reverted changeset:
+
+        &quot;[WebIDL] Remove custom bindings for Geolocation&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=165625
+        http://trac.webkit.org/changeset/209574
+
</ins><span class="cx"> 2016-12-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Custom Elements from a different document are not customized when created with innerHTML
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -392,7 +392,6 @@
</span><span class="cx"> #include &quot;JSPositionCallback.cpp&quot;
</span><span class="cx"> #include &quot;JSPositionError.cpp&quot;
</span><span class="cx"> #include &quot;JSPositionErrorCallback.cpp&quot;
</span><del>-#include &quot;JSPositionOptions.cpp&quot;
</del><span class="cx"> #include &quot;JSProcessingInstruction.cpp&quot;
</span><span class="cx"> #include &quot;JSProgressEvent.cpp&quot;
</span><span class="cx"> #include &quot;JSRadioNodeList.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/DerivedSources.make        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -114,7 +114,6 @@
</span><span class="cx">     $(WebCore)/Modules/geolocation/PositionCallback.idl \
</span><span class="cx">     $(WebCore)/Modules/geolocation/PositionError.idl \
</span><span class="cx">     $(WebCore)/Modules/geolocation/PositionErrorCallback.idl \
</span><del>-    $(WebCore)/Modules/geolocation/PositionOptions.idl \
</del><span class="cx">     $(WebCore)/Modules/indexeddb/DOMWindowIndexedDatabase.idl \
</span><span class="cx">     $(WebCore)/Modules/indexeddb/IDBCursor.idl \
</span><span class="cx">     $(WebCore)/Modules/indexeddb/IDBCursorWithValue.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeoNotifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-GeoNotifier::GeoNotifier(Geolocation&amp; geolocation, Ref&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, PositionOptions&amp;&amp; options)
</del><ins>+GeoNotifier::GeoNotifier(Geolocation&amp; geolocation, RefPtr&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</ins><span class="cx">     : m_geolocation(geolocation)
</span><span class="cx">     , m_successCallback(WTFMove(successCallback))
</span><span class="cx">     , m_errorCallback(WTFMove(errorCallback))
</span><span class="lines">@@ -42,6 +42,10 @@
</span><span class="cx">     , m_timer(*this, &amp;GeoNotifier::timerFired)
</span><span class="cx">     , m_useCachedPosition(false)
</span><span class="cx"> {
</span><ins>+    ASSERT(m_successCallback);
+    // If no options were supplied from JS, we should have created a default set
+    // of options in JSGeolocationCustom.cpp.
+    ASSERT(m_options);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GeoNotifier::setFatalError(RefPtr&lt;PositionError&gt;&amp;&amp; error)
</span><span class="lines">@@ -66,7 +70,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool GeoNotifier::hasZeroTimeout() const
</span><span class="cx"> {
</span><del>-    return !m_options.timeout;
</del><ins>+    return m_options-&gt;hasTimeout() &amp;&amp; !m_options-&gt;timeout();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GeoNotifier::runSuccessCallback(Geoposition* position)
</span><span class="lines">@@ -87,7 +91,8 @@
</span><span class="cx"> 
</span><span class="cx"> void GeoNotifier::startTimerIfNeeded()
</span><span class="cx"> {
</span><del>-    m_timer.startOneShot(m_options.timeout / 1000.0);
</del><ins>+    if (m_options-&gt;hasTimeout())
+        m_timer.startOneShot(m_options-&gt;timeout() / 1000.0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GeoNotifier::stopTimer()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeoNotifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx"> 
</span><del>-#include &quot;PositionOptions.h&quot;
</del><span class="cx"> #include &quot;Timer.h&quot;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="lines">@@ -41,15 +40,16 @@
</span><span class="cx"> class PositionCallback;
</span><span class="cx"> class PositionError;
</span><span class="cx"> class PositionErrorCallback;
</span><ins>+class PositionOptions;
</ins><span class="cx"> 
</span><span class="cx"> class GeoNotifier : public RefCounted&lt;GeoNotifier&gt; {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;GeoNotifier&gt; create(Geolocation&amp; geolocation, Ref&lt;PositionCallback&gt;&amp;&amp; positionCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; positionErrorCallback, PositionOptions&amp;&amp; options)
</del><ins>+    static Ref&lt;GeoNotifier&gt; create(Geolocation&amp; geolocation, RefPtr&lt;PositionCallback&gt;&amp;&amp; positionCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; positionErrorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(*new GeoNotifier(geolocation, WTFMove(positionCallback), WTFMove(positionErrorCallback), WTFMove(options)));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    const PositionOptions&amp; options() const { return m_options; }
</del><ins>+    PositionOptions* options() const { return m_options.get(); }
</ins><span class="cx">     void setFatalError(RefPtr&lt;PositionError&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="cx">     bool useCachedPosition() const { return m_useCachedPosition; }
</span><span class="lines">@@ -64,12 +64,12 @@
</span><span class="cx">     bool hasZeroTimeout() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    GeoNotifier(Geolocation&amp;, Ref&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, PositionOptions&amp;&amp;);
</del><ins>+    GeoNotifier(Geolocation&amp;, RefPtr&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, RefPtr&lt;PositionOptions&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;Geolocation&gt; m_geolocation;
</span><del>-    Ref&lt;PositionCallback&gt; m_successCallback;
</del><ins>+    RefPtr&lt;PositionCallback&gt; m_successCallback;
</ins><span class="cx">     RefPtr&lt;PositionErrorCallback&gt; m_errorCallback;
</span><del>-    PositionOptions m_options;
</del><ins>+    RefPtr&lt;PositionOptions&gt; m_options;
</ins><span class="cx">     Timer m_timer;
</span><span class="cx">     RefPtr&lt;PositionError&gt; m_fatalError;
</span><span class="cx">     bool m_useCachedPosition;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -57,10 +57,9 @@
</span><span class="cx">     if (!position)
</span><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    auto coordinates = Coordinates::create(position-&gt;latitude(), position-&gt;longitude(), position-&gt;canProvideAltitude(), position-&gt;altitude(), 
-        position-&gt;accuracy(), position-&gt;canProvideAltitudeAccuracy(), position-&gt;altitudeAccuracy(),
-        position-&gt;canProvideHeading(), position-&gt;heading(), position-&gt;canProvideSpeed(), position-&gt;speed());
-
</del><ins>+    RefPtr&lt;Coordinates&gt; coordinates = Coordinates::create(position-&gt;latitude(), position-&gt;longitude(), position-&gt;canProvideAltitude(), position-&gt;altitude(), 
+                                                          position-&gt;accuracy(), position-&gt;canProvideAltitudeAccuracy(), position-&gt;altitudeAccuracy(),
+                                                          position-&gt;canProvideHeading(), position-&gt;heading(), position-&gt;canProvideSpeed(), position-&gt;speed());
</ins><span class="cx">     return Geoposition::create(WTFMove(coordinates), convertSecondsToDOMTimeStamp(position-&gt;timestamp()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -312,7 +311,7 @@
</span><span class="cx">     return m_lastPosition.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Geolocation::getCurrentPosition(Ref&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, PositionOptions&amp;&amp; options)
</del><ins>+void Geolocation::getCurrentPosition(RefPtr&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</ins><span class="cx"> {
</span><span class="cx">     if (!frame())
</span><span class="cx">         return;
</span><span class="lines">@@ -323,7 +322,7 @@
</span><span class="cx">     m_oneShots.add(notifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Geolocation::watchPosition(Ref&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, PositionOptions&amp;&amp; options)
</del><ins>+int Geolocation::watchPosition(RefPtr&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</ins><span class="cx"> {
</span><span class="cx">     if (!frame())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -460,15 +459,17 @@
</span><span class="cx">         stopUpdating();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Geolocation::haveSuitableCachedPosition(const PositionOptions&amp; options)
</del><ins>+bool Geolocation::haveSuitableCachedPosition(PositionOptions* options)
</ins><span class="cx"> {
</span><span class="cx">     Geoposition* cachedPosition = lastPosition();
</span><span class="cx">     if (!cachedPosition)
</span><span class="cx">         return false;
</span><del>-    if (!options.maximumAge)
</del><ins>+    if (!options-&gt;hasMaximumAge())
+        return true;
+    if (!options-&gt;maximumAge())
</ins><span class="cx">         return false;
</span><span class="cx">     DOMTimeStamp currentTimeMillis = convertSecondsToDOMTimeStamp(currentTime());
</span><del>-    return cachedPosition-&gt;timestamp() &gt; currentTimeMillis - options.maximumAge;
</del><ins>+    return cachedPosition-&gt;timestamp() &gt; currentTimeMillis - options-&gt;maximumAge();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::clearWatch(int watchID)
</span><span class="lines">@@ -702,7 +703,7 @@
</span><span class="cx">     if (!page)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    GeolocationController::from(page)-&gt;addObserver(this, notifier-&gt;options().enableHighAccuracy);
</del><ins>+    GeolocationController::from(page)-&gt;addObserver(this, notifier-&gt;options()-&gt;enableHighAccuracy());
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.h (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -48,10 +48,11 @@
</span><span class="cx"> class Page;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx"> class SecurityOrigin;
</span><del>-struct PositionOptions;
</del><span class="cx"> 
</span><del>-class Geolocation : public ScriptWrappable, public RefCounted&lt;Geolocation&gt;, public ActiveDOMObject {
-    friend class GeoNotifier;
</del><ins>+class Geolocation : public ScriptWrappable, public RefCounted&lt;Geolocation&gt;, public ActiveDOMObject
+{
+friend class GeoNotifier;
+
</ins><span class="cx"> public:
</span><span class="cx">     static Ref&lt;Geolocation&gt; create(ScriptExecutionContext*);
</span><span class="cx">     WEBCORE_EXPORT ~Geolocation();
</span><span class="lines">@@ -60,8 +61,8 @@
</span><span class="cx">     Document* document() const;
</span><span class="cx">     WEBCORE_EXPORT Frame* frame() const;
</span><span class="cx"> 
</span><del>-    void getCurrentPosition(Ref&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, PositionOptions&amp;&amp;);
-    int watchPosition(Ref&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, PositionOptions&amp;&amp;);
</del><ins>+    void getCurrentPosition(RefPtr&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, RefPtr&lt;PositionOptions&gt;&amp;&amp;);
+    int watchPosition(RefPtr&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, RefPtr&lt;PositionOptions&gt;&amp;&amp;);
</ins><span class="cx">     void clearWatch(int watchID);
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void setIsAllowed(bool);
</span><span class="lines">@@ -140,7 +141,7 @@
</span><span class="cx">     void fatalErrorOccurred(GeoNotifier*);
</span><span class="cx">     void requestTimedOut(GeoNotifier*);
</span><span class="cx">     void requestUsesCachedPosition(GeoNotifier*);
</span><del>-    bool haveSuitableCachedPosition(const PositionOptions&amp;);
</del><ins>+    bool haveSuitableCachedPosition(PositionOptions*);
</ins><span class="cx">     void makeCachedPositionCallbacks();
</span><span class="cx"> 
</span><span class="cx">     GeoNotifierSet m_oneShots;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.idl (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.idl        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.idl        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -29,16 +29,14 @@
</span><span class="cx">     Conditional=GEOLOCATION, 
</span><span class="cx">     GenerateIsReachable=ImplFrame,
</span><span class="cx"> ] interface Geolocation {
</span><del>-    // FIXME: PositionErrorCallback should not be nullable
-    void getCurrentPosition(PositionCallback successCallback,
-                            optional PositionErrorCallback? errorCallback,
-                            optional PositionOptions options);
</del><ins>+    [Custom] void getCurrentPosition(PositionCallback successCallback,
+                                     optional PositionErrorCallback? errorCallback,
+                                     optional PositionOptions options);
</ins><span class="cx"> 
</span><del>-    // FIXME: PositionErrorCallback should not be nullable
-    long watchPosition(PositionCallback successCallback,
-                       optional PositionErrorCallback? errorCallback,
-                       optional PositionOptions options);
</del><ins>+    [Custom] long watchPosition(PositionCallback successCallback,
+                                optional PositionErrorCallback? errorCallback,
+                                optional PositionOptions options);
</ins><span class="cx"> 
</span><del>-    void clearWatch(long watchId);
</del><ins>+    void clearWatch(long watchID);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeopositionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geoposition.h (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geoposition.h        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/Geoposition.h        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> class Geoposition : public RefCounted&lt;Geoposition&gt; {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;Geoposition&gt; create(Ref&lt;Coordinates&gt;&amp;&amp; coordinates, DOMTimeStamp timestamp)
</del><ins>+    static Ref&lt;Geoposition&gt; create(RefPtr&lt;Coordinates&gt;&amp;&amp; coordinates, DOMTimeStamp timestamp)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(*new Geoposition(WTFMove(coordinates), timestamp));
</span><span class="cx">     }
</span><span class="lines">@@ -45,16 +45,17 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     DOMTimeStamp timestamp() const { return m_timestamp; }
</span><del>-    const Coordinates&amp; coords() const { return m_coordinates.get(); }
</del><ins>+    Coordinates* coords() const { return m_coordinates.get(); }
</ins><span class="cx">     
</span><span class="cx"> private:
</span><del>-    Geoposition(Ref&lt;Coordinates&gt;&amp;&amp; coordinates, DOMTimeStamp timestamp)
</del><ins>+    Geoposition(RefPtr&lt;Coordinates&gt;&amp;&amp; coordinates, DOMTimeStamp timestamp)
</ins><span class="cx">         : m_coordinates(WTFMove(coordinates))
</span><span class="cx">         , m_timestamp(timestamp)
</span><span class="cx">     {
</span><ins>+        ASSERT(m_coordinates);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Ref&lt;Coordinates&gt; m_coordinates;
</del><ins>+    RefPtr&lt;Coordinates&gt; m_coordinates;
</ins><span class="cx">     DOMTimeStamp m_timestamp;
</span><span class="cx"> };
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationPositionOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/PositionOptions.h (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionOptions.h        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/PositionOptions.h        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -25,12 +25,55 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include &lt;wtf/RefCounted.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">     
</span><del>-struct PositionOptions {
-    bool enableHighAccuracy { false };
-    unsigned timeout { 0xFFFFFFFF };
-    unsigned maximumAge { 0 };
</del><ins>+class PositionOptions : public RefCounted&lt;PositionOptions&gt; {
+public:
+    static Ref&lt;PositionOptions&gt; create() { return adoptRef(*new PositionOptions()); }
+
+    bool enableHighAccuracy() const { return m_highAccuracy; }
+    void setEnableHighAccuracy(bool enable) { m_highAccuracy = enable; }
+    bool hasTimeout() const { return m_hasTimeout; }
+    int timeout() const
+    {
+        ASSERT(hasTimeout());
+        return m_timeout;
+    }
+    void setTimeout(int timeout)
+    {
+        ASSERT(timeout &gt;= 0);
+        m_hasTimeout = true;
+        m_timeout = timeout;
+    }
+    bool hasMaximumAge() const { return m_hasMaximumAge; }
+    int maximumAge() const
+    {
+        ASSERT(hasMaximumAge());
+        return m_maximumAge;
+    }
+    void clearMaximumAge() { m_hasMaximumAge = false; }
+    void setMaximumAge(int age)
+    {
+        ASSERT(age &gt;= 0);
+        m_hasMaximumAge = true;
+        m_maximumAge = age;
+    }
+    
+private:
+    PositionOptions()
+        : m_highAccuracy(false)
+        , m_hasTimeout(false)
+    {
+        setMaximumAge(0);
+    }
+    
+    bool m_highAccuracy;
+    bool m_hasTimeout;
+    int m_timeout;
+    bool m_hasMaximumAge;
+    int m_maximumAge;
</ins><span class="cx"> };
</span><span class="cx">     
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationPositionOptionsidl"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -1,30 +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.
- */
-
-dictionary PositionOptions {
-    boolean enableHighAccuracy = false;
-    [Clamp] unsigned long timeout = 0xFFFFFFFF;
-    [Clamp] unsigned long maximumAge = 0;
-};
</del></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -2842,8 +2842,6 @@
</span><span class="cx">                 7C2BDD3D17C7F98C0038FF15 /* JSDOMGlobalObjectTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */; };
</span><span class="cx">                 7C2BDD3E17C7F98C0038FF15 /* JSDOMGlobalObjectTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */; };
</span><span class="cx">                 7C330A021DF8FAC600D3395C /* GraphicsContext3DAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                7C330A071DF9F95100D3395C /* JSPositionOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */; };
-                7C330A081DF9F95100D3395C /* JSPositionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A061DF9F95100D3395C /* JSPositionOptions.h */; };
</del><span class="cx">                 7C33F3621B4A050400502CAF /* JSDocumentFragmentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C33F3601B4A050400502CAF /* JSDocumentFragmentCustom.cpp */; };
</span><span class="cx">                 7C39C3641DDA864C00FEFB29 /* SVGLengthListValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C39C3621DDA864900FEFB29 /* SVGLengthListValues.cpp */; };
</span><span class="cx">                 7C39C3651DDA865200FEFB29 /* SVGLengthListValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C39C3631DDA864900FEFB29 /* SVGLengthListValues.h */; };
</span><span class="lines">@@ -6845,6 +6843,7 @@
</span><span class="cx">                 FE699872192087E7006936BD /* FloatingPointEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = FE699870192087E7006936BD /* FloatingPointEnvironment.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */; };
</span><span class="cx">                 FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD48C0F676E9300092873 /* JSCoordinates.h */; };
</span><ins>+                FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */; };
</ins><span class="cx">                 FE80DA630E9C4703000D6F75 /* JSGeolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */; };
</span><span class="cx">                 FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80DA600E9C4703000D6F75 /* JSGeolocation.h */; };
</span><span class="cx">                 FE80DA650E9C4703000D6F75 /* JSGeoposition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */; };
</span><span class="lines">@@ -10317,9 +10316,6 @@
</span><span class="cx">                 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMGlobalObjectTask.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObjectTask.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DAttributes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                7C330A031DF9E95B00D3395C /* PositionOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PositionOptions.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
-                7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionOptions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                7C330A061DF9F95100D3395C /* JSPositionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionOptions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 7C33F3601B4A050400502CAF /* JSDocumentFragmentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentFragmentCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C39C3621DDA864900FEFB29 /* SVGLengthListValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLengthListValues.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C39C3631DDA864900FEFB29 /* SVGLengthListValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLengthListValues.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14915,6 +14911,7 @@
</span><span class="cx">                 FE699870192087E7006936BD /* FloatingPointEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatingPointEnvironment.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinates.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE6FD48C0F676E9300092873 /* JSCoordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCoordinates.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocation.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE80DA600E9C4703000D6F75 /* JSGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeolocation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeoposition.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15661,7 +15658,6 @@
</span><span class="cx">                                 42A023FA1A39F13A00F722CF /* FetchAPI */,
</span><span class="cx">                                 89878576122CA1DA003AABDA /* FileAPI */,
</span><span class="cx">                                 518F4FFC194CABE30081BAAE /* Gamepad */,
</span><del>-                                7C330A041DF9F93B00D3395C /* Geolocation */,
</del><span class="cx">                                 A83B79080CCAFF2B000B0825 /* HTML */,
</span><span class="cx">                                 AA93C850175D5B2000FD3CE3 /* IndieUI */,
</span><span class="cx">                                 1C5FAECA0DCFD8C900D58F78 /* Inspector */,
</span><span class="lines">@@ -17822,6 +17818,8 @@
</span><span class="cx">                 65BF02180974806300C43196 /* page */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                AD5A0C211DECA10100707054 /* PerformanceLogging.cpp */,
+                                AD5A0C201DECA0B500707054 /* PerformanceLogging.h */,
</ins><span class="cx">                                 316FE1060E6E1D8400BF6088 /* animation */,
</span><span class="cx">                                 5D5975B5196362BE00D00878 /* cocoa */,
</span><span class="cx">                                 CE17AD141C58522F005F4799 /* csp */,
</span><span class="lines">@@ -17961,8 +17959,6 @@
</span><span class="cx">                                 CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */,
</span><span class="cx">                                 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */,
</span><span class="cx">                                 86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */,
</span><del>-                                AD5A0C211DECA10100707054 /* PerformanceLogging.cpp */,
-                                AD5A0C201DECA0B500707054 /* PerformanceLogging.h */,
</del><span class="cx">                                 8AF4E55211DC5A36000ED3DE /* PerformanceNavigation.cpp */,
</span><span class="cx">                                 8AF4E55311DC5A36000ED3DE /* PerformanceNavigation.h */,
</span><span class="cx">                                 8AF4E55411DC5A36000ED3DE /* PerformanceNavigation.idl */,
</span><span class="lines">@@ -18254,27 +18250,6 @@
</span><span class="cx">                         path = macOS;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><del>-                7C330A041DF9F93B00D3395C /* Geolocation */ = {
-                        isa = PBXGroup;
-                        children = (
-                                FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */,
-                                FE6FD48C0F676E9300092873 /* JSCoordinates.h */,
-                                FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */,
-                                FE80DA600E9C4703000D6F75 /* JSGeolocation.h */,
-                                FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */,
-                                FE80DA620E9C4703000D6F75 /* JSGeoposition.h */,
-                                598365E31355F604001B185D /* JSPositionCallback.cpp */,
-                                598365DC1355F53C001B185D /* JSPositionCallback.h */,
-                                FE80DA6D0E9C472F000D6F75 /* JSPositionError.cpp */,
-                                FE80DA6E0E9C472F000D6F75 /* JSPositionError.h */,
-                                598365E51355F60D001B185D /* JSPositionErrorCallback.cpp */,
-                                598365DE1355F562001B185D /* JSPositionErrorCallback.h */,
-                                7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */,
-                                7C330A061DF9F95100D3395C /* JSPositionOptions.h */,
-                        );
-                        name = Geolocation;
-                        sourceTree = &quot;&lt;group&gt;&quot;;
-                };
</del><span class="cx">                 7C3E510718DF8F1200C112F7 /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -19166,7 +19141,6 @@
</span><span class="cx">                                 9746AF2014F4DDE6003E7A70 /* PositionErrorCallback.h */,
</span><span class="cx">                                 9746AF2114F4DDE6003E7A70 /* PositionErrorCallback.idl */,
</span><span class="cx">                                 9746AF2214F4DDE6003E7A70 /* PositionOptions.h */,
</span><del>-                                7C330A031DF9E95B00D3395C /* PositionOptions.idl */,
</del><span class="cx">                         );
</span><span class="cx">                         path = geolocation;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -20444,6 +20418,8 @@
</span><span class="cx">                                 65DF31E009D1CC60000BE325 /* JSCharacterData.h */,
</span><span class="cx">                                 93F9B6DE0BA0FB7200854064 /* JSComment.cpp */,
</span><span class="cx">                                 93F9B6DF0BA0FB7200854064 /* JSComment.h */,
</span><ins>+                                FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */,
+                                FE6FD48C0F676E9300092873 /* JSCoordinates.h */,
</ins><span class="cx">                                 9BE671091D5AEB0400345514 /* JSCustomElementRegistry.cpp */,
</span><span class="cx">                                 9BE6710A1D5AEB0400345514 /* JSCustomElementRegistry.h */,
</span><span class="cx">                                 BCA83E4D0D7CE1E9003421A8 /* JSDataTransfer.cpp */,
</span><span class="lines">@@ -20482,6 +20458,10 @@
</span><span class="cx">                                 BC64649611D82349006455B0 /* JSDOMStringMap.h */,
</span><span class="cx">                                 65DF31E509D1CC60000BE325 /* JSElement.cpp */,
</span><span class="cx">                                 65DF31E609D1CC60000BE325 /* JSElement.h */,
</span><ins>+                                FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */,
+                                FE80DA600E9C4703000D6F75 /* JSGeolocation.h */,
+                                FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */,
+                                FE80DA620E9C4703000D6F75 /* JSGeoposition.h */,
</ins><span class="cx">                                 C6F0902414327D4F00685849 /* JSMutationObserver.cpp */,
</span><span class="cx">                                 C6F0902514327D4F00685849 /* JSMutationObserver.h */,
</span><span class="cx">                                 C6F08FC71431000D00685849 /* JSMutationRecord.cpp */,
</span><span class="lines">@@ -20492,6 +20472,12 @@
</span><span class="cx">                                 14DC0D3609FED073007B0235 /* JSNode.h */,
</span><span class="cx">                                 BCD9C2BE0C17B69E005C90A2 /* JSNodeList.cpp */,
</span><span class="cx">                                 BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */,
</span><ins>+                                598365E31355F604001B185D /* JSPositionCallback.cpp */,
+                                598365DC1355F53C001B185D /* JSPositionCallback.h */,
+                                FE80DA6D0E9C472F000D6F75 /* JSPositionError.cpp */,
+                                FE80DA6E0E9C472F000D6F75 /* JSPositionError.h */,
+                                598365E51355F60D001B185D /* JSPositionErrorCallback.cpp */,
+                                598365DE1355F562001B185D /* JSPositionErrorCallback.h */,
</ins><span class="cx">                                 65DF31EB09D1CC60000BE325 /* JSProcessingInstruction.cpp */,
</span><span class="cx">                                 65DF31EC09D1CC60000BE325 /* JSProcessingInstruction.h */,
</span><span class="cx">                                 E4B423850CBFB73C00AF2ECE /* JSProgressEvent.cpp */,
</span><span class="lines">@@ -22068,6 +22054,7 @@
</span><span class="cx">                                 2E7582ED12764F260062628B /* JSFileReaderCustom.cpp */,
</span><span class="cx">                                 C28083411C6DC96A001451B6 /* JSFontFaceCustom.cpp */,
</span><span class="cx">                                 1C24EEAA1C72AA0A0080F8FC /* JSFontFaceSetCustom.cpp */,
</span><ins>+                                FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */,
</ins><span class="cx">                                 BCE7B1920D4E86960075A539 /* JSHistoryCustom.cpp */,
</span><span class="cx">                                 BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
</span><span class="cx">                                 BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */,
</span><span class="lines">@@ -25431,7 +25418,6 @@
</span><span class="cx">                                 E3A776681DC85D2800B690D8 /* DOMJITIDLType.h in Headers */,
</span><span class="cx">                                 E35802B61DC8435D00A9773C /* DOMJITIDLTypeFilter.h in Headers */,
</span><span class="cx">                                 A9C6E4E40D745E05006442E9 /* DOMMimeType.h in Headers */,
</span><del>-                                7C330A081DF9F95100D3395C /* JSPositionOptions.h in Headers */,
</del><span class="cx">                                 A9C6E4E80D745E18006442E9 /* DOMMimeTypeArray.h in Headers */,
</span><span class="cx">                                 5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */,
</span><span class="cx">                                 52B6C9C315E3F4DF00690B05 /* DOMNamedFlowCollection.h in Headers */,
</span><span class="lines">@@ -28783,7 +28769,6 @@
</span><span class="cx">                                 FD31601512B0267600C1A359 /* AudioNodeInput.cpp in Sources */,
</span><span class="cx">                                 FD31601712B0267600C1A359 /* AudioNodeOutput.cpp in Sources */,
</span><span class="cx">                                 FD31601C12B0267600C1A359 /* AudioParam.cpp in Sources */,
</span><del>-                                7C330A071DF9F95100D3395C /* JSPositionOptions.cpp in Sources */,
</del><span class="cx">                                 FD35918F138DB22000E1EBEC /* AudioParamTimeline.cpp in Sources */,
</span><span class="cx">                                 FD31601F12B0267600C1A359 /* AudioProcessingEvent.cpp in Sources */,
</span><span class="cx">                                 FD31608512B026F700C1A359 /* AudioResampler.cpp in Sources */,
</span><span class="lines">@@ -29926,6 +29911,7 @@
</span><span class="cx">                                 518F5003194CAC3A0081BAAE /* JSGamepadButton.cpp in Sources */,
</span><span class="cx">                                 516C62251950E2B900337E75 /* JSGamepadEvent.cpp in Sources */,
</span><span class="cx">                                 FE80DA630E9C4703000D6F75 /* JSGeolocation.cpp in Sources */,
</span><ins>+                                FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */,
</ins><span class="cx">                                 FE80DA650E9C4703000D6F75 /* JSGeoposition.cpp in Sources */,
</span><span class="cx">                                 0FDA7C1E188322FC00C954B5 /* JSGestureEvent.cpp in Sources */,
</span><span class="cx">                                 8482B7511198CB6B00BFB005 /* JSHashChangeEvent.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (209611 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-12-09 17:57:39 UTC (rev 209611)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx"> #include &quot;JSEventTargetCustom.cpp&quot;
</span><span class="cx"> #include &quot;JSExceptionBase.cpp&quot;
</span><span class="cx"> #include &quot;JSFileReaderCustom.cpp&quot;
</span><ins>+#include &quot;JSGeolocationCustom.cpp&quot;
</ins><span class="cx"> #include &quot;JSHTMLAllCollectionCustom.cpp&quot;
</span><span class="cx"> #include &quot;JSHTMLAppletElementCustom.cpp&quot;
</span><span class="cx"> #include &quot;JSHTMLCanvasElementCustom.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSGeolocationCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp (0 => 209612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp        2016-12-09 18:12:31 UTC (rev 209612)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+/*
+ * Copyright (C) 2008 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. ``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
+ * 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;JSGeolocation.h&quot;
+
+#if ENABLE(GEOLOCATION)
+
+#include &quot;CallbackFunction.h&quot;
+#include &quot;DOMWindow.h&quot;
+#include &quot;Geolocation.h&quot;
+#include &quot;JSDOMWindow.h&quot;
+#include &quot;JSDictionary.h&quot;
+#include &quot;JSPositionCallback.h&quot;
+#include &quot;JSPositionErrorCallback.h&quot;
+#include &quot;PositionOptions.h&quot;
+
+using namespace JSC;
+
+namespace WebCore {
+
+// JSDictionary helper functions
+
+static void setEnableHighAccuracy(PositionOptions* options, const bool&amp; enableHighAccuracy)
+{
+    options-&gt;setEnableHighAccuracy(enableHighAccuracy);
+}
+
+static void setTimeout(PositionOptions* options, const double&amp; timeout)
+{
+    // If the value is positive infinity, there's nothing to do.
+    if (!(std::isinf(timeout) &amp;&amp; (timeout &gt; 0))) {
+        // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
+        options-&gt;setTimeout(std::max&lt;int&gt;(0, timeout));
+    }
+}
+
+static void setMaximumAge(PositionOptions* options, const double&amp; maximumAge)
+{
+    if (std::isinf(maximumAge) &amp;&amp; (maximumAge &gt; 0)) {
+        // If the value is positive infinity, clear maximumAge.
+        options-&gt;clearMaximumAge();
+    } else {
+        // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
+        options-&gt;setMaximumAge(std::max&lt;int&gt;(0, maximumAge));
+    }
+}
+
+
+static RefPtr&lt;PositionOptions&gt; createPositionOptions(ExecState* exec, JSValue value)
+{
+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    // Create default options.
+    auto options = PositionOptions::create();
+
+    // Argument is optional (hence undefined is allowed), and null is allowed.
+    if (value.isUndefinedOrNull()) {
+        // Use default options.
+        return WTFMove(options);
+    }
+
+    // Given the above test, this will always yield an object.
+    JSObject* object = value.toObject(exec);
+    ASSERT_UNUSED(scope, !scope.exception());
+
+    // Create the dictionary wrapper from the initializer object.
+    JSDictionary dictionary(exec, object);
+
+    if (!dictionary.tryGetProperty(&quot;enableHighAccuracy&quot;, options.ptr(), setEnableHighAccuracy))
+        return nullptr;
+    if (!dictionary.tryGetProperty(&quot;timeout&quot;, options.ptr(), setTimeout))
+        return nullptr;
+    if (!dictionary.tryGetProperty(&quot;maximumAge&quot;, options.ptr(), setMaximumAge))
+        return nullptr;
+
+    return WTFMove(options);
+}
+
+JSValue JSGeolocation::getCurrentPosition(ExecState&amp; state)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    // Arguments: PositionCallback, (optional)PositionErrorCallback, (optional)PositionOptions
+
+    auto positionCallback = createFunctionOnlyCallback&lt;JSPositionCallback&gt;(&amp;state, globalObject(), state.argument(0));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+    ASSERT(positionCallback);
+
+    auto positionErrorCallback = createFunctionOnlyCallback&lt;JSPositionErrorCallback&gt;(&amp;state, globalObject(), state.argument(1), CallbackAllowUndefined | CallbackAllowNull);
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    auto positionOptions = createPositionOptions(&amp;state, state.argument(2));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+    ASSERT(positionOptions);
+
+    wrapped().getCurrentPosition(WTFMove(positionCallback), WTFMove(positionErrorCallback), WTFMove(positionOptions));
+    return jsUndefined();
+}
+
+JSValue JSGeolocation::watchPosition(ExecState&amp; state)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    // Arguments: PositionCallback, (optional)PositionErrorCallback, (optional)PositionOptions
+
+    auto positionCallback = createFunctionOnlyCallback&lt;JSPositionCallback&gt;(&amp;state, globalObject(), state.argument(0));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+    ASSERT(positionCallback);
+
+    auto positionErrorCallback = createFunctionOnlyCallback&lt;JSPositionErrorCallback&gt;(&amp;state, globalObject(), state.argument(1), CallbackAllowUndefined | CallbackAllowNull);
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    auto positionOptions = createPositionOptions(&amp;state, state.argument(2));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+    ASSERT(positionOptions);
+
+    int watchID = wrapped().watchPosition(WTFMove(positionCallback), WTFMove(positionErrorCallback), WTFMove(positionOptions));
+    return jsNumber(watchID);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(GEOLOCATION)
</ins></span></pre>
</div>
</div>

</body>
</html>