Commit Graph

6327 Commits

Author SHA1 Message Date
Alexander Marks
dfe7a54cf0 Update Polymer 3 package-lock.
This is just a checkpoint to make sure we're using the latest version
of the type generator.
2018-12-05 17:52:40 -08:00
Kevin Schaaf
56fc6830d6 Merge pull request #5423 from Polymer/5422-ldm-templatizer-fix
Apply LegacyDataMixin to TemplatizeInstanceBase. Fixes #5422
2018-11-26 17:35:14 -08:00
Kevin Schaaf
c23ff5e0da Merge branch 'master' into 5422-ldm-templatizer-fix 2018-11-20 15:50:35 -08:00
Kevin Schaaf
a7c861b1f3 Merge pull request #5421 from Polymer/behaviors-no-mixin
3.x - Performance optimizations geared towards legacy `Polymer({...})` use
2018-11-20 12:40:30 -08:00
Kevin Schaaf
51ebf4df8a Update to webcomponentsjs 2.2.0 2018-11-20 11:19:24 -08:00
Kevin Schaaf
2c560bc175 Update to latest webcomponentsjs 2018-11-19 17:12:07 -08:00
Kevin Schaaf
1092719f68 Merge branch 'master' into 5422-ldm-templatizer-fix 2018-11-19 17:10:27 -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
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
f3b6675573 Add tests
* When extended, a behavior `registered` is always called on sub-most prototype rather than the prototype on which `registered` was defined.
* behavior property default values are overwritten by later behaviors and elements
* readOnly properties ignored when a previous behavior observes the property
* observedAttributes when extended
2018-11-14 10:37:53 -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
Daniel Freedman
655a64640b Merge pull request #5433 from smalls/err-not-air
err instead of air
2018-11-13 14:08:00 -08:00
Matt Small
ee68ea923a err instead of air 2018-11-13 10:56:23 -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
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
e00bf99326 skip some tests that never really worked in ShadyDOM 2018-11-07 15:40:07 -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
Steven Orvell
d5e0043abc Manually merge changes from #5418 2018-11-06 15:59:23 -08:00
Steven Orvell
0ca8407f63 Merge branch 'master' into behaviors-no-mixin 2018-11-06 15:14:30 -08:00
Daniel Freedman
5341dbd298 Merge pull request #5413 from Polymer/polymer-dom-externs
Hybrid compatibility for PolymerDomApi and Polymer.Iconset types.
2018-11-02 12:58:51 -07:00
Daniel Freedman
3a890b9526 Merge pull request #5419 from Polymer/bad-dom-api-property
Fix another unsafe property assignment in Polymer.
2018-11-02 12:51:21 -07:00
Kevin Schaaf
6dd3456940 Apply LegacyDataMixin to TemplatizeInstanceBase. Fixes #5422 2018-11-01 23:15:56 -07:00
Steven Orvell
d57e05e5ba TemplateStamp
Fix TreeWalker on older browsers were arguments are not optional.

Also updates package-lock
2018-11-01 16:03:00 -07:00
Steven Orvell
926a673556 Fixes #5420
This branch actually fixes this issue. A behavior specified template should win over a template specified via a dom-module. Updating the test here, which was validating the wrong result.
2018-11-01 16:02:18 -07:00
Steven Orvell
725d52c6a0 Lint fix 2018-10-31 19:22:21 -07:00
Steven Orvell
a08c9840d6 Updates ported from perf-opt branch
Merging manually from https://github.com/Polymer/polymer/pull/5418.
2018-10-31 19:21:04 -07:00
Steven Orvell
b6ae42d4c5 Merge branch 'master' into behaviors-no-mixin 2018-10-31 18:08:18 -07:00
Daniel Freedman
d290be9031 Check for ShadyDOM and :dir selectors before trying css transform
Should save a considerable amount of style processing when not needed.
2018-10-31 16:37:22 -07:00
Alexander Marks
b34b6fcb8d Rename Closure V1 compatibility PolymerDomApi types for TypeScript types.
These interface types only exist for Closure compilation compatibility
between V1 and V2/3, but there's no reason to have them in our
TypeScript types.

- PolymerDomApi -> DomApi
- PolymerDomApi.ObserveHandle -> FlattenedNodesObserver
2018-10-31 15:03:23 -07:00
Alexander Marks
b8e3002162 Hybrid compatibility for PolymerDomApi and Polymer.Iconset types.
Polymer V1 applications are compiled with hand-written externs at
https://github.com/google/closure-compiler/blob/master/contrib/externs/polymer-1.0.js.
These externs contain some types that do not exist in the V2 code.

PolymerDomApi is the type returned by the V1 Polymer.dom API, but in V2
it returns Polymer.DomApi. This adds the PolymerDomApi interface to the
V2 externs, and annotates that Polymer.DomApi implements it. This allows
both V1 and V2 code to use the PolymerDomApi type. Similar story for
PolymerDomApi.ObserveCallback.

Polymer.Iconset would ideally live in the iron-iconset repo, but many
packages reference the type without actually depending on that library,
so its simpler to just include it here, similar to how it worked for
Polymer V1.
2018-10-31 14:55:54 -07:00
Alexander Marks
3ee4eb96b2 Fix another unsafe property assignment in Polymer.
In polymer.dom.js, we stick __domApi on nodes, but we don't prevent that
property from being renamed when compiled. It seems that the renamed
property can sometimes collide in a bad way with some other unsafe
property we stick on nodes in the polyfill (not sure which yet).
2018-10-31 14:52:45 -07:00
Kevin Schaaf
1ad496fc7b Merge pull request #5416 from arobins/strict
Add explicit null template for array-selector
2018-10-31 08:40:52 -07:00
Allen Robinson
d2d49dd9b7 Add explicit null template for array-selector
This makes the element compatible with strictTemplatePolicy.
2018-10-30 17:15:40 -04:00
Daniel Freedman
2db60f5b60 [ci skip] update changelog 2018-10-26 11:03:07 -07:00
Daniel Freedman
2d9d602b77 3.1.0 v3.1.0 2018-10-26 11:01:38 -07:00
Daniel Freedman
99e3970682 update dependencies 2018-10-25 17:26:41 -07:00
Peter Burns
8510c6636e Merge pull request #5412 from Polymer/before-register-externs
Add beforeRegister callback to externs
2018-10-23 12:06:39 -07:00
Peter Burns
0492390b4e Add beforeRegister callback to externs 2018-10-23 09:50:50 -07:00
James Garbutt
693f9e4e28 Make toggleAttribute match with native signature (#5372) 2018-10-18 22:53:06 +01:00
Steven Orvell
4fcacaab09 Adds setting to skip style incudes and url rewriting 2018-10-17 16:07:01 -07:00
Steven Orvell
4af44c8d88 restores functionality of Polymer.mixinBehaviors 2018-10-17 16:06:42 -07:00
Caleb H
750e7e1a87 Fixed typos on lines 133 and 157 (#5409)
I also changed the wording on line 169 to be a bit more intuitive
2018-10-17 18:02:26 +01:00
Steven Orvell
624513f64d Avoids using mixins for behaviors.
(WIP) Experimental optimization to avoid using mixins for behaviors.
2018-10-16 18:56:28 -07:00