- a/Source/WebCore/ChangeLog +18 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2020-11-19  Chris Dumez  <cdumez@apple.com>
2
3
        Regression(r267865) Geolocation API's error callback should be nullable
4
        https://bugs.webkit.org/show_bug.cgi?id=219165
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Geolocation API's error callback should be nullable. The callback is nullable in both Firefox
9
        and Chrome and there is at least one WPT test that fails unless the error callback is nullable.
10
11
        The specification does not have this parameter as nullable. However, it is particularly risky
12
        to be the only engine matching the specification here, especially considering that we used to
13
        match other browser engines.
14
15
        No new tests, updated / rebaselined existing tests.
16
17
        * Modules/geolocation/Geolocation.idl:
18
1
2020-11-19  Antti Koivisto  <antti@apple.com>
19
2020-11-19  Antti Koivisto  <antti@apple.com>
2
20
3
        [LFC][Integration] Use inline iterator in CompositeEditCommand::deleteInsignificantText
21
        [LFC][Integration] Use inline iterator in CompositeEditCommand::deleteInsignificantText
- a/Source/WebCore/Modules/geolocation/Geolocation.idl -2 / +2 lines
Lines 31-41 a/Source/WebCore/Modules/geolocation/Geolocation.idl_sec1
31
    Exposed=Window
31
    Exposed=Window
32
] interface Geolocation {
32
] interface Geolocation {
33
    undefined getCurrentPosition(PositionCallback successCallback,
33
    undefined getCurrentPosition(PositionCallback successCallback,
34
                            optional PositionErrorCallback errorCallback,
34
                            optional PositionErrorCallback? errorCallback,
35
                            optional PositionOptions options);
35
                            optional PositionOptions options);
36
36
37
    long watchPosition(PositionCallback successCallback,
37
    long watchPosition(PositionCallback successCallback,
38
                       optional PositionErrorCallback errorCallback,
38
                       optional PositionErrorCallback? errorCallback,
39
                       optional PositionOptions options);
39
                       optional PositionOptions options);
40
40
41
    undefined clearWatch(long watchId);
41
    undefined clearWatch(long watchId);
- a/LayoutTests/ChangeLog +12 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2020-11-19  Chris Dumez  <cdumez@apple.com>
2
3
        Regression(r267865) Geolocation API's error callback should be nullable
4
        https://bugs.webkit.org/show_bug.cgi?id=219165
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Update existing test to reflect behavior change.
9
10
        * fast/dom/Geolocation/argument-types-expected.txt:
11
        * fast/dom/Geolocation/argument-types.html:
12
1
2020-11-19  Commit Queue  <commit-queue@webkit.org>
13
2020-11-19  Commit Queue  <commit-queue@webkit.org>
2
14
3
        Unreviewed, reverting r270009.
15
        Unreviewed, reverting r270009.
- a/LayoutTests/imported/w3c/ChangeLog +11 lines
Lines 1-3 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2020-11-19  Chris Dumez  <cdumez@apple.com>
2
3
        Regression(r267865) Geolocation API's error callback should be nullable
4
        https://bugs.webkit.org/show_bug.cgi?id=219165
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Rebaseline WPT test now that more checks are passing.
9
10
        * web-platform-tests/geolocation-API/PositionOptions.https-expected.txt:
11
1
2020-11-19  Chris Dumez  <cdumez@apple.com>
12
2020-11-19  Chris Dumez  <cdumez@apple.com>
2
13
3
        Resync web-platform-tests/beacon tests from upstream
14
        Resync web-platform-tests/beacon tests from upstream
- a/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt -1 / +2 lines
Lines 17-23 PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception TypeErro a/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt_sec1
17
PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
17
PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
18
PASS navigator.geolocation.getCurrentPosition("string") threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
18
PASS navigator.geolocation.getCurrentPosition("string") threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
19
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception.
19
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception.
20
PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
20
PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw exception.
21
PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
21
PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
22
PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
22
PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
23
PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception.
23
PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception.
Lines 78-83 PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout a/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt_sec2
78
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:Infinity}) did not throw exception.
78
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:Infinity}) did not throw exception.
79
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:-Infinity}) did not throw exception.
79
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:-Infinity}) did not throw exception.
80
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:"string"}) did not throw exception.
80
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:"string"}) did not throw exception.
81
PASS navigator.geolocation.watchPosition(emptyFunction, null) did not throw exception.
81
PASS successfullyParsed is true
82
PASS successfullyParsed is true
82
83
83
TEST COMPLETE
84
TEST COMPLETE
- a/LayoutTests/fast/dom/Geolocation/argument-types.html -1 / +3 lines
Lines 56-62 test('navigator.geolocation.getCurrentPosition(-Infinity)', true, "TypeError: Ar a/LayoutTests/fast/dom/Geolocation/argument-types.html_sec1
56
test('navigator.geolocation.getCurrentPosition("string")', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
56
test('navigator.geolocation.getCurrentPosition("string")', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
57
57
58
test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined)', false);
58
test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined)', false);
59
test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
59
test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', false);
60
test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
60
test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
61
test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
61
test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
62
test('navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction)', false);
62
test('navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction)', false);
Lines 123-128 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou a/LayoutTests/fast/dom/Geolocation/argument-types.html_sec2
123
test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:-Infinity})', false);
123
test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:-Infinity})', false);
124
test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:"string"})', false);
124
test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:"string"})', false);
125
125
126
test("navigator.geolocation.watchPosition(emptyFunction, null)", false);
127
126
window.jsTestIsAsync = false;
128
window.jsTestIsAsync = false;
127
129
128
</script>
130
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/geolocation-API/PositionOptions.https-expected.txt -2 / +2 lines
Lines 1-5 a/LayoutTests/imported/w3c/web-platform-tests/geolocation-API/PositionOptions.https-expected.txt_sec1
1
1
2
FAIL Call getCurrentPosition with wrong type for enableHighAccuracy. No exception expected. assert_unreached: An exception was thrown unexpectedly: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function Reached unreachable code
2
PASS Call getCurrentPosition with wrong type for enableHighAccuracy. No exception expected.
3
FAIL Call watchPosition with wrong type for enableHighAccuracy. No exception expected. assert_unreached: An exception was thrown unexpectedly: Argument 2 ('errorCallback') to Geolocation.watchPosition must be a function Reached unreachable code
3
PASS Call watchPosition with wrong type for enableHighAccuracy. No exception expected.
4
FAIL PositionOptions tests promise_test: Unhandled rejection with value: object "Error: unimplemented"
4
FAIL PositionOptions tests promise_test: Unhandled rejection with value: object "Error: unimplemented"
5
5

Return to Bug 219165