dart-sdk/tools/dom/scripts
Terry Lucas 490421d166 Fixed Service Workers and any Promise/Future API with a Dictionary parameter.
APIs in dart:html (that take a Dictionary) will receive a Dart Map parameter.  The Map parameter
must be converted to a Dictionary before passing to the browser's API.  Before this change,
any Promise/Future API with a Map/Dictionary parameter never called the Promise and didn't
return a Dart Future - now it does.

This caused a number of breaks especially in Service Workers (register, etc.).  Here is a
complete list of the fixed APIs:

BackgroundFetchManager
    Future<BackgroundFetchRegistration> fetch(String id, Object requests, [Map options])

CacheStorage
    Future match(/*RequestInfo*/ request, [Map options])

CanMakePayment
    Future<List<Client>> matchAll([Map options])

CookieStore
    Future getAll([Map options])
    Future set(String name, String value, [Map options])

CredentialsContainer
    Future get([Map options])
    Future create([Map options])

DirectoryEntry
    Future<Entry> _getDirectory(String path, {Map options})
    Future<Entry> _getFile(String path, {Map options})

ImageCapture
    Future setOptions(Map photoSettings)

MediaCapabilities
    Future<MediaCapabilitiesInfo> decodingInfo(Map configuration)
    Future<MediaCapabilitiesInfo> encodingInfo(Map configuration)

MediaStreamTrack
    Future applyConstraints([Map constraints])

Navigator
    Future requestKeyboardLock([List<String> keyCodes])
    Future requestMidiAccess([Map options])
    Future share([Map data])

OffscreenCanvas
    Future<Blob> convertToBlob([Map options])

PaymentInstruments
    Future set(String instrumentKey, Map details)

Permissions
    Future<PermissionStatus> query(Map permission)
    Future<PermissionStatus> request(Map permissions)
    Future<PermissionStatus> revoke(Map permission)

PushManager
    Future permissionState([Map options])
    Future<PushSubscription> subscribe([Map options])

RtcPeerConnection
    REMOVED:  Future createAnswer([options_OR_successCallback,
                                   RtcPeerConnectionErrorCallback failureCallback,
                                   Map mediaConstraints])
    REMOVED:  Future createOffer([options_OR_successCallback,
                                  RtcPeerConnectionErrorCallback failureCallback,
                                  Map rtcOfferOptions])
    REMOVED:  Future setLocalDescription(Map description, VoidCallback successCallback,
                                         [RtcPeerConnectionErrorCallback failureCallback])
    REMOVED:  Future setLocalDescription(Map description, VoidCallback successCallback,
                                         [RtcPeerConnectionErrorCallback failureCallback])
    Future<RtcSessionDescription> createAnswer([Map options])
    Future<RtcSessionDescription> createOffer([Map options])
    Future setLocalDescription(Map description)
    Future setRemoteDescription(Map description)

ServiceWorkerContainer
    Future<ServiceWorkerRegistration> register(String url, [Map options])

ServiceWorkerRegistration
    Future<List<Notification>> getNotifications([Map filter])
    Future showNotification(String title, [Map options])

VRDevice
    Future requestSession([Map options])
    Future supportsSession([Map options])

VRSession
    Future requestFrameOfReference(String type, [Map options])

Window
    Future fetch(/*RequestInfo*/ input, [Map init])

WorkerGlobalScope
    Future fetch(/*RequestInfo*/ input, [Map init])


In addition, exposed Service Worker "self" as a static getter named "instance".  The
instance is exposed on four different Service Worker classes and can throw a InstanceTypeError
if the instance isn't of the class expected (WorkerGlobalScope.instance will always work
and not throw):

*   SharedWorkerGlobalScope.instance
*   DedicatedWorkerGlobalScope.instance
*   ServiceWorkerGlobalScope.instance
*   WorkerGlobalScope.instance

R=vsm@google.com

