Commit Graph

56 Commits

Author SHA1 Message Date
jmesserly@google.com b17630d1af workaround for event handlers: don't return StreamSubscription as model
https://code.google.com/p/dart/issues/detail?id=15574

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31092 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-11 23:52:09 +00:00
rmacnak@google.com f9b308941d Remove use of deprecated mirror API from pkg/observe.
R=gbracha@google.com, jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30640 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 19:55:08 +00:00
jmesserly@google.com aa2ac62a8d add isEmpty/isNotEmpty to ObservableList reflection
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30588 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-22 22:10:22 +00:00
sigmund@google.com 55ee7003b7 Fix in compound path observer: this fixes the error we saw in our manual testing
of todomvc.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30121 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 19:02:35 +00:00
sigmund@google.com 536f92456d Ensure we run the observable transform on PolymerElement (fixes issue 14942)
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30089 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 00:32:54 +00:00
iposva@google.com 1cae21b556 - Reverting mirror changes.
Review URL: https://codereview.chromium.org//62373008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30029 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 02:07:37 +00:00
iposva@google.com a2d280501e - Reverting mirror changes.
Review URL: https://codereview.chromium.org//63563003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30027 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 01:48:45 +00:00
rmacnak@google.com bc897425e1 Cascaded mirror removal revert.
Review URL: https://codereview.chromium.org//63363003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30024 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 01:20:51 +00:00
rmacnak@google.com 1caa73df59 Remove implementations of mirror methods not in the API from the VM. Update tests.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30005 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 22:30:45 +00:00
jmesserly@google.com 33fa4d5eba introduce ObservableList.listChanges to keep list changes separate from property changes
this is part of addressing: 13554, 14157, 13359

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29630 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:31:50 +00:00
floitsch@google.com 7006de6f23 Remove deprecated parts of dart:async.
Attempt to fix most uses of the deprecated features.

R=floitsch@google.com, nweiz@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29628 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:24:29 +00:00
sigmund@google.com 54f9873540 Fix logging call in path_observer (issue 14617)
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29597 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 22:17:20 +00:00
ahe@google.com 36e2df1a1d Mirrors overhaul.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:58:58 +00:00
lrn@google.com f0a1c922a2 Reapply "Remove @deprecated features."
R=scheglov@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29535 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:09:15 +00:00
jmesserly@google.com 7b3123e02a Update our TemplateBinding port
https://github.com/Polymer/TemplateBinding/tree/ed3266266e751b5ab1f75f8e0509d0d5f0ef35d8

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29500 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 23:26:20 +00:00
jmesserly@google.com 084dc19054 fix PathObserver to avoid try+catch
also fixes staticwarnings

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29498 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 22:18:37 +00:00
lrn@google.com 57efa5da8c Revert "Remove @deprecated features."
There were more uses of the deprecated features.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29443 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 12:54:37 +00:00
lrn@google.com 72e1d263dc Remove @deprecated features.
R=alanknight@google.com, rnystrom@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29438 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 12:00:44 +00:00
scheglov@google.com 7ac0b7d0bd Rename analyzer_experimental to analyzer.
R=jmesserly@google.com, pquitslund@google.com, danrubel@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29302 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 23:59:38 +00:00
scheglov@google.com e85ecab139 Fix build after analyzer_experimental API change.
TBR

R=jmesserly@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29265 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 17:58:41 +00:00
jmesserly@google.com 04c0d63166 fix build due to mdv -> template_binding rename
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29058 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 02:25:05 +00:00
jmesserly@google.com 821e6fec2a Several fixes here to fix bugs and get our tests into a reliable state:
* customElementsReady future. We don't fire Polymer.onReady until custom elements are ready too

* deploy without dart.js by default. This is the expected deployment mode for real apps. Also make sure we test this on DRT and compiler==js, so Pete can change Dartium without causing build breaks :)

* stop using "package:observe" test "performMicrotaskCheckpoint" hack in Polymer. This was too blunt; it affected timing of all async operations. Instead we only trigger Observable.dirtyCheck. It's using the latest Zone API as well.

* mixin ChangeNotifier explicitly. This is mainly to fix a quirk of our test environment (test server loads "packages/polymer" in untransformed mode, causing it to pick up Observable instead of ChangeNotifier).

* fix change watchers to blacklist "attributeChanged" :)

* fix serializeValue to only use the runtime value

* fix deserializeValue to get the right Type for dart:core types

