Commit Graph

109 Commits

Author SHA1 Message Date
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
Stephen Adams fc7d880c60 Implement _ChildNodeListLazy.removeRange as throwing UnsupportedError
_ChildNodeListLazy.removeRange used to throw UnsupportedError because ListMixin.removeRange calls setRange.
Make throwing UnsupportedError explicit to avoid relying on the implementation of ListMixin.removeRange
This will unblock the '_closeGap' change.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2955103003 .
2017-06-28 09:42:55 -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
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
Sam Rawlins 931ceef9b2 Fixing dart:html links _not_ found in docs.json
BUG= https://github.com/dart-lang/sdk/issues/23601
R=alanknight@google.com

Review URL: https://codereview.chromium.org/1448963002 .
2015-11-16 10:18:23 -08:00
Terry L. Lucas 3ce007e910 Fixed a bunch of failure cases for custom elements
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1373563004 .
2015-09-25 15:12:08 -07:00
Terry L. Lucas bcf8dfe1f1 Merge mistake removed annotations for dart2js; re-added.
TBR=sra@google.com

Review URL: https://codereview.chromium.org//1350063004 .
2015-09-18 07:25:33 -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
Alan Knight 89b99e60bf Remove dart2js-specific annotations from childNodes
BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org//1290263002 .
2015-08-14 09:32:45 -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 1fa61ee114 Fixed a few more things to make Dartium build w/o --gen-interop
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1239653003 .
2015-07-14 07:17:59 -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 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
sra@google.com be78d098a0 Make Node.nodes.insertAll work for an end-positioned index.
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40819 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 17:54:03 +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
blois@google.com c163cc3524 Speeding up ElementList.clear & NodeList.clear.
Changes elements.clear() to no longer remove nodes- but this seems like the correct behavior.

Can use the nodes.clear() logic for elements if not.

BUG=17892
R=jacobr@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34532 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 22:16:38 +00:00
amouravski@google.com 11c6fce3d9 Even more docs, filling in many of the gaps.
Review URL: https://codereview.chromium.org//62703002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29993 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 20:39:27 +00:00
blois@google.com 8c9c2d5c29 Exposing raw DOM lists from wrappers
This is to make them transferrable via dart:js

So basically all of our wrappers implement NodeListWrapper (which is defined in html_common).

One can check if the Dart list is a NodeListWrapper, then call rawList if so.

The result of rawList is typed as List<Node>, which should be either NodeList or HtmlCollection.

BUG=14485
R=justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29322 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-27 02:26:20 +00:00
efortuna@google.com 45701cfb4b Second round of deprecation removal.
BUG=
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29275 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:39:09 +00:00
jmesserly@google.com 360ea42322 Rename mdv -> template_binding, remove experiemntal apis from dart:html
essentially, we trade off reduce dart:html API surface area for more annoying usage of these APIs. Since Polymer hides most of this, I suspect it won't be too annoying in practice.

Sample usage:

    nodeBind(node).bind(...)

    templateBind(node).model = ...;

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29057 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 02:11:49 +00:00
blois@google.com e3b35dabb6 Renaming Node.document back to Node.ownerDocument
With custom elements, the document instance variable creates an odd conflict with the document global.

BUG=14099
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28810 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 17:55:38 +00:00
lrn@google.com e3713a08d4 Make List.shuffle take an optional Random object to use.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28305 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 12:07:30 +00:00
lrn@google.com 55a8a72ca6 Add List.shuffle().
Will add tests too.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28206 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 11:09:01 +00:00
blois@google.com 1aa8a7be0e Adding Element.created constructor and .created constructors to all subclasses. Also ensuring generative constructor for all superclasses.
This is for post-construction custom element creation.

Element.created is public, then the base classes of that get private ._created constructors.

BUG=
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28120 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 21:26:06 +00:00
efortuna@google.com 9f52a2969c Added back childNodes and getAttribute and setAttribute.
This is a quick check to verify that it was this CL:
https://codereview.chromium.org/23189014/ was the cause of the performance
regression. If it is, I have some ideas of potential performance improvements
going forward that we should investigate, and I'll also investigate why I wasn't
getting this performance behavior on my machine locally. Either way, expect at
least one additional change on these APIs going forward.

BUG=
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27139 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 19:34:39 +00:00
efortuna@google.com 47dcd084f3 Removing more dom_ methods (dom_getAttribute and dom_setAttribute.).
BUG=
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26928 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 17:18:40 +00:00
efortuna@google.com 90873051ad Making almost all dom_ methods private. Exceptions will be addressed in a later CL.
Current ones that still remain to be made private include createElement(NS),
createRange, all the Element properties, and childNodes.

BUG=
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26605 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 18:25:40 +00:00
jmesserly@google.com 1210e466cb [mdv] implement Node.createBinding and Node.createBindings
port of
https://github.com/Polymer/mdv/commit/95c4eca5a89ed3d04af1c6607a61f49d35d05ca6, https://github.com/Polymer/mdv/commit/3a0d2f302d474cd175d7fe49b278f928a019d053

