<!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>[209669] 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/209669">209669</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2016-12-10 11:36:08 -0800 (Sat, 10 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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/LayoutTests/ChangeLog        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-12-09 Sam Weinig <sam@webkit.org>
+
+ [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-09 Dave Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> [CSS Parser] Remove the old CSS Parser
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomGeolocationargumenttypesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -3,41 +3,41 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</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("string") 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("string") 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, "string") 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, "string") 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, "string") 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, "string") 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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -3,8 +3,8 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> if (expectedException)
</span><span class="cx"> shouldThrow(expression, '(function() { return "' + expectedException + '"; })();');
</span><span class="cx"> else
</span><del>- shouldThrow(expression, '(function() { return "TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object."; })();');
</del><ins>+ shouldThrow(expression, '(function() { return "TypeError: Type error"; })();');
</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, "TypeError: Not enough arguments");
</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, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(null)', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition({})', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(objectThrowingException)', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
</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("string")', true);
</del><ins>+test('navigator.geolocation.getCurrentPosition(true)', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(42)', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(Infinity)', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(-Infinity)', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition("string")', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
</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, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
</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, "string")', true);
</del><ins>+test('navigator.geolocation.getCurrentPosition(emptyFunction, true)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(emptyFunction, Infinity)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
+test('navigator.geolocation.getCurrentPosition(emptyFunction, "string")', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
</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, "string")', 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, "string")', 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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -180,6 +180,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">@@ -1133,7 +1134,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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/ChangeLog        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2016-12-09 Sam Weinig <sam@webkit.org>
+
+ [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-09 Dave Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> [CSS Parser] Remove the old CSS Parser
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -392,6 +392,7 @@
</span><span class="cx"> #include "JSPositionCallback.cpp"
</span><span class="cx"> #include "JSPositionError.cpp"
</span><span class="cx"> #include "JSPositionErrorCallback.cpp"
</span><ins>+#include "JSPositionOptions.cpp"
</ins><span class="cx"> #include "JSProcessingInstruction.cpp"
</span><span class="cx"> #include "JSProgressEvent.cpp"
</span><span class="cx"> #include "JSRadioNodeList.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/DerivedSources.make        2016-12-10 19:36:08 UTC (rev 209669)
</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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2016-12-10 19:36:08 UTC (rev 209669)
</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& geolocation, RefPtr<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, RefPtr<PositionOptions>&& options)
</del><ins>+GeoNotifier::GeoNotifier(Geolocation& geolocation, Ref<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, PositionOptions&& 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, &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<PositionError>&& 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->hasTimeout() && !m_options->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->hasTimeout())
- m_timer.startOneShot(m_options->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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2016-12-10 19:36:08 UTC (rev 209669)
</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 "PositionOptions.h"
</ins><span class="cx"> #include "Timer.h"
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</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<GeoNotifier> {
</span><span class="cx"> public:
</span><del>- static Ref<GeoNotifier> create(Geolocation& geolocation, RefPtr<PositionCallback>&& positionCallback, RefPtr<PositionErrorCallback>&& positionErrorCallback, RefPtr<PositionOptions>&& options)
</del><ins>+ static Ref<GeoNotifier> create(Geolocation& geolocation, Ref<PositionCallback>&& positionCallback, RefPtr<PositionErrorCallback>&& positionErrorCallback, PositionOptions&& 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& options() const { return m_options; }
</ins><span class="cx"> void setFatalError(RefPtr<PositionError>&&);
</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&, RefPtr<PositionCallback>&&, RefPtr<PositionErrorCallback>&&, RefPtr<PositionOptions>&&);
</del><ins>+ GeoNotifier(Geolocation&, Ref<PositionCallback>&&, RefPtr<PositionErrorCallback>&&, PositionOptions&&);
</ins><span class="cx">
</span><span class="cx"> Ref<Geolocation> m_geolocation;
</span><del>- RefPtr<PositionCallback> m_successCallback;
</del><ins>+ Ref<PositionCallback> m_successCallback;
</ins><span class="cx"> RefPtr<PositionErrorCallback> m_errorCallback;
</span><del>- RefPtr<PositionOptions> m_options;
</del><ins>+ PositionOptions m_options;
</ins><span class="cx"> Timer m_timer;
</span><span class="cx"> RefPtr<PositionError> 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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2016-12-10 19:36:08 UTC (rev 209669)
</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<Coordinates> coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(),
- position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(),
- position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed());
</del><ins>+ auto coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(),
+ position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(),
+ position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed());
+
</ins><span class="cx"> return Geoposition::create(WTFMove(coordinates), convertSecondsToDOMTimeStamp(position->timestamp()));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -149,21 +150,11 @@
</span><span class="cx"> ASSERT(m_allowGeolocation != InProgress);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Document* Geolocation::document() const
-{
- return downcast<Document>(scriptExecutionContext());
-}
-
</del><span class="cx"> SecurityOrigin* Geolocation::securityOrigin() const
</span><span class="cx"> {
</span><span class="cx"> return scriptExecutionContext()->securityOrigin();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Frame* Geolocation::frame() const
-{
- return document() ? document()->frame() : nullptr;
-}
-
</del><span class="cx"> Page* Geolocation::page() const
</span><span class="cx"> {
</span><span class="cx"> return document() ? document()->page() : nullptr;
</span><span class="lines">@@ -311,7 +302,7 @@
</span><span class="cx"> return m_lastPosition.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Geolocation::getCurrentPosition(RefPtr<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, RefPtr<PositionOptions>&& options)
</del><ins>+void Geolocation::getCurrentPosition(Ref<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, PositionOptions&& options)
</ins><span class="cx"> {
</span><span class="cx"> if (!frame())
</span><span class="cx"> return;
</span><span class="lines">@@ -322,7 +313,7 @@
</span><span class="cx"> m_oneShots.add(notifier);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Geolocation::watchPosition(RefPtr<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, RefPtr<PositionOptions>&& options)
</del><ins>+int Geolocation::watchPosition(Ref<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, PositionOptions&& options)
</ins><span class="cx"> {
</span><span class="cx"> if (!frame())
</span><span class="cx"> return 0;
</span><span class="lines">@@ -459,17 +450,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& 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->hasMaximumAge())
- return true;
- if (!options->maximumAge())
</del><ins>+ if (!options.maximumAge)
</ins><span class="cx"> return false;
</span><span class="cx"> DOMTimeStamp currentTimeMillis = convertSecondsToDOMTimeStamp(currentTime());
</span><del>- return cachedPosition->timestamp() > currentTimeMillis - options->maximumAge();
</del><ins>+ return cachedPosition->timestamp() > 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 +692,7 @@
</span><span class="cx"> if (!page)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- GeolocationController::from(page)->addObserver(this, notifier->options()->enableHighAccuracy());
</del><ins>+ GeolocationController::from(page)->addObserver(this, notifier->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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx">
</span><span class="cx"> #include "ActiveDOMObject.h"
</span><ins>+#include "Document.h"
</ins><span class="cx"> #include "Geoposition.h"
</span><span class="cx"> #include "PositionCallback.h"
</span><span class="cx"> #include "PositionError.h"
</span><span class="lines">@@ -41,7 +42,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Document;
</del><span class="cx"> class Frame;
</span><span class="cx"> class GeoNotifier;
</span><span class="cx"> class GeolocationError;
</span><span class="lines">@@ -48,21 +48,20 @@
</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<Geolocation>, public ActiveDOMObject
-{
-friend class GeoNotifier;
-
</del><ins>+class Geolocation : public ScriptWrappable, public RefCounted<Geolocation>, public ActiveDOMObject {
+ friend class GeoNotifier;
</ins><span class="cx"> public:
</span><span class="cx"> static Ref<Geolocation> create(ScriptExecutionContext*);
</span><span class="cx"> WEBCORE_EXPORT ~Geolocation();
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT void resetAllGeolocationPermission();
</span><del>- Document* document() const;
- WEBCORE_EXPORT Frame* frame() const;
</del><ins>+ Document* document() const { return downcast<Document>(scriptExecutionContext()); }
+ Frame* frame() const { return document() ? document()->frame() : nullptr; }
</ins><span class="cx">
</span><del>- void getCurrentPosition(RefPtr<PositionCallback>&&, RefPtr<PositionErrorCallback>&&, RefPtr<PositionOptions>&&);
- int watchPosition(RefPtr<PositionCallback>&&, RefPtr<PositionErrorCallback>&&, RefPtr<PositionOptions>&&);
</del><ins>+ void getCurrentPosition(Ref<PositionCallback>&&, RefPtr<PositionErrorCallback>&&, PositionOptions&&);
+ int watchPosition(Ref<PositionCallback>&&, RefPtr<PositionErrorCallback>&&, PositionOptions&&);
</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&);
</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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.idl        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.idl        2016-12-10 19:36:08 UTC (rev 209669)
</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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geoposition.h        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/Geoposition.h        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> class Geoposition : public RefCounted<Geoposition> {
</span><span class="cx"> public:
</span><del>- static Ref<Geoposition> create(RefPtr<Coordinates>&& coordinates, DOMTimeStamp timestamp)
</del><ins>+ static Ref<Geoposition> create(Ref<Coordinates>&& 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& coords() const { return m_coordinates.get(); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><del>- Geoposition(RefPtr<Coordinates>&& coordinates, DOMTimeStamp timestamp)
</del><ins>+ Geoposition(Ref<Coordinates>&& 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<Coordinates> m_coordinates;
</del><ins>+ Ref<Coordinates> 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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/PositionOptions.h        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/Modules/geolocation/PositionOptions.h        2016-12-10 19:36:08 UTC (rev 209669)
</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 <wtf/RefCounted.h>
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class PositionOptions : public RefCounted<PositionOptions> {
-public:
- static Ref<PositionOptions> 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 >= 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 >= 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 => 209669)</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-10 19:36:08 UTC (rev 209669)
</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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-10 19:36:08 UTC (rev 209669)
</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">@@ -6841,7 +6843,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">@@ -10313,6 +10314,9 @@
</span><span class="cx">                 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMGlobalObjectTask.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObjectTask.h; sourceTree = "<group>"; };
</span><span class="cx">                 7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DAttributes.h; sourceTree = "<group>"; };
</span><ins>+                7C330A031DF9E95B00D3395C /* PositionOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PositionOptions.idl; sourceTree = "<group>"; };
+                7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionOptions.cpp; sourceTree = "<group>"; };
+                7C330A061DF9F95100D3395C /* JSPositionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionOptions.h; sourceTree = "<group>"; };
</ins><span class="cx">                 7C33F3601B4A050400502CAF /* JSDocumentFragmentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentFragmentCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C39C3621DDA864900FEFB29 /* SVGLengthListValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLengthListValues.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C39C3631DDA864900FEFB29 /* SVGLengthListValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLengthListValues.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -14906,7 +14910,6 @@
</span><span class="cx">                 FE699870192087E7006936BD /* FloatingPointEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatingPointEnvironment.h; sourceTree = "<group>"; };
</span><span class="cx">                 FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinates.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 FE6FD48C0F676E9300092873 /* JSCoordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCoordinates.h; sourceTree = "<group>"; };
</span><del>-                FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocation.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 FE80DA600E9C4703000D6F75 /* JSGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeolocation.h; sourceTree = "<group>"; };
</span><span class="cx">                 FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeoposition.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -15653,6 +15656,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">@@ -17811,8 +17815,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">@@ -17952,6 +17954,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">@@ -18243,6 +18247,27 @@
</span><span class="cx">                         path = macOS;
</span><span class="cx">                         sourceTree = "<group>";
</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 = "<group>";
+                };
</ins><span class="cx">                 7C3E510718DF8F1200C112F7 /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -19133,6 +19158,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 = "<group>";
</span><span class="lines">@@ -20412,8 +20438,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">@@ -20452,10 +20476,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">@@ -20466,12 +20486,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">@@ -22048,7 +22062,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">@@ -25408,6 +25421,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">@@ -28761,6 +28775,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">@@ -29901,7 +29916,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 (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-12-10 19:36:08 UTC (rev 209669)
</span><span class="lines">@@ -76,7 +76,6 @@
</span><span class="cx"> #include "JSEventTargetCustom.cpp"
</span><span class="cx"> #include "JSExceptionBase.cpp"
</span><span class="cx"> #include "JSFileReaderCustom.cpp"
</span><del>-#include "JSGeolocationCustom.cpp"
</del><span class="cx"> #include "JSHTMLAllCollectionCustom.cpp"
</span><span class="cx"> #include "JSHTMLAppletElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLCanvasElementCustom.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSGeolocationCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp (209668 => 209669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp        2016-12-10 19:14:51 UTC (rev 209668)
+++ trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp        2016-12-10 19:36:08 UTC (rev 209669)
</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 "config.h"
-#include "JSGeolocation.h"
-
-#if ENABLE(GEOLOCATION)
-
-#include "CallbackFunction.h"
-#include "DOMWindow.h"
-#include "Geolocation.h"
-#include "JSDOMWindow.h"
-#include "JSDictionary.h"
-#include "JSPositionCallback.h"
-#include "JSPositionErrorCallback.h"
-#include "PositionOptions.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-// JSDictionary helper functions
-
-static void setEnableHighAccuracy(PositionOptions* options, const bool& enableHighAccuracy)
-{
- options->setEnableHighAccuracy(enableHighAccuracy);
-}
-
-static void setTimeout(PositionOptions* options, const double& timeout)
-{
- // If the value is positive infinity, there's nothing to do.
- if (!(std::isinf(timeout) && (timeout > 0))) {
- // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
- options->setTimeout(std::max<int>(0, timeout));
- }
-}
-
-static void setMaximumAge(PositionOptions* options, const double& maximumAge)
-{
- if (std::isinf(maximumAge) && (maximumAge > 0)) {
- // If the value is positive infinity, clear maximumAge.
- options->clearMaximumAge();
- } else {
- // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
- options->setMaximumAge(std::max<int>(0, maximumAge));
- }
-}
-
-
-static RefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValue value)
-{
- VM& vm = exec->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("enableHighAccuracy", options.ptr(), setEnableHighAccuracy))
- return nullptr;
- if (!dictionary.tryGetProperty("timeout", options.ptr(), setTimeout))
- return nullptr;
- if (!dictionary.tryGetProperty("maximumAge", options.ptr(), setMaximumAge))
- return nullptr;
-
- return WTFMove(options);
-}
-
-JSValue JSGeolocation::getCurrentPosition(ExecState& state)
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- // Arguments: PositionCallback, (optional)PositionErrorCallback, (optional)PositionOptions
-
- auto positionCallback = createFunctionOnlyCallback<JSPositionCallback>(&state, globalObject(), state.argument(0));
- RETURN_IF_EXCEPTION(scope, JSValue());
- ASSERT(positionCallback);
-
- auto positionErrorCallback = createFunctionOnlyCallback<JSPositionErrorCallback>(&state, globalObject(), state.argument(1), CallbackAllowUndefined | CallbackAllowNull);
- RETURN_IF_EXCEPTION(scope, JSValue());
-
- auto positionOptions = createPositionOptions(&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& state)
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- // Arguments: PositionCallback, (optional)PositionErrorCallback, (optional)PositionOptions
-
- auto positionCallback = createFunctionOnlyCallback<JSPositionCallback>(&state, globalObject(), state.argument(0));
- RETURN_IF_EXCEPTION(scope, JSValue());
- ASSERT(positionCallback);
-
- auto positionErrorCallback = createFunctionOnlyCallback<JSPositionErrorCallback>(&state, globalObject(), state.argument(1), CallbackAllowUndefined | CallbackAllowNull);
- RETURN_IF_EXCEPTION(scope, JSValue());
-
- auto positionOptions = createPositionOptions(&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>