Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f76bfc9138c07f28bc8ed9186ee95ffc899d9da7
https://github.com/WebKit/WebKit/commit/f76bfc9138c07f28bc8ed9186ee95ffc899d9da7
Author: Keith Cirkel <[email protected]>
Date: 2024-07-28 (Sun, 28 Jul 2024)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-constructor.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-constructor.any.worker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-filter.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-filter.any.js
M
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-filter.any.worker-expected.txt
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/dom/InternalObserver.h
A Source/WebCore/dom/InternalObserverFilter.cpp
A Source/WebCore/dom/InternalObserverFilter.h
M Source/WebCore/dom/InternalObserverTake.cpp
M Source/WebCore/dom/Observable.cpp
M Source/WebCore/dom/Observable.h
M Source/WebCore/dom/Observable.idl
A Source/WebCore/dom/PredicateCallback.h
A Source/WebCore/dom/PredicateCallback.idl
M Source/WebCore/dom/Subscriber.cpp
Log Message:
-----------
Implement Observable#filter
https://bugs.webkit.org/show_bug.cgi?id=277221
Reviewed by Darin Adler.
This adds the InternalObserverFilter/SubscriberCallbackFilter, and the
required PredicateCallback IDL type, to support Observable#filter.
*
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-constructor.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-constructor.any.worker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-filter.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-filter.any.js:
(test):
This test had a typo in it, where it called map rather than filter.
I've synced the changes in a PR to WPT here:
https://github.com/web-platform-tests/wpt/pull/47324.
*
LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-filter.any.worker-expected.txt:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/InternalObserver.h:
* Source/WebCore/dom/InternalObserverFilter.cpp:
(WebCore::createSubscriberCallbackFilter):
Added the new Filter specialisations.
* Source/WebCore/dom/InternalObserverFilter.h:
* Source/WebCore/dom/InternalObserverTake.cpp:
* Source/WebCore/dom/Observable.cpp:
(WebCore::Observable::filter):
Added the filter function, which creates an Observable with the
SubscriberCallbackFilter specialisation.
* Source/WebCore/dom/Observable.h:
* Source/WebCore/dom/Observable.idl:
* Source/WebCore/dom/PredicateCallback.h: Copied from
Source/WebCore/dom/Observable.idl.
* Source/WebCore/dom/PredicateCallback.idl: Copied from
Source/WebCore/dom/Observable.idl.
* Source/WebCore/dom/Subscriber.cpp:
(WebCore::Subscriber::error):
This method had an issue where close() was being called with
JSC::JSUndefined() but actually needs to pass the error object, so the
abort signal has an appropriate reason. This change also fixed one of
the failing tests in constructor-any-expected.txt.
Canonical link: https://commits.webkit.org/281472@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes