Commit Graph

804 Commits

Author SHA1 Message Date
Steven Orvell
d4857ecc3d Adds syncInitialRender setting
This separates the behavior from `legacyOptimizations`. Performs synchronous initial rendering under ShadyDOM when this flag is set.
2019-01-31 15:54:41 -08:00
Kevin Schaaf
4d99099d1a Ensure that marshalArgs pulls wildcard info value from __data
It currently pulls the value from `changedProps` rather than __data, meaning it could provide stale data for re-entrant changes.
2019-01-31 11:01:16 -08:00
Kevin Schaaf
563bc8586c Fix lint warning 2019-01-30 10:33:34 -08:00
Kevin Schaaf
007f3cc251 Add warning for redeclared computed properties. 2019-01-30 10:08:58 -08:00
Kevin Schaaf
63dadbf248 Add warning for undeclared properties used in bindings. 2019-01-30 10:08:58 -08:00
Steven Orvell
fc7858ce7e Make initial distribution synchronous when legacyOptimizations is set
Uses new `ShadyDOM.flushInitial(shadowRoot)` API. This better matches the behavior of Polymer 1.
2019-01-29 18:43:08 -08:00
Steven Orvell
491c2a775c Ensure dispatchEvent is wrapped
When `ShadyDOM.noPatch` is set, this ensures that firing an event triggers distribution.
2019-01-29 18:41:37 -08:00
Daniel Freedman
d577c8c875 Disable auto strip-whitespace on template with legacyOptimizations
External copy of cl/225100591
2019-01-29 17:25:32 -08:00
Daniel Freedman
c22b87c797 Merge pull request #5464 from Polymer/copy-properties
Allow `Polymer({})` calls with ES6 class
2019-01-29 11:32:09 -08:00
Daniel Freedman
86db24cd87 use a regular for-loop intead of for-of 2019-01-28 16:30:06 -08:00
Peter Burns
bdcd37c513 Lint clean 2019-01-15 12:54:09 -08:00
Peter Burns
f15b137d14 Remove @override from static methods on mixins.
Closure compiler is improving its handling of class inheritance, and it does not understand our mixins well enough to notice that these methods override their superclasses. These annotations cause compiler errors in an upcoming version of the compiler.
2019-01-15 12:02:44 -08:00
Alexander Marks
7f2d736a96 Add @suppress annotations for missing property checks.
Upstream of cl/228620162
2019-01-10 12:23:55 -08:00
Daniel Freedman
3624a140df Allow Polymer({}) calls with ES6 class
External copy of cl/228511716
2019-01-09 15:16:22 -08:00
Steven Orvell
8e506028de [wrap] Fix doc comment. 2018-12-19 17:07:10 -08:00
Steven Orvell
d8aac3b50b Fix typo 2018-12-19 16:58:26 -08:00
Steven Orvell
4e4d6fe412 Make sure _valueToNodeAttribute uses wrap
This ensures attributes bindings to class, name, and slot behave correctly when `ShadyDOM.noPatch` is set.
2018-12-19 16:23:26 -08:00
Peter Burns
cf2cd05e73 Suppress upcoming jscompiler errors.
These errors don't exist yet, but we need to suppress them in the files that will have them so that we're not broken when they're turned on.
2018-12-19 16:15:06 -08:00
Daniel Freedman
e73285b370 compromise with typescript and closure 2018-12-17 14:25:26 -08:00
Daniel Freedman
e4b56e4614 Closure typing fixes 2018-12-17 11:50:59 -08:00
Alexander Marks
0da022fd9d Add type jsdoc to templatize root property.
This allows analyzer to understand it for typings/docs.
2018-12-13 12:19:51 -08:00
Alexander Marks
fcc8752724 Remove meaningless "undefined" in settings.js 2018-12-11 14:43:44 -08:00
Steven Orvell
a2e597c2ea Make noPatch safe with older versions of ShadyDOM
Everything should work even if a version of ShadyDOM that does not support `noPatch` is loaded.

