|
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
Committed: https://code.google.com/p/dart/source/detail?r=28134
Total comments: 30
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+2646 lines, -913 lines) |
Patch |
|
M |
pkg/custom_element/lib/custom_element.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
5 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
|
A |
pkg/custom_element/lib/src/attribute_map.dart
|
View
|
1
2
3
|
1 chunk |
+85 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/observe/lib/src/bind_property.dart
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/observe/lib/src/observable.dart
|
View
|
1
|
3 chunks |
+12 lines, -8 lines |
0 comments
|
Download
|
|
M |
pkg/pkg.status
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+24 lines, -5 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/example/component/news/web/news-component.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/boot.js
|
View
|
1
2
3
|
1 chunk |
+24 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/component_build.dart
|
View
|
1
2
3
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
A |
pkg/polymer/lib/deserialize.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+51 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/lib/job.dart
|
View
|
1
2
3
|
1 chunk |
+53 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/lib/platform.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+41 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/polymer.dart
|
View
|
1
2
3
|
1 chunk |
+17 lines, -122 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/polymer_element.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -552 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/src/build/linter.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
8 chunks |
+51 lines, -7 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/src/build/runner.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
A + |
pkg/polymer/lib/src/build/utils.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/lib/src/declaration.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+713 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/lib/src/instance.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+930 lines, -0 lines |
0 comments
|
Download
|
|
A + |
pkg/polymer/lib/src/loader.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+12 lines, -57 lines |
0 comments
|
Download
|
|
D |
pkg/polymer/lib/src/utils.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -34 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/lib/transformer.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/pubspec.yaml
|
View
|
1
2
3
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/attr_deserialize_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+45 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/attr_deserialize_test.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/attr_mustache_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+50 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/attr_mustache_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/polymer/test/build/linter_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
6 chunks |
+32 lines, -5 lines |
0 comments
|
Download
|
|
A + |
pkg/polymer/test/build/utils_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A |
pkg/polymer/test/prop_attr_reflection_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+110 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/prop_attr_reflection_test.html
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/publish_attributes_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+53 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/publish_attributes_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/take_attributes_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+109 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/polymer/test/take_attributes_test.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+75 lines, -0 lines |
0 comments
|
Download
|
|
D |
pkg/polymer/test/utils_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -86 lines |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/app.dart
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/editable_label.dart
|
View
|
1
2
3
4
5
6
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/editable_label.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/model.dart
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/router_options.dart
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/todo_row.dart
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
|
M |
samples/third_party/todomvc/web/todo_row.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 5 (0 generated)
|