Commit Graph

67 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen cc736dfb65 [flip-modifiers]: Reapply "Enforce current library restrictions."
This reapplies commit 0c05e33836
and reverts the revert 029e0cec71.

Tested: Added few new tests, updated existing. Mainly regression testing.
CoreLibraryReviewExempt: Reviewed in original CL.
Change-Id: Ifcc79ce2f9375f607722643a04957b0961e6c295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284304
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-03 09:37:38 +00:00
Ilya Yanok 029e0cec71 Revert "Enforce current library restrictions."
This reverts commit 0c05e33836.

Reason for revert: breaks ~10% of G3 smoke suite.

Original change's description:
> Enforce current library restrictions.
>
> Mark all currently unimplementable types as `final`, or `sealed` for `num` and `final` for `Function`.
> Mark all current classes intended as mixins as `mixin class`.
>
> More additions and cleanup will follow,
> but this change should make everything keep working as today
> if we flip the switch.
>
> TEST= No new tests, very little actual change, covered by existing tests with few changes. Will add more tests when adding more modifiers.
>
> Change-Id: I40e724f823e7f88cdef186d2f73874df256e2f43
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281683
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Kallen Tu <kallentu@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ib0cb5b7ec1a8c392bbf9bf4af8dc3efc0b27991d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284187
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-02-20 15:29:41 +00:00
Lasse R.H. Nielsen 0c05e33836 Enforce current library restrictions.
Mark all currently unimplementable types as `final`, or `sealed` for `num` and `final` for `Function`.
Mark all current classes intended as mixins as `mixin class`.

More additions and cleanup will follow,
but this change should make everything keep working as today
if we flip the switch.

TEST= No new tests, very little actual change, covered by existing tests with few changes. Will add more tests when adding more modifiers.

Change-Id: I40e724f823e7f88cdef186d2f73874df256e2f43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281683
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2023-02-18 12:37:40 +00:00
Josh Soref aee77b9a33 Spelling tools
Closes https://github.com/dart-lang/sdk/pull/50880

TEST=ci

GitOrigin-RevId: ea8ecf4b7b921de0549df325be1a1f7879e86b72
Change-Id: I39315609a8390b012196a08c9ce4a9a6a50b1558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278061
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2023-01-09 15:48:57 +00:00
Kallen Tu 2bb03e4344 Eliminate .style and ._initKeyboardEvent from html_dart2js.
Change-Id: I16ea832e8eff2b2aea02fb73e1cf7ee9702923af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256581
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-08-29 20:06:45 +00:00
Riley Porter 8e0d5f98a3 [dart:html] Remove deprecated gridRowGap and gridColumnGap
After chatting offline, we decided we don't actually need
gridRowGap and gridColumnGap since the rowGap and columnGap
properties are the preferred names. Removing the deprecated
grid versions before it becomes a breaking change to do so,
and to keep dart:html bloat minimal.

Change-Id: I75a7de40a4bb1a5479723600987d19e7e42bf69c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224700
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-12-20 18:21:03 +00:00
Riley Porter fc8a65d4c8 [dart:html] Add gap, rowGap, gridRowGap, and gridColumnGap properties.
Adds gap, rowGap, gridRowGap, and gridColumnGap CSS style properties.
The columnGap property was already included through WebKit.

Relevant bugs:
https://github.com/dart-lang/sdk/issues/46077
https://github.com/dart-lang/sdk/issues/45789


Verified properties are accessible with this `foo.dart` file:
https://paste.googleplex.com/6379738705690624
Loaded with ddb in Chrome:
https://screenshot.googleplex.com/9hN4MTCFxY5EYQn.png

Change-Id: Ia62807a6588cd0fd21b204a2a98a120fa4c4b07b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224500
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-12-16 18:47:11 +00:00
Srujan Gaddam 9f79dfc37d Address analyzer errors in golden files in dart:html
New analyzer errors are reported for dart:html around nullability.
Non-nullable fields are translated to native getters and setters if part
of a concrete class and normal getters and setters if abstract.

Change-Id: I2fd87803a08872b2a7eae4de0af704f184997c7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137481
Reviewed-by: Stephen Adams <sra@google.com>
2020-02-29 01:29:35 +00:00
Srujan Gaddam 55f4b1294e Change setProperty to take in nullable |value|
IDL allows |value| to be nullable.

Change-Id: I1db4a7929f0a83c4772e1a11384afb70ead53501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-22 02:22:21 +00:00
Srujan Gaddam a42c072017 Remove unnecessary null check in getPropertyValue
CSSStyleDeclaration.getPropertyValue returns a non-nullable string.
It will also return an empty string if the property is not found. Since
getPropertyValue returns the value of the native getPropertyValue, the
null check should be removed.

Change-Id: I9846553d3f9fcd68cbd15b9c39d2104cab594b7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136413
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-20 20:49:26 +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 3776313e65 Change dart:html templates to generate null-safe code
Introduces NULLASSERT token and NNBD condition to allow code to
conditionally compile with NNBD.

