[webkit-changes] [WebKit/WebKit] fe412e: Implement Observable#find

Marais Rossouw noreply at github.com
Mon Oct 28 15:28:22 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fe412e8af542829beefef96a881e826620ee0283
      https://github.com/WebKit/WebKit/commit/fe412e8af542829beefef96a881e826620ee0283
  Author: Marais Rossouw <me at marais.co>
  Date:   2024-10-28 (Mon, 28 Oct 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-find.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-find.any.worker-expected.txt
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/dom/InternalObserverFind.cpp
    A Source/WebCore/dom/InternalObserverFind.h
    M Source/WebCore/dom/Observable.cpp
    M Source/WebCore/dom/Observable.h
    M Source/WebCore/dom/Observable.idl
    M Source/WebCore/dom/ViewTransition.cpp

  Log Message:
  -----------
  Implement Observable#find
https://bugs.webkit.org/show_bug.cgi?id=277508

Reviewed by Darin Adler.

This change introduces the `.find` promise-returning operator
for Observables, using the InternalObserver and subscribing immediately.
This is required by the specification https://wicg.github.io/observable/#dom-observable-find

* LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-find.any-expected.txt: Rebaseline.
* LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-find.any.worker-expected.txt: Rebaseline.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/InternalObserverFind.cpp: Added.
(WebCore::createInternalObserverOperatorFind):
* Source/WebCore/dom/InternalObserverFind.h: Added.
* Source/WebCore/dom/Observable.cpp:
(WebCore::Observable::find):
* Source/WebCore/dom/Observable.h:
* Source/WebCore/dom/Observable.idl:
  Exposes `Promise<any> find(predicate, options)` as a promise-returning operator.
* Source/WebCore/dom/ViewTransition.cpp:
  Unified sources caused `hasID` to "not be defined", so added an
  include of `ElementInlines.h`.

Canonical link: https://commits.webkit.org/285793@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list