Title: [288024] trunk
Revision
288024
Author
[email protected]
Date
2022-01-14 12:07:33 -0800 (Fri, 14 Jan 2022)

Log Message

Regression(r281520) 3 subtests started failing on dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test
https://bugs.webkit.org/show_bug.cgi?id=235153
<rdar://problem/87485756>

Unreviewed, revert r281520 since it regressed dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test.


LayoutTests/imported/w3c:

* web-platform-tests/geolocation-API/non-fully-active.https-expected.txt:

Source/WebCore:

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::getCurrentPosition):
(WebCore::Geolocation::watchPosition):
* Modules/web-locks/WebLockManager.cpp:
(WebCore::WebLockManager::didCompleteLockRequest):
Covered by "Removed Frame as lock is granted" test in imported/w3c/web-platform-tests/web-locks/frames.tentative.https.html.
Before this change, WebLockGrantedCallback was using incumbent global object (main frame in test) to create a promise instead
of lexical (removed frame in test), causing the test to be false-passing.

* bindings/js/JSDOMConvertCallbacks.h:
(WebCore::Converter<IDLCallbackFunction<T>>::convert):
(WebCore::Converter<IDLCallbackInterface<T>>::convert):
* dom/TaskSource.h:

LayoutTests:

* TestExpectations:
* fast/dom/Geolocation/callback-to-deleted-context-expected.txt:
* fast/dom/Geolocation/callback-to-deleted-context.html:
* fast/dom/Geolocation/disconnected-frame-already-expected.txt:
* fast/dom/Geolocation/disconnected-frame-already.html:
* fast/dom/Geolocation/disconnected-frame-expected.txt:
* fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt:
* fast/dom/Geolocation/disconnected-frame-permission-denied.html:
* fast/dom/Geolocation/disconnected-frame.html:
* fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html:
* fast/events/detached-svg-parent-window-events-expected.txt:
* fast/events/detached-svg-parent-window-events.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (288023 => 288024)


--- trunk/LayoutTests/ChangeLog	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/ChangeLog	2022-01-14 20:07:33 UTC (rev 288024)
@@ -1,3 +1,24 @@
+2022-01-14  Chris Dumez  <[email protected]>
+
+        Regression(r281520) 3 subtests started failing on dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test
+        https://bugs.webkit.org/show_bug.cgi?id=235153
+        <rdar://problem/87485756>
+
+        Unreviewed, revert r281520 since it regressed dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test.
+
+        * TestExpectations:
+        * fast/dom/Geolocation/callback-to-deleted-context-expected.txt:
+        * fast/dom/Geolocation/callback-to-deleted-context.html:
+        * fast/dom/Geolocation/disconnected-frame-already-expected.txt:
+        * fast/dom/Geolocation/disconnected-frame-already.html:
+        * fast/dom/Geolocation/disconnected-frame-expected.txt:
+        * fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt:
+        * fast/dom/Geolocation/disconnected-frame-permission-denied.html:
+        * fast/dom/Geolocation/disconnected-frame.html:
+        * fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html:
+        * fast/events/detached-svg-parent-window-events-expected.txt:
+        * fast/events/detached-svg-parent-window-events.html:
+
 2022-01-14  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] Incorrect root inline box position when non-empty atomic inline level child box has height: 0px

Modified: trunk/LayoutTests/TestExpectations (288023 => 288024)


--- trunk/LayoutTests/TestExpectations	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/TestExpectations	2022-01-14 20:07:33 UTC (rev 288024)
@@ -551,6 +551,7 @@
 imported/w3c/web-platform-tests/geolocation-API/non-secure-contexts.http.html [ Skip ]
 imported/w3c/web-platform-tests/geolocation-API/getCurrentPosition_permission_allow.https.html [ Skip ]
 imported/w3c/web-platform-tests/geolocation-API/getCurrentPosition_permission_deny.https.html [ Skip ]
+imported/w3c/web-platform-tests/geolocation-API/non-fully-active.https.html [ Skip ]
 imported/w3c/web-platform-tests/geolocation-API/watchPosition_permission_deny.https.html [ Skip ]
 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-origin-idna.sub.window.html [ Skip ]
 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_assign.html [ Skip ]

