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
Terry Lucas
7b77fa217b
Fixed callbacks typedef to be List instead of a generic typed List.
...
Fixed getLegacyStats - shouldn't have a JSName annotation.
Fixes #33891
R=sigmund@google.com
Change-Id: Ie9761ad4f3c69fc875cdb1f0d096f48d1528671b
Reviewed-on: https://dart-review.googlesource.com/66400
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Terry Lucas <terry@google.com >
2018-07-24 19:14:08 +00:00
Terry Lucas
6d25212302
getStats Future should be strongly typed.
...
TBR=kevmoo@google.com
Change-Id: I4c4a6376f84b346e676245e5984136adfe3074aa
Reviewed-on: https://dart-review.googlesource.com/62128
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Terry Lucas <terry@google.com >
2018-06-25 19:25:04 +00:00
Terry Lucas
dd8988c9b2
- Moved all WebGL rendering/drawing constants to synthesized class WebGL.
...
- Removed obsolete Dartium/_blink code.
R=kevmoo@google.com
Change-Id: I81a6f0d5bfe33592ff8ae9c85db9266e898c2861
Reviewed-on: https://dart-review.googlesource.com/60380
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Kevin Moore <kevmoo@google.com >
2018-06-15 17:08:54 +00:00
Terry Lucas
f479435bca
- Removed custom handling of fill - it was wrong the method is now overloaded.
...
- Associate the JS class SpeechSyntesisVoice with the correct Dart class (DDC).
- Top-level querySelectorAll wasn't generic.
- Handle "static" for attributes in the IDLs.
Fixes #33147
Fixes #33178
Fixes #31886
Fixes #20585
R=vsm@google.com
Change-Id: Ic75a2bfc66670b72342269be259408b610547dab
Reviewed-on: https://dart-review.googlesource.com/59240
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Vijay Menon <vsm@google.com >
2018-06-15 02:25:13 +00:00
Terry Lucas
eea2dff20d
Added support for members of type Promise.
...
Fixes #31046
R=sra@google.com
Change-Id: Id1e8d415b91a842bd8e2f50c6064c24aaaed9d98
Reviewed-on: https://dart-review.googlesource.com/59460
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Terry Lucas <terry@google.com >
2018-06-13 18:20:53 +00:00
Terry Lucas
5ec940a2e0
Updated to expose APIs promiseToFuture calls for users.
...
Fixes #33226
R=kevmoo@google.com , sra@google.com
Change-Id: I04995b33e9445d0fcef8d874315f14fd272018d1
Reviewed-on: https://dart-review.googlesource.com/57482
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-07 01:40:22 +00:00
Terry Lucas
cf87b84f7d
Support Promise to Future for both DDC and dart2js.
...
APIs in the newer Chrome IDLs support more JS style promises. The Dart web libraries now hookup those promises and return a Dart Future.
Additionally, a new type maplike is exposed in the IDL this is exposed too.
Change-Id: I44175877eb95f4d910586d42c0139fb182483f82
Reviewed-on: https://dart-review.googlesource.com/49800
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-23 04:08:14 +00:00
Terry Lucas
ef6273cba0
Dart Web Libraries re-generated based on Chrome 63 WebIDLs.
...
This is a migration of 13 Chrome release about 1.5 years of Chrome releases.
Update PYTHON scripts for cleaner and easier rolling.
Here's a doc on the changes that might affect Dart users:
https://docs.google.com/document/d/1Kj0nk3SueO3JKub8im7z3znu9j5oiI7vf49ejZrMxuE/edit#
Change-Id: I768fbd09b04fe6884af36ac102d5813f67bae426
Reviewed-on: https://dart-review.googlesource.com/24501
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Terry Lucas <terry@google.com >
2018-03-18 09:41:04 +00:00
Terry Lucas
d7a8aa155f
Fixed a number of File API methods in DDC.
...
R=vsm@google.com
Change-Id: I77881201f1e89f731476655476eb865e10d581a1
Reviewed-on: https://dart-review.googlesource.com/38164
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Vijay Menon <vsm@google.com >
2018-02-05 22:29:00 +00:00
Stephen Adams
f3734a9fc5
dom: Recognize __getter__ indexers
...
BUG=
R=alanknight@google.com
Review-Url: https://codereview.chromium.org/2879663002 .
2017-05-11 13:59:41 -07:00
Terry Lucas
f27144d7b5
Roll 50: Updated for push to origin/master.
...
TBR=jacobr@google.com
Review-Url: https://codereview.chromium.org/2875773003 .
2017-05-10 18:16:51 -07:00
Stephen Adams
ea2c9cba39
dart2js_html: Fix for issue 29538 - some returned lists may be null
...
Annotate querySelectorAll as not-null to recover code quality.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2857143003 .
2017-05-03 14:26:38 -07:00
Stephen Adams
14c7c3c556
Redo "Refined types for most HtmlElement factory constructors"
...
Fix: ShadowElement is not always present.
Original:
Committed: https://github.com/dart-lang/sdk/commit/b7b12b564a3e1811ccfca3e28fe30dde685f6633
Reverted: https://github.com/dart-lang/sdk/commit/963df1e3e1a3bac0013d191d2b02898bbebefa9d
BUG=
Review-Url: https://codereview.chromium.org/2718713003 .
2017-02-24 14:28:58 -08:00
Stephen Adams
963df1e3e1
Revert "Refined types for most HtmlElement factory constructors"
...
Need to fix ShadowElement
TBR=alanknight@google.com
Review-Url: https://codereview.chromium.org/2710323004 .
2017-02-24 14:15:37 -08:00
Stephen Adams
b7b12b564a
Refined types for most HtmlElement factory constructors
...
The body of new DivElement() is marked as returning a DivElement, instead of inferred to return Element.
The more precise receiver type allows svg polyfills to be excluded, allowsing the HtmlElement methods to be identified as the single target and inlined.
This tends to improve the code generated for idioms like
new DivElement()..classes.add('foo')
var e1 = new DivElement();
e1.children.add(e2);
BUG=
R=alanknight@google.com
Review-Url: https://codereview.chromium.org/2705213003 .
2017-02-24 11:23:06 -08:00
Alan Knight
de05077537
Revert "Add Selection.toString() calling the native method"
...
This reverts commit 01e6e00499 .
BUG=
Review URL: https://codereview.chromium.org/2678593002 .
2017-02-03 17:02:06 -08:00
Alan Knight
01e6e00499
Add Selection.toString() calling the native method
...
BUG=
R=terry@google.com
Review URL: https://codereview.chromium.org/2669103003 .
2017-02-03 10:24:18 -08:00
Harry Terkelsen
1d749a2fec
record that Gamepad.buttons creates GamepadButtons
...
This also extends the html generator to be able to generate List implementations with nullable element types
Fixes https://github.com/dart-lang/sdk/issues/27073
R=sra@google.com , terry@google.com
Review URL: https://codereview.chromium.org/2242203002 .
2016-08-16 13:56:32 -07:00
Jacob Richman
f26e522f84
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.
...
BUG=
R=alanknight@google.com
Review URL: https://codereview.chromium.org/1987073002 .
2016-05-18 12:49:09 -07:00
Jacob Richman
819ed4bb60
Fix strong mode errors in SVG
...
BUG=
R=alanknight@google.com
Review URL: https://codereview.chromium.org/1903893003 .
2016-04-21 12:45:08 -07:00
Jacob Richman
864b64fd5e
Strong html
...
BUG=
R=alanknight@google.com
Review URL: https://codereview.chromium.org/1894713002 .
2016-04-19 15:08:45 -07:00
Alan Knight
a718c8dac9
Fix a few strong mode errors in dart:html
...
BUG=
R=jacobr@google.com
Committed: https://github.com/dart-lang/sdk/commit/65fe0a5383c7d09efb1dd958a7a30ec5c4d1c847
Review URL: https://codereview.chromium.org/1876363006 .
2016-04-13 15:13:31 -07:00
Alan Knight
3fd7e32b65
Revert "Fix a few strong mode errors in dart:html"
...
This reverts commit 65fe0a5383 .
BUG=
Review URL: https://codereview.chromium.org/1879253004 .
2016-04-13 14:56:42 -07:00
Alan Knight
65fe0a5383
Fix a few strong mode errors in dart:html
...
BUG=
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1876363006 .
2016-04-13 14:41:10 -07:00
Jacob Richman
c65854d2e4
Optimize dartium dart:html bindings so real world application performance is acceptable. Improves dart:html performance by 2X-30X for microbenchmarks. Real world improvement is typically 2X-3X.
...
BUG=
Review URL: https://codereview.chromium.org/1832713002 .
2016-03-29 18:32:52 -07:00
Alan Knight
051451d7e6
Trying to fix SQLResultSetRowList's subscript operator to do type conversion
...
BUG=
Review URL: https://codereview.chromium.org/1779023002 .
2016-03-09 14:02:30 -08:00
Terry Lucas
e1a33e9981
Moved ChromiumSubscribeUniform to web_gl
...
Fixed to return null if dictionary returned form blink is null
Cleanup up logging/error reporting
TBR=alanknight@google.com ,jacobr@google.com
Committed: https://github.com/dart-lang/sdk/commit/01f6e4ed0f8882001e5a308cc8e36dcb62e9b5bc
Review URL: https://codereview.chromium.org/1752983003 .
2016-03-02 08:15:45 -08:00
Terry Lucas
a3350d9b06
Generation of sdk/lib files from 45 roll
...
TBR=alanknight@google.com ,jacobr@google.com
Review URL: https://codereview.chromium.org/1720743005 .
2016-02-22 10:59:12 -08:00
Jacob Richman
cf7ae2e0cb
Support JS$ prefix for dart and fix bug where _operator_getter and the [] operator were used inconsistently. Would only impact future use cases where js APIs returned types not auto-proxied with dart:html.
...
Support typed JS interop classes that extend the behavior of dart:html types in Dartium.
This theoretically enables supporting package:dom at the same time as dart:html as well as helping with
JavaScript libraries that monkey patch the dom.
Also support JS$ name prefix to resolve name conflicts with dart reserved words and with
dart:html libraries.
Cleanup addEventListener and friends so they are consistent with typed JS Interop and fix
bugs in the unlikely case where multiple functions have the same identity hash.
Add checks to make it easier to catch when allowInterop is accidentally omitted
when using the new typed JavaScript interop. You will now get an exception
any time you pass a Function to JS via the new typed interop without first
calling allowInterop.
BUG=
R=alanknight@google.com
Review URL: https://codereview.chromium.org/1583773003 .
2016-01-15 10:40:32 -08:00
Kevin Moore
156bc53866
Hide implementation members in dart:html, dart:js and related libraries
...
Closes https://github.com/dart-lang/sdk/issues/24602
R=alanknight@google.com , jacobr@google.com , terry@google.com
Review URL: https://codereview.chromium.org/1416043008 .
2015-11-02 13:23:22 -05:00
Alan Knight
8831fb876e
Deprecate new internal Dartium/JsInterop APIs that are public
...
BUG=
Review URL: https://codereview.chromium.org/1428593002 .
2015-10-27 10:55:12 -07:00
Alan Knight
c92a2450b4
Switch dart:html objects not to be NativeFieldWrapper subclasses with JsInterop
...
BUG=
Review URL: https://codereview.chromium.org/1392723003 .
2015-10-07 17:42:39 -07:00
Terry L. Lucas
7b322c246c
Dartium JS Enabled take 2
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1348173002 .
2015-09-16 07:13:53 -07:00
Terry L. Lucas
09c804aa78
Revert "Dartium JS Interop enabled."
...
This reverts commit 403bd1698d .
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1345083002 .
2015-09-15 19:44:26 -07:00
Terry L. Lucas
403bd1698d
Dartium JS Interop enabled.
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1349493003 .
2015-09-15 17:36:47 -07:00
Terry L. Lucas
9b0d2582fc
Revert "Dartium w/ JsInterop enabled"
...
This reverts commit 346af54711 .
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1330163010 .
2015-09-09 17:33:24 -07:00
Terry L. Lucas
346af54711
Dartium w/ JsInterop enabled
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1321613005 .
2015-09-09 17:01:40 -07:00
Terry L. Lucas
012c998f64
Revert "Patched in Dartium JsInterop"
...
This reverts commit 4bb2e617db .
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1327083002 .
2015-09-08 13:35:03 -07:00
Terry L. Lucas
4bb2e617db
Patched in Dartium JsInterop
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1310363006 .
2015-09-08 12:46:41 -07:00
Terry L. Lucas
5e52d8dc5d
Updates for dart:js fixes after initial --gen-interop
...
TBR=vsm@google.com ,alanknight@google.com
Review URL: https://codereview.chromium.org//1228093007 .
2015-07-16 09:52:44 -07:00
Terry L. Lucas
cec5812335
Fixed Dictionary and Event hookup w/o --gen-interop
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org//1233083004 .
2015-07-14 14:18:48 -07:00
Terry L. Lucas
82fbd3382a
Remove blink_jsObject when --gen-interop is not used.
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org//1236933003 .
2015-07-14 05:49:27 -07:00
Terry L. Lucas
4947e570d4
Changed to use JSInterop
...
Review URL: https://codereview.chromium.org//1173403004 .
2015-07-13 12:38:16 -07:00
alanknight@google.com
f0136ff1eb
Clean up WheelEvent
...
BUG=
R=terry@google.com
Review URL: https://codereview.chromium.org//1126463005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45740 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 16:34:01 +00:00
alanknight@google.com
5397482fcc
Make dartj2s do type conversions on constructor arguments
...
BUG=
R=terry@google.com
Review URL: https://codereview.chromium.org//1023363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44688 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 17:39:49 +00:00
alanknight@google.com
b44058a0d2
Make Element.animate work in dart2js Chrome
...
BUG=
R=terry@google.com
Review URL: https://codereview.chromium.org//1014843004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44642 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 18:26:06 +00:00
alanknight@google.com
46a24513a3
Add MediaSource.supported, annotations for supported browsers, and a minimal test
...
BUG=
R=terry@google.com
Review URL: https://codereview.chromium.org//990383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44472 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 17:31:42 +00:00
alanknight@google.com
5d2f7f8ae8
Fix notification
...
BUG=
R=terry@google.com
Review URL: https://codereview.chromium.org//1002953005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44471 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 17:21:31 +00:00
terry@google.com
68c6b252e4
Fixed tests for DOMPoint support for dart2js.
...
TBR=asiva@google.com ,vsm@google.com
Review URL: https://codereview.chromium.org//968613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44115 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-01 18:01:53 +00:00