Bug: #34202
Change-Id: I641ccbff7cc771465dd32c73db20eba5d6667939
Reviewed-on: https://dart-review.googlesource.com/c/74482
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-10-14 22:48:33 +00:00
..
__init__.py Begin hookup of Blink IDL parser for dart:* libraries. 2014-09-09 13:18:24 +00:00
all_tests.py
css_code_generator.py Removed DomName, DosEditable, and experimental annoations they are unused. 2018-06-18 18:48:03 +00:00
cssProperties.chrome40.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.CSS21.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.ff36.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.html Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.ie9.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.ie10.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.ie11.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.iPad4Air.onGoogleSites.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.mobileSafari-8.2.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
cssProperties.safari-7.1.3.txt Generate fast-path CssStyleDeclaration properties from browser info 2015-04-08 16:18:36 +00:00
CSSPropertyNames.in Reapply 38999. Third time's the charm! The issue was supportsTransitions was a 2014-08-07 18:36:23 +00:00
dartdomgenerator.py - Moved all WebGL rendering/drawing constants to synthesized class WebGL. 2018-06-15 17:08:54 +00:00
dartgenerator.py - Moved all WebGL rendering/drawing constants to synthesized class WebGL. 2018-06-15 17:08:54 +00:00
dartgenerator_test.py
dartmetadata.py Removed DomName, DosEditable, and experimental annoations they are unused. 2018-06-18 18:48:03 +00:00
database.py Strip unused functionality from dart:html and fix strong mode errors. Switch from blacklisting pure interfaces to determining pure interfaces from the idl and whitelisting impure interfaces we need for dart2js. 2016-05-18 12:49:09 -07:00
database_test.py
databasebuilder.py - Fixed callback signatures with indexed_db open method to expose VersionChangeEvent and 2018-02-23 14:29:45 +00:00
databasebuilder_test.py
emitter.py
emitter_test.py
fremontcutbuilder.py Dart Web Libraries re-generated based on Chrome 63 WebIDLs. 2018-03-18 09:41:04 +00:00
generate_blink_file.py Roll 50: Updated for push to origin/master. 2017-05-10 18:16:51 -07:00
generator.py Fixed Service Workers and any Promise/Future API with a Dictionary parameter. 2018-10-14 22:48:33 +00:00
go.sh First step in removing dartium from IDL generation in TIP of master. 2017-07-18 08:40:39 -07:00
htmldartgenerator.py Fixed Service Workers and any Promise/Future API with a Dictionary parameter. 2018-10-14 22:48:33 +00:00
htmleventgenerator.py Dart Web Libraries re-generated based on Chrome 63 WebIDLs. 2018-03-18 09:41:04 +00:00
htmlrenamer.py Fixed Service Workers and any Promise/Future API with a Dictionary parameter. 2018-10-14 22:48:33 +00:00
idlnode.py Support Promise to Future for both DDC and dart2js. 2018-05-23 04:08:14 +00:00
idlnode_test.py Begin hookup of Blink IDL parser for dart:* libraries. 2014-09-09 13:18:24 +00:00
idlparser.dart Dart SDK Spelling b, c, and d. 2017-05-01 08:28:10 +02:00
idlparser_test.dart
idlrenderer.dart Format all files under tools and utils directory. 2017-04-20 09:08:31 -07:00
idlrenderer.py This CL contains all of the changes for splitting off all of the native 2014-04-25 16:22:08 +00:00
idlrenderer_test.py
idlsync.py Dart Web Libraries re-generated based on Chrome 63 WebIDLs. 2018-03-18 09:41:04 +00:00
logging.conf Clean up logging.conf file. 2013-11-18 19:30:32 +00:00
monitored.py Begin hookup of Blink IDL parser for dart:* libraries. 2014-09-09 13:18:24 +00:00
multiemitter.py Begin hookup of Blink IDL parser for dart:* libraries. 2014-09-09 13:18:24 +00:00
multiemitter_test.py
systemhtml.py Fixed Service Workers and any Promise/Future API with a Dictionary parameter. 2018-10-14 22:48:33 +00:00
systemnative.py Removed DomName, DosEditable, and experimental annoations they are unused. 2018-06-18 18:48:03 +00:00
templateloader.py 1. Make direct calls to _nativeIndexedGetter in "get last" "get first" "get single" instead of calling the "[]" operator. This avoids one additional native call to the length method for each call to "last" "first" or "single" 2013-09-06 23:22:31 +00:00
templateloader_test.py This CL contains all of the changes for splitting off all of the native 2014-04-25 16:22:08 +00:00