Modified: trunk/LayoutTests/fast/dom/Geolocation/callback-to-deleted-context-expected.txt (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/callback-to-deleted-context-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/callback-to-deleted-context-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -4,7 +4,7 @@
 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

Modified: trunk/LayoutTests/fast/dom/Geolocation/callback-to-deleted-context.html (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/callback-to-deleted-context.html	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/callback-to-deleted-context.html	2022-01-14 20:07:33 UTC (rev 288024)
@@ -13,7 +13,7 @@
 
 function onSecondIframeLoaded() {
     window.setTimeout(function() {
-        testPassed('No callbacks invoked');
+        testFailed('No callbacks invoked');
         finishJSTest();
     }, 500);
 }

Modified: trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-already-expected.txt (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-already-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-already-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -3,7 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS Error callback invoked
+Method called on Geolocation object with disconnected Frame.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-already.html (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-already.html	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-already.html	2022-01-14 20:07:33 UTC (rev 288024)
@@ -23,7 +23,7 @@
         testFailed('Success callback invoked unexpectedly');
         finishJSTest();
     }, function(e) {
-        testPassed('Error callback invoked');
+        testFailed('Error callback invoked');
         finishJSTest();
     });
     setTimeout(finishTest, 1000);

Modified: trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-expected.txt (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -4,7 +4,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS Error callback invoked
+PASS No callbacks invoked
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -7,7 +7,7 @@
 PASS error.code is error.PERMISSION_DENIED
 PASS error.message is "User denied Geolocation"
 
-PASS Error callback invoked
+PASS No callbacks invoked
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied.html (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied.html	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame-permission-denied.html	2022-01-14 20:07:33 UTC (rev 288024)
@@ -36,13 +36,13 @@
         testFailed('Success callback invoked unexpectedly');
         finishJSTest();
     }, function(e) {
-        testPassed('Error callback invoked');
+        testFailed('Error callback invoked');
         finishJSTest();
     });
     setTimeout(function() {
-        testFailed('No callbacks invoked');
+        testPassed('No callbacks invoked');
         finishJSTest();
-    }, 1000);
+    }, 100);
 }
 
 var iframe = document.createElement('iframe');

Modified: trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame.html (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame.html	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/disconnected-frame.html	2022-01-14 20:07:33 UTC (rev 288024)
@@ -23,13 +23,13 @@
         testFailed('Success callback invoked unexpectedly');
         finishJSTest();
     }, function(e) {
-        testPassed('Error callback invoked');
+        testFailed('Error callback invoked');
         finishJSTest();
     });
     setTimeout(function() {
-        testFailed('No callbacks invoked');
+        testPassed('No callbacks invoked');
         finishJSTest();
-    }, 1000);
+    }, 100);
 }
 
 var iframe = document.createElement('iframe');

Modified: trunk/LayoutTests/fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html (288023 => 288024)


--- trunk/LayoutTests/fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html	2022-01-14 20:07:33 UTC (rev 288024)
@@ -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 unexpectedly');
+              parent.testPassed('Success callback invoked');
               parent.finishJSTest();
           }, function() {
               parent.testFailed('Error callback invoked unexpectedly');

Modified: trunk/LayoutTests/fast/events/detached-svg-parent-window-events-expected.txt (288023 => 288024)


--- trunk/LayoutTests/fast/events/detached-svg-parent-window-events-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/events/detached-svg-parent-window-events-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -1,9 +1,9 @@
+CONSOLE MESSAGE: error
 This tests creating a disconnected SVG element with resize event handler. The event handler should not get dispatched unless the element is connected
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS Exception thrown
 PASS didFireResize is false
 PASS didFireOnError is false
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/fast/events/detached-svg-parent-window-events.html (288023 => 288024)


--- trunk/LayoutTests/fast/events/detached-svg-parent-window-events.html	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/fast/events/detached-svg-parent-window-events.html	2022-01-14 20:07:33 UTC (rev 288024)
@@ -21,11 +21,7 @@
                         shouldBeFalse('didFireOnError');
                         finishJSTest();
                     });
