Commit Graph

212 Commits

Author SHA1 Message Date
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
terry@google.com e0fff4e457 Changes to support roll 39 IDLs
Reviewers=vsm@google.com,asiva@google.com

Review URL: https://codereview.chromium.org//952133004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44099 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 18:10:08 +00:00
sra@google.com 904433bd7c Revert "Annotate dart:html constructor expressions with precise non-nullable types."
Need to fix some html/element_types_test cases.

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//904663005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43579 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-07 00:35:32 +00:00
sra@google.com f74e57786d Annotate dart:html constructor expressions with precise non-nullable types.
This addresses issue http://dartbug.com/22264

R=alanknight@google.com

Review URL: https://codereview.chromium.org//896723009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43578 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 23:24:19 +00:00
sra@google.com 8bed532218 Tweak toString() for better type inference
These changes ensure dart2js can infer toString() returns a non-null String on some of our samples.

One tactic is to always write toString method for which all returned expressions are a an interpolation (or literal), or a call to StringBuffer.toString.

R=alanknight@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//895813002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43534 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 00:24:51 +00:00
lrn@google.com 42dac4c7b4 Add some ArgumentError and RangeError constructors that capture more information.
Switch some uses of RangeError.range to RangeError.index.
Fix bug in Queue where elementAt allowed `length` as input.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//711003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41653 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 07:55:47 +00:00
leafp@google.com 6de1786199 Arity indexing in dart:blink entry points
This CL replaces type mangling on the blink entry points with arity indexing.  So overloaded methods or methods with optional arguments now dispatch to blink entries specific to their number of arguments (but not their types).  This relies on C++ overload resolution being in place on the blink side (see https://codereview.chromium.org/668733002/).  For the time being, the dart side overload resolution code is left in place.

Resolver strings now have no type or arity info as well.

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org//667983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41236 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 20:46:55 +00:00
vsm@google.com 94095d64a2 Merge 38 changes to bleeding edge
TBR=terry@google.com,leafp@google.com
BUG=

Review URL: https://codereview.chromium.org//605083004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40774 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 15:56:25 +00:00