* cleanup prop_attr_reflection_test to use mutation observer

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28956 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 21:49:51 +00:00
jmesserly@google.com 38c4cd1f6b package:observe fix various api issues
in particular:
provide oldValue/newValue/target in PropertyChangeRecord -- https://code.google.com/p/dart/issues/detail?id=12075
use == in notifyPropertyChange -- https://code.google.com/p/dart/issues/detail?id=12463
remove Mixin/Base suffix -- https://code.google.com/p/dart/issues/detail?id=13353
remove ChangeRecord.changes -- https://code.google.com/p/dart/issues/detail?id=14128

other changes:
rename PropertyChangeRecord.field to .name (it's not just fields)
PathObserver rethrows errors from inside the getter/setter to help debug those
PathObserver now looks up Map keys using Strings instead of Symbols.
generic type on PropertyChangeRecord, MapChangeRecord

I stopped short of adding "target" to List/Map change record but am interested in a follow up to address that: https://code.google.com/p/dart/issues/detail?id=14157

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28774 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 03:32:40 +00:00
lrn@google.com 8b1d5720f7 Change "typedef" to "class" in core library and related tests.
R=floitsch@google.com, johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28712 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 09:02:46 +00:00
jmesserly@google.com d583f16e4f add @MirrorsUsed to observe/polymer/polymer_exprs pkgs
Fairly straightforward. @observable and @CustomTag are metaTargets, so no changes needed for types that use those. The only other changes are for data binding to objects with built in change notification. In that case, we add package:observe's @reflectable annotation. Other than that, just a few other things in mirrors that are now locked down appropriately to only reflect on the things they need.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28689 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 22:55:47 +00:00
floitsch@google.com 0f7a0bd7b1 Rename runAsync to scheduleMicrotask.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28569 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 15:52:17 +00:00
rnystrom@google.com 88e476d0d9 Fix observe package to work with new barback logger.
BUG=
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28492 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 00:21:40 +00:00
jmesserly@google.com b16ddf6c12 use symbol literals instead of const ctor
R=rnystrom@google.com, sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28485 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 22:55:17 +00:00
jmesserly@google.com cf3dcfba4c Port Polymer.js Core, the github.com/polymer/polymer code.
Ports all features except where JS interop is blocking us (declaration/path.js and instance/style.js). In particular, this has:
  //   src/declaration/attributes.js
  //   src/declaration/events.js
  //   src/declaration/polymer-element.js
  //   src/declaration/properties.js
  //   src/declaration/prototype.js
  //   src/declaration/styles.js
  //   src/instance/attributes.js
  //   src/instance/base.js
  //   src/instance/events.js
  //   src/instance/mdv.js
  //   src/instance/properties.js
  //   src/instance/utils.js
  //   src/lib/deserialize.js
  //   src/lib/job.js
  //   src/lib/dom.js -- not needed in Dart
  //   src/lib/lang.js -- not needed in Dart
  //   src/lib/super.js -- not needed in Dart

There's also a big architectural change: polymer-element data is now stored in the PolymerDeclaration class, which is separate from PolymerElement. This allows us to avoid duplicate work on every constructor, and should significantly speed up instance creation.

All code is from the same revision:
https://github.com/Polymer/polymer/blob/4dc481c11505991a7c43228d3797d28f21267779

The remaining unported files are for relatively minor features. "declaration/path.js" is for asset URL resolution, and we might have a Pub-based solution instead. "instance/style.js" has an opt-in, advanced style polyfill. It needs "ShadowCSS.shimPolyfillDirectives", and probably isn't too hard to make work in a follow up change.

Other changes:
* attributeChanged lifecycle method is implemented.
* ObservableAnnotation is public so Polymer's @published can subclass it
* bindProperty renamed to onPropertyChange to avoid conflict with Polymer member of the same name.
* polymer/lib/boot.js preload's polymer-element and link[rel=stylesheet]

R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28134 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 23:45:37 +00:00
jmesserly@google.com 61f2476f38 fix observe transform to preserve metadata
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28133 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 23:36:46 +00:00
kathyw@google.com ef3f516570 one-liners for a few polymer-related libraries
R=jmesserly@google.com, mcampione@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27500 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 20:25:19 +00:00
jmesserly@google.com 877f440f28 fix observing superclass fields, issue 13255
this was previously blocked by a mirrors bug, but no longer.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27402 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 20:34:32 +00:00
kevmoo@j832.com a8eafbee60 Update urls for polymer
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27310 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 20:45:45 +00:00
jmesserly@google.com 7a091dcfca Turn on Polymer TodoMVC tests on Dart buildbots
The biggest changes are to the examples, but there's a small tweak to test_suite.dart as well, so it can load the HTML files.

For now, we only test the development loop (content_shell+Dart VM). I'm working on changes to enable us to test the deploy story with dart2js.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26943 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 21:09:06 +00:00
sigmund@google.com bd53fa0cc8 Change in deploy.dart to make it easier to run in run.sh without running pub.
You probably will delete some of this, but wanted to have things working better.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26900 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 02:00:05 +00:00
scheglov@google.com d5491a3c48 Fix build for pub after new analyzer_experimental snapshot.
R=brianwilkerson@google.com, jmesserly@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26883 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 17:22:33 +00:00
kevmoo@j832.com 331b9d2500 pkg/observe: wrapMicrotask should return the result the provided testCase
pkg/observe: removed unused imports

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26837 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 02:09:44 +00:00
sigmund@google.com 02a943a09d Fix observable transform bug introduced in a recent change, add regression tests
for it.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26836 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 01:32:19 +00:00
sigmund@google.com 3074dc4518 Move observe to observe package
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26830 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 00:14:16 +00:00
sigmund@google.com 389feb691b Prune the old deploy code. This CL does a few changes:
- includes a few new steps in the deploy transforms that were missing
 - deletes emitters.dart, paths.dart (which were only needed for generating
   code), bin/dwc.dart (we never used this)
 - changes test/run.sh to run from pkg/polymer/.
 - updates tests expectations to match the new output
 - for now, disable using shadowdom-polyfill in render tests because they
   mismatch the results you'd get without the polyfill (css is changed with the
   polyfill)