-                    try {
-                        iframe.contentWindow.eval('throw "error"');
-                    } catch (e) {
-                        testPassed("Exception thrown");
-                    }
+                    iframe.contentWindow.eval('throw "error"');
                 });
             };
             document.body.appendChild(iframe);

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288023 => 288024)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-14 20:07:33 UTC (rev 288024)
@@ -1,3 +1,13 @@
+2022-01-14  Chris Dumez  <[email protected]>
+
+        Regression(r281520) 3 subtests started failing on dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test
+        https://bugs.webkit.org/show_bug.cgi?id=235153
+        <rdar://problem/87485756>
+
+        Unreviewed, revert r281520 since it regressed dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test.
+
+        * web-platform-tests/geolocation-API/non-fully-active.https-expected.txt:
+
 2022-01-14  Antti Koivisto  <[email protected]>
 
         [:has() pseudo-class] Avoid O(n^2) in style invalidation with repeated DOM mutations

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt (288023 => 288024)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -1,19 +1,11 @@
 
 
-FAIL parent's |this|, parent's method, parent's filter, parent's root assert_equals: expected function "function TypeError() {
+PASS parent's |this|, parent's method, parent's filter, parent's root
+PASS parent's |this|, parent's method, parent's filter, iframe's root
+PASS parent's |this|, parent's method, iframe's filter, iframe's root
+FAIL parent's |this|, iframes's method, iframe's filter, iframe's root assert_equals: expected function "function TypeError() {
     [native code]
 }" but got function "function TypeError() {
     [native code]
 }"
-FAIL parent's |this|, parent's method, parent's filter, iframe's root assert_equals: expected function "function TypeError() {
-    [native code]
-}" but got function "function TypeError() {
-    [native code]
-}"
-FAIL parent's |this|, parent's method, iframe's filter, iframe's root assert_equals: expected function "function TypeError() {
-    [native code]
-}" but got function "function TypeError() {
-    [native code]
-}"
-PASS parent's |this|, iframes's method, iframe's filter, iframe's root
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/geolocation-API/non-fully-active.https-expected.txt (288023 => 288024)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/geolocation-API/non-fully-active.https-expected.txt	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/geolocation-API/non-fully-active.https-expected.txt	2022-01-14 20:07:33 UTC (rev 288024)
@@ -1,4 +1,5 @@
 
+Harness Error (TIMEOUT), message = null
 
-PASS non-fully active document behavior
+TIMEOUT non-fully active document behavior Test timed out
 

Modified: trunk/Source/WebCore/ChangeLog (288023 => 288024)


--- trunk/Source/WebCore/ChangeLog	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/Source/WebCore/ChangeLog	2022-01-14 20:07:33 UTC (rev 288024)
@@ -1,3 +1,25 @@
+2022-01-14  Chris Dumez  <[email protected]>
+
+        Regression(r281520) 3 subtests started failing on dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test
+        https://bugs.webkit.org/show_bug.cgi?id=235153
+        <rdar://problem/87485756>
+
+        Unreviewed, revert r281520 since it regressed dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html WPT test.
+
+        * Modules/geolocation/Geolocation.cpp:
+        (WebCore::Geolocation::getCurrentPosition):
+        (WebCore::Geolocation::watchPosition):
+        * Modules/web-locks/WebLockManager.cpp:
+        (WebCore::WebLockManager::didCompleteLockRequest):
+        Covered by "Removed Frame as lock is granted" test in imported/w3c/web-platform-tests/web-locks/frames.tentative.https.html.
+        Before this change, WebLockGrantedCallback was using incumbent global object (main frame in test) to create a promise instead
+        of lexical (removed frame in test), causing the test to be false-passing.
+
+        * bindings/js/JSDOMConvertCallbacks.h:
+        (WebCore::Converter<IDLCallbackFunction<T>>::convert):
+        (WebCore::Converter<IDLCallbackInterface<T>>::convert):
+        * dom/TaskSource.h:
+
 2022-01-14  Tyler Wilcock  <[email protected]>
 
         AX: Move methods that are unnecessarily in AccessibilityRenderObject to AccessibilityNodeObject (part 1 of n)

Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (288023 => 288024)


--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp	2022-01-14 20:07:33 UTC (rev 288024)
@@ -31,7 +31,6 @@
 #if ENABLE(GEOLOCATION)
 
 #include "Document.h"
-#include "EventLoop.h"
 #include "FeaturePolicy.h"
 #include "Frame.h"
 #include "GeoNotifier.h"
