Skip to content
Permalink
Browse files
Unreviewed, revert r288307 as it caused correctness issues
https://bugs.webkit.org/show_bug.cgi?id=240280
<rdar://92641509>

Revert r288307 again since it introduced some bad regressions, identified
on the radar.

Canonical link: https://commits.webkit.org/250452@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed May 10, 2022
1 parent 850fdaa commit 1cdedb510d519a62a08ec6808893746ee2704f04
Showing with 231 additions and 969 deletions.
  1. +1 −1 LayoutTests/fast/dom/Geolocation/callback-to-deleted-context-expected.txt
  2. +1 −1 LayoutTests/fast/dom/Geolocation/callback-to-deleted-context.html
  3. +2 −2 LayoutTests/fast/dom/Geolocation/disconnected-frame-already-expected.txt
  4. +1 −3 LayoutTests/fast/dom/Geolocation/disconnected-frame-expected.txt
  5. +3 −5 LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt
  6. +13 −11 LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied.html
  7. +7 −7 LayoutTests/fast/dom/Geolocation/disconnected-frame.html
  8. +1 −1 LayoutTests/fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html
  9. +0 −5 LayoutTests/fast/dom/callback-function-detached-frame-intersection-observer-expected.txt
  10. +0 −61 LayoutTests/fast/dom/callback-function-detached-frame-intersection-observer.html
  11. +0 −5 LayoutTests/fast/dom/callback-function-detached-frame-mutation-observer-expected.txt
  12. +0 −61 LayoutTests/fast/dom/callback-function-detached-frame-mutation-observer.html
  13. +0 −5 LayoutTests/fast/dom/callback-function-detached-frame-performance-observer-expected.txt
  14. +0 −55 LayoutTests/fast/dom/callback-function-detached-frame-performance-observer.html
  15. +3 −3 LayoutTests/fast/dom/callback-function-detached-frame-queue-microtask-expected.txt
  16. +0 −5 LayoutTests/fast/dom/callback-function-detached-frame-raf-expected.txt
  17. +0 −59 LayoutTests/fast/dom/callback-function-detached-frame-raf.html
  18. +0 −5 LayoutTests/fast/dom/callback-function-detached-frame-resize-observer-expected.txt
  19. +0 −61 LayoutTests/fast/dom/callback-function-detached-frame-resize-observer.html
  20. +0 −5 LayoutTests/fast/dom/callback-function-detached-frame-to-blob-expected.txt
  21. +0 −52 LayoutTests/fast/dom/callback-function-detached-frame-to-blob.html
  22. +0 −8 LayoutTests/fast/dom/callback-interface-detached-frame-node-filter-expected.txt
  23. +0 −85 LayoutTests/fast/dom/callback-interface-detached-frame-node-filter.html
  24. +0 −8 LayoutTests/fast/dom/callback-interface-detached-frame-xpathnsresolver-expected.txt
  25. +0 −85 LayoutTests/fast/dom/callback-interface-detached-frame-xpathnsresolver.html
  26. +0 −14 LayoutTests/fast/dom/resources/callback-function-detached-frame-common.js
  27. +0 −20 LayoutTests/fast/dom/resources/callback-function-detached-frame-intersection-observer-iframe.html
  28. +0 −14 LayoutTests/fast/dom/resources/callback-function-detached-frame-mutation-observer-iframe.html
  29. +0 −14 LayoutTests/fast/dom/resources/callback-function-detached-frame-performance-observer-iframe.html
  30. +0 −9 LayoutTests/fast/dom/resources/callback-function-detached-frame-raf-iframe.html
  31. +0 −20 LayoutTests/fast/dom/resources/callback-function-detached-frame-resize-observer-iframe.html
  32. +0 −9 LayoutTests/fast/dom/resources/callback-function-detached-frame-to-blob-iframe.html
  33. +0 −49 LayoutTests/fast/dom/resources/callback-interface-detached-frame-node-filter-iframe.html
  34. +0 −53 LayoutTests/fast/dom/resources/callback-interface-detached-frame-xpathnsresolver-iframe.html
  35. +1 −1 LayoutTests/fast/events/detached-svg-parent-window-events-expected.txt
  36. +1 −1 LayoutTests/fast/events/detached-svg-parent-window-events.html
  37. +1 −1 LayoutTests/fast/frames/frame-window-as-callback-expected.txt
  38. +3 −3 LayoutTests/fast/frames/frame-window-as-callback.html
  39. +4 −0 LayoutTests/fast/frames/resources/wrong-global-object.html
  40. +9 −3 ...ported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt
  41. +1 −1 ...m-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-expected.txt
  42. +5 −7 ...sts/imported/w3c/web-platform-tests/domxpath/resolver-callback-interface-cross-realm-expected.txt
  43. +2 −1 LayoutTests/imported/w3c/web-platform-tests/geolocation-API/non-fully-active.https-expected.txt
  44. +1 −4 LayoutTests/platform/mac-wk1/TestExpectations
  45. +0 −2 LayoutTests/platform/win/TestExpectations
  46. +0 −2 LayoutTests/platform/wincairo/TestExpectations
  47. +2 −2 Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp
  48. +1 −1 Source/WebCore/Modules/webaudio/AudioWorkletProcessor.cpp
  49. +5 −5 Source/WebCore/bindings/js/JSCallbackData.cpp
  50. +27 −10 Source/WebCore/bindings/js/JSCallbackData.h
  51. +4 −4 Source/WebCore/bindings/js/JSDOMConvertCallbacks.h
  52. +1 −1 Source/WebCore/bindings/js/JSDOMConvertXPathNSResolver.h
  53. +2 −2 Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
  54. +1 −1 Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
  55. +17 −11 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
  56. +3 −0 Source/WebCore/bindings/scripts/IDLAttributes.json
  57. +5 −5 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp
  58. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h
  59. +5 −5 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp
  60. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h
  61. +5 −5 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp
  62. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h
  63. +5 −5 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp
  64. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h
  65. +21 −21 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp
  66. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h
  67. +2 −2 Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp
  68. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp
  69. +2 −2 Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp
  70. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp
  71. +16 −16 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
  72. +2 −2 Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp
  73. +2 −2 Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
  74. +5 −5 Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp
  75. +3 −3 Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h
  76. +1 −1 Source/WebCore/dom/NodeFilter.idl
  77. +0 −2 Source/WebCore/dom/Traversal.cpp
  78. +12 −6 Source/WebCore/page/IntersectionObserver.cpp
  79. +0 −1 Source/WebCore/page/IntersectionObserver.h
  80. +1 −1 Source/WebCore/workers/WorkerOrWorkletGlobalScope.h
  81. +1 −1 Source/WebCore/worklets/PaintWorkletGlobalScope.cpp
  82. +1 −1 Source/WebCore/xml/CustomXPathNSResolver.idl
