Srujan Gaddam
8ebed3d806
[dart:html] Add webkitSpeechRecognition to SpeechRecognition class
...
In Safari, the prototype of a SpeechRecognition object returns a
webkitSpeechRecognition prototype. This name is different than the
one in the @Native annotation, so dart2js fails to recognize it. We
should it to the annotation so we properly intercept it.
CoreLibraryReviewExempt: Changing bindings of dart:html, no change to API.
Change-Id: Ic533e1208dd28e521403998e43009e0f651e2dfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291961
Reviewed-by: Nate Biggs <natebiggs@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2023-03-31 17:32:54 +00:00
Srujan Gaddam
01642c2122
[dart:html] Add different bindings for FileSystem APIs
...
Closes https://github.com/dart-lang/sdk/issues/45036
The FileSystem API has different bindings for different browsers,
and the values are all taken directly from the MDN:
https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API
Along with this, some APIs that need to expose these bindings are modified to
expose all possible bindings.
Change-Id: I18ce6d1208349eb9d5bd9d802d17dda1ddae2dec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225323
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Riley Porter <rileyporter@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2021-12-23 00:11:03 +00:00
Srujan Gaddam
f34eef5b91
[dart:html] Migrate python scripts to python 3
...
Migrates syntax and semantics from python 2.7.
Major changes include:
- filters
- sorting
- print statements
- higher-order functions
- hashing and comparison
and other misc changes. go.sh consistently gives the libraries
in this and the previous commits with these changes.
Change-Id: I66365739887158d8f321015d36e556447da1bcd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211542
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Riley Porter <rileyporter@google.com >
2021-09-08 22:10:53 +00:00
Srujan Gaddam
7abaa95492
[dart:html] Fix Geoposition bindings and callbacks
...
Closes https://github.com/dart-lang/sdk/issues/45562
Closes https://github.com/dart-lang/sdk/issues/44324
Geoposition should be bound to GeolocationPosition as well since
Position is deprecated since Chrome 79.
Similarly, success callbacks used in the Geolocation API can accept
a Firefox-specific implementation, so the callback should accept a
dynamic instead. Doing this requires adding annotations to the APIs
so liveness of Geolocation types is maintained.
Change-Id: Id38f68d10c9cdcb7d711ef83a70df87b30be405d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194325
Reviewed-by: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2021-04-29 21:32:15 +00:00
Alexander Thomas
b5c63ce757
[infra] Migrate scripts to python3
...
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.
Fixes: https://github.com/dart-lang/sdk/issues/28793
TEST=Manually tested common user journeys.
Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
2021-04-15 10:10:20 +00:00
Srujan Gaddam
b5470ae013
[dart:html] Modify scripts to always use NNBD
...
Since the sdk has been unforked, scripts should be updated to
generate files by always using NNBD. As such, nnbd_src has been
moved to src and the old src has been deleted. This does not address
the nnbd tokens e.g. $NULLABLE. That will be done in a future CL.
Change-Id: I00bead16a9d19569b07ad0601f581fc14400fdce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151864
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-06-23 23:17:35 +00:00
Srujan Gaddam
2bd4858d40
[dart:html] Use TreatNullAs attribute in nullability
...
Closes https://github.com/dart-lang/sdk/issues/41419
Uses the external attribute TreatNullAs to allow nullable setters
and parameters.
Change-Id: I5182ac6dcfdcf78e84f204079a782aebbf128a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143185
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-04-14 00:37:41 +00:00
Srujan Gaddam
5ed1850933
[dart:html] Add SubmitEvent to Event native annotation
...
Bug: https://github.com/dart-lang/sdk/issues/40901
Allows SubmitEvent to be treated like an Event.
Change-Id: I86d31b73eda5a0009fbd18aa4e993d0f52165d83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142882
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Auto-Submit: Srujan Gaddam <srujzs@google.com >
2020-04-08 20:27:34 +00:00
Srujan Gaddam
b96cd6d755
[dart:html] Add nullability to item type for lists
...
Needed to type nullability for List parameters correctly.
Change-Id: I55732a34f9e221324a15312985cb83b49a6811a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142211
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-04-06 21:37:44 +00:00
Srujan Gaddam
5e74472449
Handle optionals in DOM scripts for NNBD
...
Optionals were being ignored for some methods and for optionals that
have a default of Undefined or None, they should be marked nullable in
Dart syntax regardless of whether they are in the IDL.
Change-Id: Icc71300dc7d8e06fef640a5ca8d502b093c0580c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134765
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-02-10 22:26:35 +00:00
Srujan Gaddam
dae60008ab
DOM script changes to handle nnbd
...
-Adds field for type nullability for IDL operations
-Adds field for conversions to reflect input and output type nullability
--based on implementation
-Corrects generic object types to include nullability
-Changes 'any' types to dynamics
-Adds nullability to types in various operations
-Converts finals and non-initialized non-nullable fields to getters and
setters
--TODO: convert these to native instead of JS inline
-Modifies nullability for annotations and removes annotations from
setters
Change-Id: Iab19830fd1d7f37b170a4da8672f922c3f9b0863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132967
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-02-07 01:05:14 +00:00
Srujan Gaddam
7db61c6b01
Changing the dart:html generator scripts to generate null-safe/nnbd code
...
Change-Id: I4a8b097b126864366076b1e73cf3e0296600380e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128376
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-01-29 00:20:42 +00:00
Nate Bosch
55f81f2210
Mass format python with yapf
...
- Add `.style.yapf` with configuration to use Google style.
- Run `yapf` on all `.py` files in this repo.
- Manually fix one trailing space in a doc string.
- Run `git cl format runtime` to satisfy presubmit.
Change-Id: I7e6bd11e91f07926b9188362599af398551eed79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111600
Commit-Queue: Nate Bosch <nbosch@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
2019-08-05 20:34:31 +00:00
Stephen Adams
6bcb017c56
Fix postmessage to treat it's input as a serializable value
...
Change-Id: I11744735f5e6d6a5593e6ac3f00d87813577db7e
Reviewed-on: https://dart-review.googlesource.com/c/91141
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2019-01-25 03:56:06 +00:00
Terry Lucas
edca6169c1
Fixed a number of dart:html P1 issues.
...
- Fixed HTML API's with callback typedef to correctly convert Dart function to JS function.
- Expose HttpStatus from dart:html
- Expose DomName ondblclick and dblclickEvent for Angular analyzer.
- Fixed removeAll should be Iterable<Object> to match Set's removeAll not Iterable<E>.
- Fixed a number of DataTransferItem, Entry, FileEntry and DiretoryEntry returning NativeJavaScriptObject needed type registered in DDC.
- Added ability to allow local file access from Chrome browser added -local in ddb.
R=vsm@google.com
Fixes #30278
Fixes #35484
Fixes #34318
Fixes #35510
Change-Id: Ide8c04716c54045e837781d489562f27b694b109
Reviewed-on: https://dart-review.googlesource.com/c/89340
Commit-Queue: Terry Lucas <terry@google.com >
Reviewed-by: Vijay Menon <vsm@google.com >
Reviewed-by: Nate Bosch <nbosch@google.com >
2019-01-15 17:21:50 +00:00
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
34be5de0c7
Fixed _DomRect class to map to both ClientRect and DOMRect for browser backward compat.
...
R=sra@google.com ,sigmund@google.com
Change-Id: I2f5ccae15bcd993ab1e15ab556a25d6e0cd1d450
Reviewed-on: https://dart-review.googlesource.com/50504
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Terry Lucas <terry@google.com >
2018-04-10 21:18:45 +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
Terry Lucas
8ab1a87aba
Typedefs and IDL file order between platforms could generated different files.
...
TBR=alanknight@google.com ,vsm@google.com
Review-Url: https://codereview.chromium.org/2948493002 .
2017-06-18 11:54:29 -07:00
Alan Knight
6f71f9c80b
Revert "[Experiment] Stop suppressing DragEvent"
...
This reverts commit fbbb974670 .
Also updates the cached_patches.dart file.
BUG=
R=terry@google.com
Review-Url: https://codereview.chromium.org/2907563003 .
2017-05-25 11:16:10 -07:00
Alan Knight
fbbb974670
[Experiment] Stop suppressing DragEvent
...
BUG=
R=jacobr@google.com
Review-Url: https://codereview.chromium.org/2898673003 .
2017-05-22 14:10:05 -07:00
Stephen Adams
89b9c7c8dd
html: AudoTrackList is a List
...
BUG=
R=terry@google.com
Review-Url: https://codereview.chromium.org/2884813002 .
2017-05-15 14:44:35 -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
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
Alan Knight
e610d803b1
Update test status for webgl extension tests, fix one typo in extension name
...
BUG=
Review URL: https://codereview.chromium.org/2152393002 .
2016-07-15 15:00:15 -07:00
Alan Knight
b9316f9882
Recognize WEBGL extensions on Firefox (copy with regenerated files)
...
Both of the following objects need to map to Dart type 'AngleInstancedArrays'
[object ANGLEInstancedArrays]
[object ANGLE_instanced_arrays]
Fixes https://github.com/dart-lang/sdk/issues/26850
BUG=
patch from issue 2147093002 at patchset 1 (http://crrev.com/2147093002#ps1 )
R=sra@google.com
Review URL: https://codereview.chromium.org/2150003002 .
2016-07-15 12:48:22 -07:00
Jacob Richman
fd58be1816
Add back in pure_interfaces list that turned out to still be needed. The checked in generated code matches this cl.
...
BUG=
Review URL: https://codereview.chromium.org/2005143004 .
2016-05-24 10:25:31 -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
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
c510dc9831
Fixed typedef used globally in IDLs
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org/1763063003 .
2016-03-05 07:34:51 -08:00
Alan Knight
83e2e2dbb2
Change scripts to avoid generating things that bloat the compiled code
...
BUG=
Review URL: https://codereview.chromium.org/1763213002 .
2016-03-04 15:08:48 -08:00
Terry Lucas
6aff6fb1ba
Fixed Dictionary emitted as interface and dictionary conversion with a null map
...
TBR=alanknight@google.com ,jacobr@google.com
Committed: https://github.com/dart-lang/sdk/commit/a61bd2f7b2e087ebb37475e290ad21ed3b585185
Review URL: https://codereview.chromium.org/1752153002 .
2016-03-01 15:55:13 -08:00
Terry Lucas
8cb5ef741f
Fix more things with webgl so it works
...
- dart.idl emitted currently supported operations in Chrome 45 so there were 9 duplicates.
- Support mapping a bunch of webgl types to Dart types.
TBR=jacobr@google.com ,alanknight@google.com
Committed: https://github.com/dart-lang/sdk/commit/3a6e6cafeaba585832933c3cab94928ea302ebaf
Review URL: https://codereview.chromium.org/1748383002 .
2016-03-01 03:34:19 -08:00
Terry Lucas
2a20f47782
Add MessageEvent.data template for dart2js, remove duplicate claims on ClipboardEvent and PointerEvent
...
BUG=
Review URL: https://codereview.chromium.org/1725083002 .
2016-02-24 07:51:50 -08:00
Alan Knight
e67b4c9161
Fix generator to use SerializedScriptValue for all postMessages
...
BUG=
Review URL: https://codereview.chromium.org/1723703002 .
2016-02-23 09:28:55 -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
f478562b0a
Dartium 45 roll
...
R=alanknight@google.com
Review URL: https://codereview.chromium.org/1682783002 .
2016-02-09 10:50:43 -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
Alan Knight
160355de42
Add the right type conversions for various postMessage methods
...
BUG=
Review URL: https://codereview.chromium.org/1490763005 .
2015-12-01 10:48:19 -08:00
Alan Knight
42b9d7b702
Serialize the data argument to History's state-related APIs.
...
BUG=
Review URL: https://codereview.chromium.org/1414903007 .
2015-11-05 16:23:44 -08:00
Alan Knight
a98388886a
Wrap DomStringList, but don't wrap DomString[] as return types
...
BUG=
Review URL: https://codereview.chromium.org/1410853005 .
2015-11-03 11:22:37 -08:00
Alan Knight
110b579b8a
wrap_jso should wrap JsArray as well, not always call wrap on its contents
...
BUG=
Committed: https://github.com/dart-lang/sdk/commit/f0e52e4e9175c10739645b6a1f72d551f6b9fd06
Review URL: https://codereview.chromium.org/1383903002 .
2015-10-02 12:48:06 -07:00
Alan Knight
aebb870b13
Start using the dart2js type conversions in Dartium as well.
...
BUG=
Review URL: https://codereview.chromium.org//1349293006 .
2015-09-18 12:44:36 -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