@@ -300,14 +299,8 @@
 
 void Geolocation::getCurrentPosition(Ref<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, PositionOptions&& options)
 {
-    if (!document() || !document()->isFullyActive()) {
-        if (errorCallback && errorCallback->scriptExecutionContext()) {
-            errorCallback->scriptExecutionContext()->eventLoop().queueTask(TaskSource::Geolocation, [errorCallback] {
-                errorCallback->handleEvent(GeolocationPositionError::create(GeolocationPositionError::POSITION_UNAVAILABLE, "Document is not fully active"_s));
-            });
-        }
+    if (!frame())
         return;
-    }
 
     auto notifier = GeoNotifier::create(*this, WTFMove(successCallback), WTFMove(errorCallback), WTFMove(options));
     startRequest(notifier.ptr());
@@ -317,14 +310,8 @@
 
 int Geolocation::watchPosition(Ref<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, PositionOptions&& options)
 {
-    if (!document() || !document()->isFullyActive()) {
-        if (errorCallback && errorCallback->scriptExecutionContext()) {
-            errorCallback->scriptExecutionContext()->eventLoop().queueTask(TaskSource::Geolocation, [errorCallback] {
-                errorCallback->handleEvent(GeolocationPositionError::create(GeolocationPositionError::POSITION_UNAVAILABLE, "Document is not fully active"_s));
-            });
-        }
+    if (!frame())
         return 0;
-    }
 
     auto notifier = GeoNotifier::create(*this, WTFMove(successCallback), WTFMove(errorCallback), WTFMove(options));
     startRequest(notifier.ptr());

Modified: trunk/Source/WebCore/Modules/web-locks/WebLockManager.cpp (288023 => 288024)


--- trunk/Source/WebCore/Modules/web-locks/WebLockManager.cpp	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/Source/WebCore/Modules/web-locks/WebLockManager.cpp	2022-01-14 20:07:33 UTC (rev 288024)
@@ -272,7 +272,7 @@
             auto lock = WebLock::create(request.lockIdentifier, request.name, request.mode);
             auto result = request.grantedCallback->handleEvent(lock.ptr());
             RefPtr<DOMPromise> waitingPromise = result.type() == CallbackResultType::Success ? result.releaseReturnValue() : nullptr;
-            if (!waitingPromise) {
+            if (!waitingPromise || waitingPromise->isSuspended()) {
                 m_mainThreadBridge->releaseLock(request.lockIdentifier, request.name);
                 settleReleasePromise(request.lockIdentifier, Exception { ExistingExceptionError });
                 return;
@@ -287,7 +287,7 @@
         } else {
             auto result = request.grantedCallback->handleEvent(nullptr);
             RefPtr<DOMPromise> waitingPromise = result.type() == CallbackResultType::Success ? result.releaseReturnValue() : nullptr;
-            if (!waitingPromise) {
+            if (!waitingPromise || waitingPromise->isSuspended()) {
                 settleReleasePromise(request.lockIdentifier, Exception { ExistingExceptionError });
                 return;
             }

Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h (288023 => 288024)


--- trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertCallbacks.h	2022-01-14 20:07:33 UTC (rev 288024)
@@ -46,7 +46,7 @@
             return nullptr;
         }
 
-        return T::create(JSC::asObject(value), &callerGlobalObject(globalObject, vm.topCallFrame));
+        return T::create(JSC::asObject(value), &globalObject);
     }
 };
 
@@ -80,7 +80,7 @@
             return nullptr;
         }
 
-        return T::create(JSC::asObject(value), &callerGlobalObject(globalObject, vm.topCallFrame));
+        return T::create(JSC::asObject(value), &globalObject);
     }
 };
 

Modified: trunk/Source/WebCore/dom/TaskSource.h (288023 => 288024)


--- trunk/Source/WebCore/dom/TaskSource.h	2022-01-14 20:05:39 UTC (rev 288023)
+++ trunk/Source/WebCore/dom/TaskSource.h	2022-01-14 20:07:33 UTC (rev 288024)
@@ -32,7 +32,6 @@
     DatabaseAccess,
     FileReading,
     FontLoading,
-    Geolocation,
     IdleTask,
     IndexedDB,
     MediaElement,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to