<!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>[209574] 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/209574">209574</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2016-12-08 14:52:37 -0800 (Thu, 08 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebIDL] Remove custom bindings for Geolocation
https://bugs.webkit.org/show_bug.cgi?id=165625

Reviewed by Alex Christensen.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Add/remove files.

* Modules/geolocation/GeoNotifier.cpp:
(WebCore::GeoNotifier::GeoNotifier):
(WebCore::GeoNotifier::hasZeroTimeout):
(WebCore::GeoNotifier::startTimerIfNeeded):
* Modules/geolocation/GeoNotifier.h:
(WebCore::GeoNotifier::create):
(WebCore::GeoNotifier::options):
Update to store PositionOptions as a value, and pass the PositionCallback
as a Ref, rather than a RefPtr, since it is not optional.

* Modules/geolocation/Geolocation.cpp:
(WebCore::createGeoposition):
Use auto, to get the good type for Coordinates (Ref).

(WebCore::Geolocation::getCurrentPosition):
(WebCore::Geolocation::watchPosition):
(WebCore::Geolocation::haveSuitableCachedPosition):
(WebCore::Geolocation::startUpdating):
* Modules/geolocation/Geolocation.h:
Update to pass PositionOptions itself now that it is a plain struct.

* Modules/geolocation/Geolocation.idl:
Remove [Custom] extended attribute and add FIXME about nullable annotation. 

* Modules/geolocation/Geoposition.h:
Pass/store Coordinates as a Ref.
 
* Modules/geolocation/PositionOptions.h:
Convert to be a simple struct.

* Modules/geolocation/PositionOptions.idl:
Added.
        
* bindings/js/JSGeolocationCustom.cpp:
Removed.

LayoutTests:

* fast/dom/Geolocation/argument-types-expected.txt:
* fast/dom/Geolocation/not-enough-arguments-expected.txt:
* fast/dom/Geolocation/script-tests/argument-types.js:
Update tests for improved error messages / adherence to WebIDL.</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="#trunkSourceWebCoreModulesgeolocationPositionOptionsidl">trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl</a></li>
</ul>

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

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/LayoutTests/ChangeLog        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-12-08  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Remove custom bindings for Geolocation
+        https://bugs.webkit.org/show_bug.cgi?id=165625
+
+        Reviewed by Alex Christensen.
+
+        * fast/dom/Geolocation/argument-types-expected.txt:
+        * fast/dom/Geolocation/not-enough-arguments-expected.txt:
+        * fast/dom/Geolocation/script-tests/argument-types.js:
+        Update tests for improved error messages / adherence to WebIDL.
+
</ins><span class="cx"> 2016-12-08  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Parser] Unskip passing flexbox tests
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomGeolocationargumenttypesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt        2016-12-08 22:52:37 UTC (rev 209574)
</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 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..
</del><ins>+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.
</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 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..
</del><ins>+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.
</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 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..
</del><ins>+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.
</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 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..
</del><ins>+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.
</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) 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.
</del><ins>+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.
</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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt        2016-12-08 22:52:37 UTC (rev 209574)
</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 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..
</del><ins>+PASS window.navigator.geolocation.getCurrentPosition() threw exception TypeError: Not enough arguments.
+PASS window.navigator.geolocation.watchPosition() threw exception TypeError: Not enough arguments.
</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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js        2016-12-08 22:52:37 UTC (rev 209574)
</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;TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object.&quot;; })();');
</del><ins>+            shouldThrow(expression, '(function() { return &quot;TypeError: Type error&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);
</del><ins>+test('navigator.geolocation.getCurrentPosition()', true, &quot;TypeError: Not enough arguments&quot;);
</ins><span class="cx"> 
</span><del>-test('navigator.geolocation.getCurrentPosition(undefined)', true);
-test('navigator.geolocation.getCurrentPosition(null)', true);
-test('navigator.geolocation.getCurrentPosition({})', true);
-test('navigator.geolocation.getCurrentPosition(objectThrowingException)', true);
</del><ins>+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;);
</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);
-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);
</del><ins>+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;);
</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);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true);
</del><ins>+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;);
</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);
-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);
</del><ins>+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;);
</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)', 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);
</del><ins>+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);
</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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -183,6 +183,7 @@
</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><ins>+    Modules/geolocation/PositionOptions.idl
</ins><span class="cx"> 
</span><span class="cx">     Modules/indexeddb/DOMWindowIndexedDatabase.idl
</span><span class="cx">     Modules/indexeddb/IDBCursor.idl
</span><span class="lines">@@ -1135,7 +1136,6 @@
</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><del>-    bindings/js/JSGeolocationCustom.cpp
</del><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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/ChangeLog        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2016-12-08  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Remove custom bindings for Geolocation
+        https://bugs.webkit.org/show_bug.cgi?id=165625
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp:
+        Add/remove files.
+
+        * Modules/geolocation/GeoNotifier.cpp:
+        (WebCore::GeoNotifier::GeoNotifier):
+        (WebCore::GeoNotifier::hasZeroTimeout):
+        (WebCore::GeoNotifier::startTimerIfNeeded):
+        * Modules/geolocation/GeoNotifier.h:
+        (WebCore::GeoNotifier::create):
+        (WebCore::GeoNotifier::options):
+        Update to store PositionOptions as a value, and pass the PositionCallback
+        as a Ref, rather than a RefPtr, since it is not optional.
+
+        * Modules/geolocation/Geolocation.cpp:
+        (WebCore::createGeoposition):
+        Use auto, to get the good type for Coordinates (Ref).
+
+        (WebCore::Geolocation::getCurrentPosition):
+        (WebCore::Geolocation::watchPosition):
+        (WebCore::Geolocation::haveSuitableCachedPosition):
+        (WebCore::Geolocation::startUpdating):
+        * Modules/geolocation/Geolocation.h:
+        Update to pass PositionOptions itself now that it is a plain struct.
+
+        * Modules/geolocation/Geolocation.idl:
+        Remove [Custom] extended attribute and add FIXME about nullable annotation. 
+
+        * Modules/geolocation/Geoposition.h:
+        Pass/store Coordinates as a Ref.