@@ -4,7 +4,7 @@ Tests that when a Geolocation request is made from a remote frame, and that fram
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS No callbacks invoked
PASS Success callback invoked
PASS successfullyParsed is true

TEST COMPLETE
@@ -13,7 +13,7 @@

function onSecondIframeLoaded() {
window.setTimeout(function() {
testPassed('No callbacks invoked');
testFailed('No callbacks invoked');
finishJSTest();
}, 500);
}
@@ -5,8 +5,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE

Method called on Geolocation object with disconnected Frame.
PASS successCallbackInvoked is false
PASS positionError.code is GeolocationPositionError.POSITION_UNAVAILABLE
PASS positionError.message is 'Document is not fully active'
FAIL positionError.code should be 2. Threw exception ReferenceError: Can't find variable: positionError
FAIL positionError.message should be Document is not fully active. Threw exception ReferenceError: Can't find variable: positionError
PASS successfullyParsed is true

TEST COMPLETE
@@ -4,9 +4,7 @@ Tests that when a request is made on a Geolocation object and its Frame is disco
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS successCallbackInvoked is false
PASS positionError.code is GeolocationPositionError.POSITION_UNAVAILABLE
PASS positionError.message is 'Geolocation cannot be used in frameless documents'
PASS No callbacks invoked
PASS successfullyParsed is true

