Commit Graph

27 Commits

Author SHA1 Message Date
jakemac@google.com 589c718ac0 update polymer js to 0.4.0
BUG= http://dartbug.com/20809

The following files were not migrated, they used to be in platform.js
and are like polyfills, but are adding non-html spec functionality used
by polymer:

src/declaration/mdv.js
src/declaration/polymer.js
src/declaration/queue.js
src/declaration/styles.js
src/lib/dom.js
src/lib/lang.js
src/lib/loader.js
src/lib/styleloader.js
src/lib/url.js
src/system/compat.js
src/system/microtask.js
src/system/module.js
src/system/patches-mdv.js
src/system/unresolved.js

The following tests were not migrated. For the most part they are just
testing the features added by the files above:

test/html/loader-deduplicate.html
test/html/mdv-shadow.html
test/html/mdv-tests/polymer-expressions-tests.js
test/html/styling/recursive-style-import.html
test/html/url.html
test/js/bindMDV.js
test/js/oop.js
test/html/styling/rules/*
test/js/styling.js
test/js/register.js
test/js/utils.js
test/html/template-repeat-wrappers.html

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40120 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 21:41:47 +00:00
sigmund@google.com 73e23be2b6 Bring back initPolymer, allow boot.js only if using "polymer_experimental.html".
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36578 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 18:30:52 +00:00
sigmund@google.com 47e238b613 Replace bootstrap logic with 'boot.js', use 'component/dart' mime-type and add
warnings to prepare users for the future breaking change in Dartium.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34753 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 23:42:34 +00:00
sigmund@google.com 26e135b322 Fix canonicalization tests that were surprisingly timing out in chrome-34.
R=jacobr@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33788 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 23:37:26 +00:00
kevmoo@google.com 7c32d14282 Cleanup for pkg/observe and pkg/polymer
Remove unused imports, fixed usage of deprecated members

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33770 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 20:23:51 +00:00
jmesserly@google.com b218f342fd [polymer] interop with polymer-element and polymer.js
* let polymer.js register polymer-element
* let polymer.js bootstrap for polymer.dart
* hook polymer-element's register, if it's a Dart class go down the Dart code path

building polymer.concat.js (debug only) requires https://github.com/Polymer/polymer-dev/pull/9

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33398 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:04:20 +00:00
jmesserly@google.com ff3aa2f569 [polymer] switch comment style
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33046 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-25 23:43:45 +00:00
sigmund@google.com f924fac14a Use a transformer to initialize custom elements and call initMethod. This is the
first step to removes the dependence on mirrors in the deployable application.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32270 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-04 01:08:50 +00:00
sigmund@google.com fdc6d43083 Improve how we handle packages/ HTML imports. This improves resolution of URLs containing
"package/" under the web/ directory. Resolution under 'lib' is the same, but it and gives better suggestions if the path looks wrong. This summarizes what changed:

- source file: lib/b.html

  import to "packages/c/d.html" was error, now is error + suggestion
  import to "../packages/c/d.html" was error, now is error + suggestion
  import to "../../packages/c/d.html" was resolved, now is resolved too

- source file: lib/a/b.html

  import to "packages/c/d.html" was error, now is error + suggestion
  import to "../packages/c/d.html" was error, now is error + suggestion
  import to "../../packages/c/d.html" was error, now is error + suggestion
  import to "../../../packages/c/d.html" was resolved, now is resolved too

- source file: web/b.html

  import to "packages/c/d.html" was and continues to be resolved
  import to "../packages/c/d.html" was error, now is resolved

- source file: web/a/b.html

  import to "packages/c/d.html" was error, now is resolved
  import to "../packages/c/d.html" was and continues to be resolved
  import to "../../packages/c/d.html" was and continues to be resolved

Note: polymer-build and development mode are slightly different: polymer-build
detects and issues an error for bad paths inside lib/. These are not detected by
our package-resolution in loader.dart, but as long as users are not creating
symlinks by hand, Dartium should detect if the paths are wrong.

When we switch to start using pub-serve by default, we should be able to go back
to the web-ui style of using "package:" urls directly in HTML.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32170 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 20:51:28 +00:00
kustermann@google.com 54b71bdbe2 Reaply "Use a real package-root for all of our samples (and tests inside a package) instead of buildDir/packages/"
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31694 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 15:15:37 +00:00
kustermann@google.com 8afb1d4844 Revert "Use a real package-root for all of our samples (and tests inside a package) instead of buildDir/packages/"
Review URL: https://codereview.chromium.org//130743005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31693 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 12:58:33 +00:00
kustermann@google.com 76e4bdeb0c Use a real package-root for all of our samples (and tests inside a package) instead of buildDir/packages/
For all tests that depend on other packages (e.g. samples) we can
 - use packages from pub.dartlang.org
 - use packages from pub.dartlang.org with overrides for the packages we have
   in the dart repository.

This CL does NOT include test-specific package-roots for dartium. Dartium will request a URL containing
"packages" when it encounters a package import. Our HTTP server will then serve from buildDir/packages.
This needs to change when we have test specific VMOptions for dartium.

For normal tests (without a pubspec.yaml on the path to dart/, we still use buildDir/packages).

R=ricow@google.com, whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31691 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 12:29:55 +00:00
whesse@google.com 4a1c80cde0 Change polymer tests to use internal test_controller, not unittest/test_controller.
BUG=
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31021 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 15:33:49 +00:00
sigmund@google.com 260edd95ea Switch to new main semantics (fixes issue 14797)
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29870 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 01:51:58 +00:00
sigmund@google.com 4e67584f5a Update samples with latest polymer and Dartium changes
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29305 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 01:15:49 +00:00
sigmund@google.com 92ebcc30c7 Fixes all canonicalization problems... all of them. Ok, not all of them, but at
least it should address the many issues people have been hitting.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29137 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 00:34:35 +00:00
jmesserly@google.com eb72738cc9 remove xtag from Polymer
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29025 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 19:04:39 +00:00
sigmund@google.com 4d357c5148 Improves how to initialize polymer apps and fixes polymer build and linter to
match Dartium semantics (Issue 14238). In particular:
  - only one script tag is allowed per document
  - initPolymer can be call from init.dart or the users main method, the build
    process knows how to call the user's main given the new Dartium semantics.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28971 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 23:30:23 +00:00
sigmund@google.com 6c4e38b81e Practically remove boot.js, adds the initialization from the Dart side of
things, and fixes examples to work this way.

R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28773 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 02:43:50 +00:00
blois@google.com 74bf998319 Fixing polymer example code for Polymer element change
TBR
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28623 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 00:42:10 +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 05705dad2f fix polymer tests -- replace run.sh and run tests using bots
BUG=
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27353 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 21:21:55 +00:00
sigmund@google.com 36c012b8a2 Get rid of doctype warning in analyzer
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26895 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 22:44:00 +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
terry@google.com d2bf47bef9 Moved test changes to dart-lang
BUG=
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26724 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:14:20 +00:00
sigmund@google.com a1b0915ca3 Bring the rest of the polymer.dart code from github.
R=jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26414 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 00:29:13 +00:00
jmesserly@google.com 068dec6712 move polymer.dart into dart svn
R=sigmund@google.com

Review URL: https://chromiumcodereview.appspot.com//23224003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26404 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 22:48:50 +00:00