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/pkg/observe@24498 260f80e4-7a28-3924-810f-c04153c831b5
Fix bug in pkg:observe (observable_list.remove(Object))

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/observe@24857 260f80e4-7a28-3924-810f-c04153c831b5
implement dirty checking for @observable objects
This means MDV can be used without a compile step.
It continues to support implementation by-hand, so we can transform these objects automatically at deployment time.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/observe@25326 260f80e4-7a28-3924-810f-c04153c831b5
Avoid observing placeholder arrays in TemplateIterator
... and minimize instance removal/addition

port of https://github.com/Polymer/mdv/commit/1bc8afff957fc542ac5925afd8575dce229be835

I also rolled a few other parts of TemplateIterator forward to be based on current code.

The list_diff port is from change_summary.js. It was ported and reviewed in an older MDV CL, but not checked in because ObservableList is smarter about producing diffs.

R=justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/observe@25392 260f80e4-7a28-3924-810f-c04153c831b5
automatically clean up CompoundBinding
rough port of https://github.com/Polymer/mdv/commit/907455b2196f06650c5cdfbdb145e6eda2861750
We already handle most of the cleanup automatically; CompoundBinding was the main outlier.
I'm not completely sold on "close" being public, but it's needed if "bind" is going to start the subscription immediately (like it does now).

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/observe@25438 260f80e4-7a28-3924-810f-c04153c831b5
[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/pkg/observe@25485 260f80e4-7a28-3924-810f-c04153c831b5
[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/pkg/observe@25531 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@25591 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@25699 260f80e4-7a28-3924-810f-c04153c831b5
[mdv] fix checked mode issue

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/observe@25700 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@25799 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@25831 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@25985 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26671 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26808 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26822 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26828 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26830 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26836 260f80e4-7a28-3924-810f-c04153c831b5
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/pkg/observe@26837 260f80e4-7a28-3924-810f-c04153c831b5