R=jmesserly@google.com, terry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26828 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 00:07:02 +00:00
rnystrom@google.com 193dfd7481 Make Transform a little more pleasant to use:
- Provide the primaryInput asset synchronously (#12515).
- Add convenience methods for reading input assets (#12516).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26822 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:37:40 +00:00
blois@google.com 11515b0a9a Fixing first-chance exception in TodoMVC
The object coming in was null and the property was a Symbol, so it was getting a null error in the mirror.getField.

BUG=
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26808 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 18:09:57 +00:00
blois@google.com a6b1633153 Suppressing first-chance exception in path_observer. The exception is thrown and caught in Dartium but the debugger still stops on this line when first-chance exceptions are enabled.
I opened bug 12776 on this, but specifying the radix will suppress the exception.

Note that this sends the code down what's called the 'slowParse'. See https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/runtime/lib/integers_patch.dart#83

BUG=
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26671 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 21:54:34 +00:00
sigmund@google.com 1df9a489d2 Make observable transform a barback transform.
R=jmesserly@google.com, nweiz@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25985 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 22:29:38 +00:00
kevmoo@j832.com 18d38085ab pkg: analysis aided cleanup
Removed a lot of warnings and hints when opening many pkg projects in the editor

R=gram@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25831 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 20:42:04 +00:00
jmesserly@google.com be70a7e4d4 Fix packages for latest SDK changes
This is the observe/mdv/custom_element side of the changes.
Polymer changes are at https://chromiumcodereview.appspot.com/22254002

The big change here is we can't use a Stream for the MDV<->custom_element bridge, because Streams aren't re-entrant which makes them not useful for a sync event.

Also fixes createBinding to dispatch to the custom_element so we don't need to hack "bind" in PolymerElement

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25799 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 20:50:55 +00:00
jmesserly@google.com a184061e7f [mdv] fix checked mode issue
Review URL: https://codereview.chromium.org//20907003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25700 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 01:13:53 +00:00
jmesserly@google.com 254878312a Speed up CompoundBindings
port of https://github.com/Polymer/mdv/commit/27b9cc6dfa69745aadb862780ae71b905e74014f

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25699 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 01:04:18 +00:00
jmesserly@google.com 9fa9329f90 add custom_element package
code is from https://github.com/dart-lang/web-ui/blob/polymer/lib/custom_element.dart

Includes a test for the polyfill. It also includes a static analysis test to catch the common errors of forgetting to add an Element API. Because we had analysis errors in "observe" and "mdv" packages too, I added tests for them too, and fixed the issues.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25591 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 23:00:21 +00:00
jmesserly@google.com 0bd2127aac [pkg:observe] Add support for explicit change notification, even on dirty-checked objects.
This is to fix warnings in Polymer.dart's TodoMVC example. Even though the objects extend ObservableMixin, they still have some computed fields that they notify manually. This seems like a scenario we should support, WDYT?

Also fixed a TODO about sending an unmodifiable list to the stream.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25531 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 18:15:31 +00:00