Change-Id: Ib71e439f32c793e69b66c328cd7c9900358d886e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134045
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-06 23:18:24 +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
Terry Lucas 8fedfc7f8c Removed DomName, DosEditable, and experimental annoations they are unused.
R=kevmoo@google.com,vsm@google.com

Fixes #32304

Change-Id: Ia2c8f99f0125c4d4bd0f95a792ff2af8a58e3599
Reviewed-on: https://dart-review.googlesource.com/60400
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-06-18 18:48:03 +00:00
Terry Lucas 621b12f324 Removed DARTIUM codegen for IDLS (sdk/lib/dartium)
TBR=alanknight@google.com

Review-Url: https://codereview.chromium.org/2978213002 .
2017-07-18 11:02:02 -07:00
Alan Knight 789de57cdf Allow setting unknown CSS properties, e.g. CSS variables
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2976213002 .
2017-07-17 14:56:31 -07:00
Alan Knight e6c38ea30f Remove JS_CONST from CssStyleDeclaration, causes DDC problems
BUG=
R=sra@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2896393002 .
2017-05-23 14:48:08 -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 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 05e80e9cfc Regenerate html files after b42dbe524c
BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org/2670203002 .
2017-02-02 12:54:56 -08: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
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 4947e570d4 Changed to use JSInterop
Review URL: https://codereview.chromium.org//1173403004 .
2015-07-13 12:38:16 -07:00
sra@google.com 0b1fb9cda5 Generate fast-path CssStyleDeclaration properties from browser info
We can tell all our suported browsers have style.backgroundColor so we can avoid the detection and vendor prefix logic.

R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44973 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 16:18:36 +00:00
sra@google.com 9b2d7cae44 CssStyleDeclaration performance work
Cache browser prefix detection to avoid repeated camelCasing.
Remove IE9 compatibility code.

R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44951 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 21:34:20 +00:00
sra@google.com f8fb9710ee Revert trial commit of "CssStyleDeclaration performance work"
If all goes well, will be recommited after code review.

TBR=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44932 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 01:52:05 +00:00
sra@google.com 440f677b46 CssStyleDeclaration performance work
Cache browser prefix detection to avoid repeated camelCasing.
Remove IE9 compatibility code.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44931 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 01:22:54 +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
leafp@google.com 8e3aaa4e75 Blink uses types in entry points
This CL changes the way that blink entry points are named to
use the type signature uniformly.  This makes us somewhat
more robust against changes in the idl.

BUG=
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40006 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 00:17:15 +00:00
efortuna@google.com 43063f3ad8 Do regular expression for camelCase CSS processing in JS.
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39018 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 00:50:20 +00:00
efortuna@google.com 672bb377bc Make camelcasing use a regular expression for CSS properties.
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39012 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 23:00:52 +00:00
efortuna@google.com b8ab793a1b Reapply 38999. Third time's the charm! The issue was supportsTransitions was a
static method,and with my change I was calling an instance method. I've tested
all of the other html tests (before I was just testing on Dartium).

BUG=
R=leafp@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39003 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 18:36:23 +00:00
efortuna@google.com c8d48f89a9 t cl dcommi# Enter a description of the change.
"Reverting 38998"
TBR
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38999 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 17:50:26 +00:00
efortuna@google.com c7dd285314 Reapplication of revision 38996 (dart side edits to make CSS Properties
accessible with and without prefixes), with the addition of CSSPropertyNames.in
which will be deleted once https://codereview.chromium.org/444453006/
is committed.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38998 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 17:21:06 +00:00
efortuna@google.com ceea5ab278 "Reverting 38996"
TBR because we need CSSPropertyNames.in from DEPS

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38997 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 17:12:12 +00:00
efortuna@google.com 19c379afd9 This is the dart side edits to make this happen.
Fix for https://code.google.com/p/dart/issues/detail?id=19932

BUG=
R=leafp@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38996 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 17:09:40 +00:00
sra@google.com 7516e95066 Redo "Use @Native annotation on dart2js DOM native classes"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38488 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 04:27:48 +00:00
sra@google.com 9a4f73207e Revert "Use @Native annotation on dart2js DOM native classes"
TBR=blois@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38486 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 01:44:13 +00:00
sra@google.com 11a19d95be Use @Native annotation on dart2js DOM native classes
This is one of many steps to removing non-standard syntax from the dart2js libraries.

R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38484 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 00:23:17 +00:00
efortuna@google.com ebe987dd84 Have the same behavior for setting a CSS style to null versus empty string in all browsers.
BUG=
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36888 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 18:22:39 +00:00
efortuna@google.com 60c657e9de Add in semicolons in CSSStyleDeclaration change!
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36847 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 22:38:01 +00:00
efortuna@google.com 4b74a83d64 Updated flex CSS prefix for Firefox.
Fix for https://code.google.com/p/dart/issues/detail?id=15759

BUG=
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36845 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 22:30:42 +00:00