Also, re-enable type generation and privatize problematic type.
2018-12-10 18:52:22 -08:00
Steven Orvell
8954c25103 Changes based on review.
Re-use code in Polymer.dom when in noPatch mode.
2018-12-07 17:36:55 -08:00
Steven Orvell
42b13d0afd Changes based on review. 2018-12-07 16:53:34 -08:00
Steven Orvell
b8f3b79c72 More shady compatible wrapping
Sync'd with Polymer 1 wrap locations
2018-12-07 16:22:54 -08:00
Steven Orvell
acbe6496c9 Fix typos 2018-12-07 14:23:51 -08:00
Steven Orvell
e3b3baa70c Update to match 2.x branch 2018-12-07 12:30:22 -08:00
Steven Orvell
c3bd4d6fee Revert "Manual merge from perf-opt-disable-upgrade branch."
This reverts commit 0f022dfe4e.
2018-12-07 10:29:02 -08:00
Steven Orvell
05a7e1cdd4 Merge branch 'master' into shady-nopatch 2018-12-07 10:24:51 -08:00
Kevin Schaaf
c23ff5e0da Merge branch 'master' into 5422-ldm-templatizer-fix 2018-11-20 15:50:35 -08:00
Steven Orvell
21c644ce53 Merge branch 'behaviors-no-mixin-disable-upgrade' into shady-nopatch 2018-11-19 17:10:48 -08:00
Kevin Schaaf
1092719f68 Merge branch 'master' into 5422-ldm-templatizer-fix 2018-11-19 17:10:27 -08:00
Steven Orvell
0f022dfe4e Manual merge from perf-opt-disable-upgrade branch. 2018-11-19 17:07:54 -08:00
Daniel Freedman
5422792f0e Remove double-import of settings
Causing warnings with Closure Compiler

External copy of cl/222162967
2018-11-19 20:02:45 -05:00
Peter Burns
3a4db3b112 Document properties for eslint. 2018-11-19 10:06:48 -08:00
Steven Orvell
1bce4f0877 Add back event tests. 2018-11-18 20:09:59 -08:00
Kevin Schaaf
6c93955bac Merge branch 'css-build-dir' into behaviors-no-mixin 2018-11-14 15:23:58 -08:00
Steven Orvell
ed5f7f279b Use closure-safe name 2018-11-14 11:02:18 -08:00
Steven Orvell
ad5cb2686a Ensure properties and observers are interleaved per behavior 2018-11-13 19:36:47 -08:00
Steven Orvell
2b35a74f2a Ensure property values are always overridden by extendors/behaviors 2018-11-13 16:24:44 -08:00
Steven Orvell
50ad018c8d Ensure registered is always called on element prototype
Previously, it could be called on a superclass' prototype and not the element's prototype.
2018-11-13 15:32:41 -08:00
Steven Orvell
d64a9c27e5 Do lazy behavior copying only when legacyOptimizations is set 2018-11-09 18:48:48 -08:00
Steven Orvell
310c7ead07 Behavior property copying fixes
* ensure element has `is` on prototype early as this is sometimes checked in user code.
* ensure properties copied onto elements from info/behaviors are forced to configurable so they can be re-configured by later behaviors.
* add `_noAccessors` optimization for faster property copying
2018-11-09 18:18:06 -08:00
Steven Orvell
65a3149b8c Ensure initial static classes are preserved when a class$ binding is present
This ensures ShadyCSS scoping classes are not removed when a class binding's initial literal value is set.
2018-11-09 18:03:55 -08:00
Peter Burns
bbf24c0c67 Get typescript compiling again. 2018-11-09 17:13:30 -08:00
Steven Orvell
82c9d17e23 Remove extra space 2018-11-09 11:33:12 -08:00
Steven Orvell
cf30a8cc35 Avoid copying certain properties from behaviors
This better matches what Polymer 1.x did for:
* hostAttributes
* listeners
* properties
* observers
2018-11-09 11:31:35 -08:00
Daniel Freedman
ec00d26b58 Move __activateDir into check instead of replace
Remove unused imports in testing
2018-11-07 15:21:06 -08:00
Daniel Freedman
08bc1ff5ed Don't set up observer in ShadyDOM
It won't be used
2018-11-07 15:04:55 -08:00