+        * Modules/geolocation/PositionOptions.h:
+        Convert to be a simple struct.
+
+        * Modules/geolocation/PositionOptions.idl:
+        Added.
+        
+        * bindings/js/JSGeolocationCustom.cpp:
+        Removed.
+
</ins><span class="cx"> 2016-12-08  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (URL parser): Relative URLs aren’t resolved correctly when the base URL is an applewebdata: URL
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -392,6 +392,7 @@
</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><ins>+#include &quot;JSPositionOptions.cpp&quot;
</ins><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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/DerivedSources.make        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -114,6 +114,7 @@
</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><ins>+    $(WebCore)/Modules/geolocation/PositionOptions.idl \
</ins><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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2016-12-08 22:52:37 UTC (rev 209574)
</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, RefPtr&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</del><ins>+GeoNotifier::GeoNotifier(Geolocation&amp; geolocation, Ref&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, PositionOptions&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,10 +42,6 @@
</span><span class="cx">     , m_timer(*this, &amp;GeoNotifier::timerFired)
</span><span class="cx">     , m_useCachedPosition(false)
</span><span class="cx"> {
</span><del>-    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);
</del><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">@@ -70,7 +66,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool GeoNotifier::hasZeroTimeout() const
</span><span class="cx"> {
</span><del>-    return m_options-&gt;hasTimeout() &amp;&amp; !m_options-&gt;timeout();
</del><ins>+    return !m_options.timeout;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GeoNotifier::runSuccessCallback(Geoposition* position)
</span><span class="lines">@@ -91,8 +87,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GeoNotifier::startTimerIfNeeded()
</span><span class="cx"> {
</span><del>-    if (m_options-&gt;hasTimeout())
-        m_timer.startOneShot(m_options-&gt;timeout() / 1000.0);
</del><ins>+    m_timer.startOneShot(m_options.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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx"> 
</span><ins>+#include &quot;PositionOptions.h&quot;
</ins><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">@@ -40,16 +41,15 @@
</span><span class="cx"> class PositionCallback;
</span><span class="cx"> class PositionError;
</span><span class="cx"> class PositionErrorCallback;
</span><del>-class PositionOptions;
</del><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, RefPtr&lt;PositionCallback&gt;&amp;&amp; positionCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; positionErrorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</del><ins>+    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)
</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>-    PositionOptions* options() const { return m_options.get(); }
</del><ins>+    const PositionOptions&amp; options() const { return m_options; }
</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;, RefPtr&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, RefPtr&lt;PositionOptions&gt;&amp;&amp;);
</del><ins>+    GeoNotifier(Geolocation&amp;, Ref&lt;PositionCallback&gt;&amp;&amp;, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp;, PositionOptions&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;Geolocation&gt; m_geolocation;
</span><del>-    RefPtr&lt;PositionCallback&gt; m_successCallback;
</del><ins>+    Ref&lt;PositionCallback&gt; m_successCallback;
</ins><span class="cx">     RefPtr&lt;PositionErrorCallback&gt; m_errorCallback;
</span><del>-    RefPtr&lt;PositionOptions&gt; m_options;
</del><ins>+    PositionOptions 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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -57,9 +57,10 @@
</span><span class="cx">     if (!position)
</span><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    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());
</del><ins>+    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());
+
</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">@@ -311,7 +312,7 @@
</span><span class="cx">     return m_lastPosition.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Geolocation::getCurrentPosition(RefPtr&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</del><ins>+void Geolocation::getCurrentPosition(Ref&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, PositionOptions&amp;&amp; options)
</ins><span class="cx"> {
</span><span class="cx">     if (!frame())
</span><span class="cx">         return;
</span><span class="lines">@@ -322,7 +323,7 @@
</span><span class="cx">     m_oneShots.add(notifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Geolocation::watchPosition(RefPtr&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, RefPtr&lt;PositionOptions&gt;&amp;&amp; options)
</del><ins>+int Geolocation::watchPosition(Ref&lt;PositionCallback&gt;&amp;&amp; successCallback, RefPtr&lt;PositionErrorCallback&gt;&amp;&amp; errorCallback, PositionOptions&amp;&amp; options)
</ins><span class="cx"> {
</span><span class="cx">     if (!frame())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -459,17 +460,15 @@
</span><span class="cx">         stopUpdating();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Geolocation::haveSuitableCachedPosition(PositionOptions* options)
</del><ins>+bool Geolocation::haveSuitableCachedPosition(const PositionOptions&amp; 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-&gt;hasMaximumAge())
-        return true;
-    if (!options-&gt;maximumAge())
</del><ins>+    if (!options.maximumAge)
</ins><span class="cx">         return false;
</span><span class="cx">     DOMTimeStamp currentTimeMillis = convertSecondsToDOMTimeStamp(currentTime());
</span><del>-    return cachedPosition-&gt;timestamp() &gt; currentTimeMillis - options-&gt;maximumAge();
</del><ins>+    return cachedPosition-&gt;timestamp() &gt; currentTimeMillis - options.maximumAge;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::clearWatch(int watchID)
</span><span class="lines">@@ -703,7 +702,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()-&gt;enableHighAccuracy());
</del><ins>+    GeolocationController::from(page)-&gt;addObserver(this, notifier-&gt;options().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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -48,11 +48,10 @@
</span><span class="cx"> class Page;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx"> class SecurityOrigin;
</span><ins>+struct PositionOptions;
</ins><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">@@ -61,8 +60,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(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;);
</del><ins>+    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;);
</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">@@ -141,7 +140,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(PositionOptions*);
</del><ins>+    bool haveSuitableCachedPosition(const PositionOptions&amp;);
</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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.idl        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.idl        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -29,14 +29,16 @@
</span><span class="cx">     Conditional=GEOLOCATION, 
</span><span class="cx">     GenerateIsReachable=ImplFrame,
</span><span class="cx"> ] interface Geolocation {
</span><del>-    [Custom] void getCurrentPosition(PositionCallback successCallback,
-                                     optional PositionErrorCallback? errorCallback,
-                                     optional PositionOptions options);
</del><ins>+    // FIXME: PositionErrorCallback should not be nullable
+    void getCurrentPosition(PositionCallback successCallback,
+                            optional PositionErrorCallback? errorCallback,
+                            optional PositionOptions options);
</ins><span class="cx"> 
</span><del>-    [Custom] long watchPosition(PositionCallback successCallback,
-                                optional PositionErrorCallback? errorCallback,
-                                optional PositionOptions options);
</del><ins>+    // FIXME: PositionErrorCallback should not be nullable
+    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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geoposition.h        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/Geoposition.h        2016-12-08 22:52:37 UTC (rev 209574)
</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(RefPtr&lt;Coordinates&gt;&amp;&amp; coordinates, DOMTimeStamp timestamp)
</del><ins>+    static Ref&lt;Geoposition&gt; create(Ref&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,17 +45,16 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     DOMTimeStamp timestamp() const { return m_timestamp; }
</span><del>-    Coordinates* coords() const { return m_coordinates.get(); }
</del><ins>+    const Coordinates&amp; coords() const { return m_coordinates.get(); }
</ins><span class="cx">     
</span><span class="cx"> private:
</span><del>-    Geoposition(RefPtr&lt;Coordinates&gt;&amp;&amp; coordinates, DOMTimeStamp timestamp)
</del><ins>+    Geoposition(Ref&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><del>-        ASSERT(m_coordinates);
</del><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Coordinates&gt; m_coordinates;
</del><ins>+    Ref&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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionOptions.h        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/Modules/geolocation/PositionOptions.h        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -25,55 +25,12 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &lt;wtf/RefCounted.h&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">     
</span><del>-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;
</del><ins>+struct PositionOptions {
+    bool enableHighAccuracy { false };
+    unsigned timeout { 0xFFFFFFFF };
+    unsigned maximumAge { 0 };
</ins><span class="cx"> };
</span><span class="cx">     
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationPositionOptionsidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl (0 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/geolocation/PositionOptions.idl        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -0,0 +1,30 @@
</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.
+ */
+
+dictionary PositionOptions {
+    boolean enableHighAccuracy = false;
+    [Clamp] unsigned long timeout = 0xFFFFFFFF;
+    [Clamp] unsigned long maximumAge = 0;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -2841,6 +2841,8 @@
</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><ins>+                7C330A071DF9F95100D3395C /* JSPositionOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */; };
+                7C330A081DF9F95100D3395C /* JSPositionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A061DF9F95100D3395C /* JSPositionOptions.h */; };
</ins><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">@@ -6842,7 +6844,6 @@
</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><del>-                FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */; };
</del><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">@@ -10314,6 +10315,9 @@
</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><ins>+                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;; };
</ins><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">@@ -14909,7 +14913,6 @@
</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><del>-                FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><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">@@ -15656,6 +15659,7 @@
</span><span class="cx">                                 42A023FA1A39F13A00F722CF /* FetchAPI */,
</span><span class="cx">                                 89878576122CA1DA003AABDA /* FileAPI */,
</span><span class="cx">                                 518F4FFC194CABE30081BAAE /* Gamepad */,
</span><ins>+                                7C330A041DF9F93B00D3395C /* Geolocation */,
</ins><span class="cx">                                 A83B79080CCAFF2B000B0825 /* HTML */,
</span><span class="cx">                                 AA93C850175D5B2000FD3CE3 /* IndieUI */,
</span><span class="cx">                                 1C5FAECA0DCFD8C900D58F78 /* Inspector */,
</span><span class="lines">@@ -17816,8 +17820,6 @@
</span><span class="cx">                 65BF02180974806300C43196 /* page */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                AD5A0C211DECA10100707054 /* PerformanceLogging.cpp */,
-                                AD5A0C201DECA0B500707054 /* PerformanceLogging.h */,
</del><span class="cx">                                 316FE1060E6E1D8400BF6088 /* animation */,
</span><span class="cx">                                 5D5975B5196362BE00D00878 /* cocoa */,
</span><span class="cx">                                 CE17AD141C58522F005F4799 /* csp */,
</span><span class="lines">@@ -17957,6 +17959,8 @@
</span><span class="cx">                                 CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */,
</span><span class="cx">                                 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */,
</span><span class="cx">                                 86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */,
</span><ins>+                                AD5A0C211DECA10100707054 /* PerformanceLogging.cpp */,
+                                AD5A0C201DECA0B500707054 /* PerformanceLogging.h */,
</ins><span class="cx">                                 8AF4E55211DC5A36000ED3DE /* PerformanceNavigation.cpp */,
</span><span class="cx">                                 8AF4E55311DC5A36000ED3DE /* PerformanceNavigation.h */,
</span><span class="cx">                                 8AF4E55411DC5A36000ED3DE /* PerformanceNavigation.idl */,
</span><span class="lines">@@ -18248,6 +18252,27 @@
</span><span class="cx">                         path = macOS;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                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;;
+                };
</ins><span class="cx">                 7C3E510718DF8F1200C112F7 /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -19139,6 +19164,7 @@
</span><span class="cx">                                 9746AF2014F4DDE6003E7A70 /* PositionErrorCallback.h */,
</span><span class="cx">                                 9746AF2114F4DDE6003E7A70 /* PositionErrorCallback.idl */,
</span><span class="cx">                                 9746AF2214F4DDE6003E7A70 /* PositionOptions.h */,
</span><ins>+                                7C330A031DF9E95B00D3395C /* PositionOptions.idl */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = geolocation;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -20416,8 +20442,6 @@
</span><span class="cx">                                 65DF31E009D1CC60000BE325 /* JSCharacterData.h */,
</span><span class="cx">                                 93F9B6DE0BA0FB7200854064 /* JSComment.cpp */,
</span><span class="cx">                                 93F9B6DF0BA0FB7200854064 /* JSComment.h */,
</span><del>-                                FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */,
-                                FE6FD48C0F676E9300092873 /* JSCoordinates.h */,
</del><span class="cx">                                 9BE671091D5AEB0400345514 /* JSCustomElementRegistry.cpp */,
</span><span class="cx">                                 9BE6710A1D5AEB0400345514 /* JSCustomElementRegistry.h */,
</span><span class="cx">                                 BCA83E4D0D7CE1E9003421A8 /* JSDataTransfer.cpp */,
</span><span class="lines">@@ -20456,10 +20480,6 @@
</span><span class="cx">                                 BC64649611D82349006455B0 /* JSDOMStringMap.h */,
</span><span class="cx">                                 65DF31E509D1CC60000BE325 /* JSElement.cpp */,
</span><span class="cx">                                 65DF31E609D1CC60000BE325 /* JSElement.h */,
</span><del>-                                FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */,
-                                FE80DA600E9C4703000D6F75 /* JSGeolocation.h */,
-                                FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */,
-                                FE80DA620E9C4703000D6F75 /* JSGeoposition.h */,
</del><span class="cx">                                 C6F0902414327D4F00685849 /* JSMutationObserver.cpp */,
</span><span class="cx">                                 C6F0902514327D4F00685849 /* JSMutationObserver.h */,
</span><span class="cx">                                 C6F08FC71431000D00685849 /* JSMutationRecord.cpp */,
</span><span class="lines">@@ -20470,12 +20490,6 @@
</span><span class="cx">                                 14DC0D3609FED073007B0235 /* JSNode.h */,
</span><span class="cx">                                 BCD9C2BE0C17B69E005C90A2 /* JSNodeList.cpp */,
</span><span class="cx">                                 BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */,
</span><del>-                                598365E31355F604001B185D /* JSPositionCallback.cpp */,
-                                598365DC1355F53C001B185D /* JSPositionCallback.h */,
-                                FE80DA6D0E9C472F000D6F75 /* JSPositionError.cpp */,
-                                FE80DA6E0E9C472F000D6F75 /* JSPositionError.h */,
-                                598365E51355F60D001B185D /* JSPositionErrorCallback.cpp */,
-                                598365DE1355F562001B185D /* JSPositionErrorCallback.h */,
</del><span class="cx">                                 65DF31EB09D1CC60000BE325 /* JSProcessingInstruction.cpp */,
</span><span class="cx">                                 65DF31EC09D1CC60000BE325 /* JSProcessingInstruction.h */,
</span><span class="cx">                                 E4B423850CBFB73C00AF2ECE /* JSProgressEvent.cpp */,
</span><span class="lines">@@ -22052,7 +22066,6 @@
</span><span class="cx">                                 2E7582ED12764F260062628B /* JSFileReaderCustom.cpp */,
</span><span class="cx">                                 C28083411C6DC96A001451B6 /* JSFontFaceCustom.cpp */,
</span><span class="cx">                                 1C24EEAA1C72AA0A0080F8FC /* JSFontFaceSetCustom.cpp */,
</span><del>-                                FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */,
</del><span class="cx">                                 BCE7B1920D4E86960075A539 /* JSHistoryCustom.cpp */,
</span><span class="cx">                                 BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
</span><span class="cx">                                 BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */,
</span><span class="lines">@@ -25415,6 +25428,7 @@
</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><ins>+                                7C330A081DF9F95100D3395C /* JSPositionOptions.h in Headers */,
</ins><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">@@ -28766,6 +28780,7 @@
</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><ins>+                                7C330A071DF9F95100D3395C /* JSPositionOptions.cpp in Sources */,
</ins><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">@@ -29908,7 +29923,6 @@
</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><del>-                                FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */,
</del><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 (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -76,7 +76,6 @@
</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><del>-#include &quot;JSGeolocationCustom.cpp&quot;
</del><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="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp (209573 => 209574)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp        2016-12-08 22:50:28 UTC (rev 209573)
+++ trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp        2016-12-08 22:52:37 UTC (rev 209574)
</span><span class="lines">@@ -1,149 +0,0 @@
</span><del>-/*
- * 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)
</del></span></pre>
</div>
</div>

</body>
</html>