TEST COMPLETE
@@ -4,12 +4,10 @@ Tests that when a request is made on a Geolocation object, permission is denied
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS error.code is error.PERMISSION_DENIED
PASS error.message is "User denied Geolocation"

PASS successCallbackInvoked is false
PASS firstPositionError.code is GeolocationPositionError.PERMISSION_DENIED
PASS firstPositionError.message is 'User denied Geolocation'
PASS secondPositionError.code is GeolocationPositionError.PERMISSION_DENIED
PASS secondPositionError.message is 'User denied Geolocation'
PASS No callbacks invoked
PASS successfullyParsed is true

TEST COMPLETE
@@ -15,13 +15,17 @@
} else
debug('This test can not be run without the testRunner');

window.successCallbackInvoked = false;

var error;
function onIframeLoaded() {
iframeGeolocation = iframe.contentWindow.navigator.geolocation;
iframeGeolocation.getCurrentPosition(function() {
window.successCallbackInvoked = true;
testFailed('Success callback invoked unexpectedly');
finishJSTest();
}, function(e) {
window.secondPositionError = e;
error = e;
shouldBe('error.code', 'error.PERMISSION_DENIED');
shouldBe('error.message', '"User denied Geolocation"');
debug('');
iframe.src = 'data:text/html,This frame should be visible when the test completes';
});
@@ -30,18 +34,16 @@
function onIframeUnloaded() {
// Make another request, with permission already denied.
iframeGeolocation.getCurrentPosition(function () {
window.successCallbackInvoked = true;
testFailed('Success callback invoked unexpectedly');
finishJSTest();
}, function(e) {
window.firstPositionError = e;
testFailed('Error callback invoked');
finishJSTest();
});
setTimeout(function() {
shouldBe("successCallbackInvoked", "false");
shouldBe("firstPositionError.code", "GeolocationPositionError.PERMISSION_DENIED");
shouldBe("firstPositionError.message", "'User denied Geolocation'");
shouldBe("secondPositionError.code", "GeolocationPositionError.PERMISSION_DENIED");
shouldBe("secondPositionError.message", "'User denied Geolocation'");
testPassed('No callbacks invoked');
finishJSTest();
}, 1000);
}, 100);
}

var iframe = document.createElement('iframe');
@@ -17,19 +17,19 @@
iframe.src = 'data:text/html,This frame should be visible when the test completes';
}

window.successCallbackInvoked = false;
var error;
function onIframeUnloaded() {
iframeGeolocation.getCurrentPosition(function () {
window.successCallbackInvoked = true;
testFailed('Success callback invoked unexpectedly');
finishJSTest();
}, function(e) {
window.positionError = e;
testFailed('Error callback invoked');
finishJSTest();
});
setTimeout(function() {
shouldBe("successCallbackInvoked", "false");
shouldBe("positionError.code", "GeolocationPositionError.POSITION_UNAVAILABLE");
shouldBe("positionError.message", "'Geolocation cannot be used in frameless documents'");
testPassed('No callbacks invoked');
finishJSTest();
}, 1000);
}, 100);
}

var iframe = document.createElement('iframe');
@@ -13,7 +13,7 @@
// Make request from remote frame, this frame will be gone by the time the Geolocation
// object attempts to invoke the callback.
window.parent.navigator.geolocation.getCurrentPosition(function() {
parent.testFailed('Success callback invoked');
parent.testPassed('Success callback invoked');
parent.finishJSTest();
}, function() {
parent.testFailed('Error callback invoked unexpectedly');

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,5 +1,5 @@

PASS Callback function, originated in an <iframe>, is invoked if <iframe> is connected
PASS Callback function, originated in an <iframe> via main window's Function constructor, is invoked even if <iframe> is disconnected
PASS Callback function, originated in an <iframe>, is not invoked if <iframe> is disconnected
FAIL Callback function, originated in an <iframe>, is invoked if <iframe> is connected promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createIframe"
FAIL Callback function, originated in an <iframe> via main window's Function constructor, is invoked even if <iframe> is disconnected promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createIframe"
FAIL Callback function, originated in an <iframe>, is not invoked if <iframe> is disconnected promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createIframe"

This file was deleted.

0 comments on commit 1cdedb5

Please sign in to comment.