BUG=
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25485 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-25 18:01:02 +00:00
amouravski@google.com c0a39d0412 Make html metadata follow the spec.
Per https://code.google.com/p/dart/issues/detail?id=11568

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24638 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 18:34:30 +00:00
blois@google.com 9dd81d94a7 Fixing up DOM constructors.
This is a continuation of https://codereview.chromium.org/17063007/

Basically I changed it so factory constructors are only added if the class derives from a native type. Otherwise the native type now extends Interceptor.

BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24619 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-29 00:14:23 +00:00
jmesserly@google.com 5ec4d52def fix analysis issue caught by dart2js bots
TBR

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24501 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 00:06:30 +00:00
jmesserly@google.com d6b9207588 Reorganize mdv and observe functionality
* keep correct dart:html APIs
* move implementation into package:mdv and package:observe
* remove dart:mdv_observe_impl
* remove getValueWorkaround/setValueWorkaround from package:observe

R=blois@google.com, floitsch@google.com, justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24498 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 23:25:47 +00:00
blois@google.com edf30f6b20 Exposing Node.firstChild and Node.lastChild.
These are the most efficient way access children and are very commonly used.

BUG=
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24476 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 16:53:50 +00:00
blois@google.com 6b44f65407 Revert "Making all DOM types abstract and removing superfluous Dartium constructors."
This reverts commit http://code.google.com/p/dart/source/detail?r=24241.

Compiler error, not sure of best fix.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24245 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 19:37:47 +00:00
blois@google.com c3547d4e9b Making all DOM types abstract and removing superfluous Dartium constructors.
Adding factory constructors to all classes to suppress missing generative constructor warnings.

Adding a throw to Dartium's base DOM class to prevent construction of native objects.

This also includes the changes necessary to make all DOM types abstract, but I'm running into a dart2js issue which is preventing that.
BUG=
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24241 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 17:31:36 +00:00
blois@google.com ca01606620 Fixing dart2js compilation warning.
Was seeing the warnings:
build/ReleaseIA32/dart-sdk/lib/html/dart2js/html_dart2js.dart:15831:21: Warning: no property named _this in class Iterable
      if (identical(newNodes._this, this)) {
                    ^^^^^^^^^^^^^^
build/ReleaseIA32/dart-sdk/lib/html/dart2js/html_dart2js.dart:15838:27: Warning: no operator [] in class Iterable
        this.insertBefore(newNodes[0], refChild);

BUG=
R=efortuna@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23428 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 17:47:07 +00:00
blois@google.com 881e456c21 Cleaning up some DOM APIs which were marked as deprecated because they were moved or renamed.
There were basically two issues:
- localName and namespaceUri moved from Node down to Element.
- The transitionEnd event was polyfilled based on the deprecated webkitTransitionEnd event, so it was switched to the standard transtionEnd.

The Attr change was needed because the node map was using localName on Attr (inherited from Node), when it should have been using name. Attr is not actually exposed anywhere, so made it private.

BUG=
R=efortuna@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23423 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 16:31:09 +00:00
blois@google.com ee483c9b6a Cleanup of various DOM dart2js and dart_analyzer warnings
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22976 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 01:23:28 +00:00
jmesserly@google.com 870bad8d86 MDV v3 changes: add getInstanceModel for custom syntax
They also simplified TemplateIterator

I added getInstanceFragment, in anticipation of "MDV v4" :)

R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22591 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 18:59:40 +00:00
jmesserly@google.com 9005b278e7 Implement Model-Driven-Views spec for Dart
This has code ported from a few different sources:
* a port of https://github.com/toolkitchen/mdv polyfill
* a port of the observable layer:  https://github.com/dart-lang/web-ui/tree/master/lib/observe
* a port of list change summary: https://github.com/rafaelw/ChangeSummary/blob/master/change_summary.js

The observePath/PathObserver code is written from scratch, but inspired by change_summary. I tried to keep it simpler; it does not support dirty checking. There's no good way to do that until we get dart:mirrors.

R=floitsch@google.com, sigmund@google.com

Committed: https://code.google.com/p/dart/source/detail?r=22561

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22570 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 21:39:03 +00:00
jmesserly@google.com 1cef1fbc55 "Reverting 22561"
need to investigate test failures

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22562 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 20:43:30 +00:00
jmesserly@google.com bf4f12c62b Implement Model-Driven-Views spec for Dart
This has code ported from a few different sources:
* a port of https://github.com/toolkitchen/mdv polyfill
* a port of the observable layer:  https://github.com/dart-lang/web-ui/tree/master/lib/observe
* a port of list change summary: https://github.com/rafaelw/ChangeSummary/blob/master/change_summary.js

The observePath/PathObserver code is written from scratch, but inspired by change_summary. I tried to keep it simpler; it does not support dirty checking. There's no good way to do that until we get dart:mirrors.

R=floitsch@google.com, sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22561 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 20:29:14 +00:00