Commit Graph
132 Commits
Author SHA1 Message Date
Steven Orvell 5e88e6a70d Merge branch 'master' into legacy-undefined-noBatch-master-merge 2020-01-21 18:14:00 -08:00
Steven Orvell 61a14c17ce Fix testing issues with latest webcomponentsjs
* querySelectorAll now polyfills an NodeList so coerce to Array when doing `deepEquals`
* when testing noPatch, add workaround for https://github.com/webcomponents/polyfills/issues/250.
2020-01-21 17:29:25 -08:00
Steven Orvell b8315d6061 Enable tests for legacyNoObservedAttributes 2020-01-09 12:06:38 -08:00
Steven Orvell ab04377bda Add basic support for adoptedStyleSheets
Uses `shadowRoot.adoptedStyleSheets` for element styling when supported (currently Chrome) and only if a css build is used. The build restriction is in place in order to support `@apply` via ShadyCSS. Currently ShadyCSS works only with a style element in the element template.
2019-10-08 17:55:38 -07:00
Steven Orvell 280f4f0a37 Applies micro-optimizations and removes obsolete settings
Applies micro-optimizations that were found to improve element creation benchmarks by 5-10%, and removes obsolete settings:

* Removed `legacyNoBatch` and `legacyNotifyOrder` settings.
* dom-if/repeat: `dom-change` and `renderedCount` no longer fire with `legacyOptimizations` set.
* legacy-element-mixin: `isAttached` now set before calling `connectedCallback` so it is batched with initial rendering.
* `PropertiesChanged`: property accessor code now inlined for efficiency rather than calling `_get/_setProperty`. The `__dataCounter` tracking flag has been moved here to avoid the need to override `_flushProperties` in `PropertyEffects`.
* `PropertyEffects`: inlined `runEffectsForProperty` into `runEffects` for efficiency. Removed wrapping around sending data events.
* `async`: In the microtask scheduler, now only provoke a DOM mutation if needed.
2019-09-12 15:11:38 -07:00
Kevin Schaaf e690dfe2c1 Runtime stamped dom-if 2019-06-18 22:10:50 -07:00
Daniel Freedman 688e19a7f0 Merge branch 'master' into legacy-undefined-noBatch 2019-05-16 14:48:30 -07:00
Daniel Freedman 6bc9534088 Implement scopeSubtree for ShadyDOM noPatch mode
Add scopeSubtree as a util function, and use in LegacyElement
2019-05-08 15:20:58 -07:00
Kevin Schaaf b065d1450a Cleanup, add tests.
* remove old implementation
* add API docs
* rename some API
* add dynamicFn to dep count
* add test for method as dependency
2019-04-11 10:45:50 -07:00
Kevin Schaaf add7784284 Ensure properties are set one-by-one at startup. 2019-02-19 23:53:16 -08:00
Steven Orvell 52a559fcec Add tests for legacyUndefined setting 2019-02-07 12:40:39 -08:00
Steven Orvell a50aee308b Merge branch 'master' into shady-nopatch 2019-02-04 15:29:44 -08:00
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
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
Daniel Freedman 3ff4ed1b94 Add tests for calling Polymer() with ES6 class 2019-01-29 10:14:53 -08:00
Steven Orvell e3b3baa70c Update to match 2.x branch 2018-12-07 12:30:22 -08:00
Steven Orvell d64a9c27e5 Do lazy behavior copying only when legacyOptimizations is set 2018-11-09 18:48:48 -08:00
Kevin Schaaf e385e49b40 Add legacy-data-mixin as 1.x->2.x/3.x migration aide. Fixes #5262. 2018-08-21 10:53:48 -07:00
Kevin Schaaf 625372ea8c Add tests. 2018-07-17 17:42:46 -07:00
Kevin Schaaf 1761c79b35 Eliminate more canonical path usage 2018-04-19 18:19:39 -07:00
Kevin Schaaf f1266845e5 Add WCT config used by all tests 2018-04-19 16:27:06 -07:00
Elliott Marquez a84ad782e9 remove importHref tests 2018-04-17 10:59:31 -07:00
Peter Burns cf3b7215aa Replace sources with modulizer output. 2018-04-16 11:18:42 -07:00
Steven Orvell 59d7f975b0 Merge branch 'master' into disable-upgrade 2018-02-21 10:22:08 -08:00
Daniel Freedman ecd1ba3a4c Fix tests (#5050)
* Use sudo to fix chrome testing

There is a bug with the chrome sandbox in the Travis CI container
system, which is fixed by using `sudo: required`.

Related to travis-ci/travis-ci#8836

* reduce cognitive overhead of the test runner

* remove testing polyfilled Custom Elements with native ShadowDOM

* Use headless chrome and firefox

Use MacOS 10.13 for Safari 11

* disable testing CSS Custom Property Shim

* move sauce tests into script for travis_wait compat
2018-01-19 14:03:20 -08:00
Steven Orvell 62ce31487b Adds Polymer.DisableUpgradeMixin
Fixes #4909. Elements using this mixin will not "enable" themselves when they have a `disable-upgrade` attribute. This mirrors a feature of Polymer 1.x but is now opt-in.
2017-12-15 14:12:44 -08:00
Daniel Freedman da46204d72 Merge branch 'master' into basic-element 2017-12-08 14:29:07 -08:00
Daniel Freedman 02c06aa3b8 Rename html-fn to html-tag
Add tests
Add a `Polymer.html = Polymer.html` line to `polymer.html` and
`polymer-element.html` for modulizer exporting in Polymer 3.
2017-12-06 17:07:26 -08:00
Steven Orvell d3e1bae48a Merge branch 'master' into basic-element 2017-11-29 16:49:07 -08:00
Steven Orvell 40f02ea178 Remove PropertiesElement in favor of PropertiesMixin. 2017-11-29 16:33:44 -08:00
Daniel Freedman 15d8c6af41 Merge branch 'master' into 2.x-shady-unscoped-style 2017-11-17 17:33:16 -08:00
Daniel Freedman 8241b8870d Depend on webcomponents and shadycss with shady-unscoped support
Disable multi-styles test until that feature is fully implemented in
ShadyCSS
2017-11-17 17:30:28 -08:00
valdrinkoshi f03e8d1b3e test more permutations 2017-11-16 01:01:45 +01:00
Steven Orvell d331c673fc Merge branch 'master' into basic-element 2017-11-10 17:04:15 -08:00
Steven Orvell 819652eb9f Allow style elements to be separate in the element template.
Previously Polymer collapsed any included shared styles into 1 style element. This prevents the browser from recognizing shared style elements as similar and optimizing them. With this change, we no longer collapse styles. Note, included styles are still currently collapsed by ShadyCSS but the polyfill will likely not do this in the future.
2017-10-19 12:56:30 -07:00
Steven Orvell d77e073eb9 Add support for styles with a shady-unscoped attribute
This is being added to 1.x and it's ported forward here so it can be used in hybrid mode.
2017-10-18 16:49:49 -07:00
Daniel Freedman 31c0ebc7da Always do the :dir transform
ShadyCSS version of the :dir transform is not good enough :(
2017-10-10 17:52:39 -07:00
Steven Orvell e3e128bade Renamed basic element to properties element
Exposed `PropertiesMixin` also.
2017-09-21 14:35:12 -07:00
Steven Orvell d26955b46e Implement basic-element with properties-changed
Moves basic property creation and attribute deserialization into properties changed to make it suitable as a base for basic-element.
2017-09-15 19:16:23 -07:00
Steven Orvell dcdb750ba3 Add test to runner. 2017-09-15 11:53:35 -07:00
Josh Soref 00e0567e79 spelling: preferring 2017-09-07 04:40:57 +00:00
Daniel Freedman d439960aba Revert "Adds restamp mode to dom-repeat." 2017-08-09 15:49:47 -07:00
Tim van der Lippe 05964657d7 Merge branch 'master' into 1713-kschaaf-repeat-restamp 2017-07-31 20:09:46 -07:00
Kevin Schaaf 06190c9db2 Fix impl of _contentForTemplate. Add template-stamp tests.
Fixes #4597
2017-05-23 10:23:05 -07:00
Kevin Schaaf 972b2babe3 Removes the disable-upgrade feature from Polymer 2.0.
Due to #4550, the feature has a flaw for native ES6 classes and would be better implemented as either a mixin or patch to `customElements.define`.
2017-04-27 17:42:21 -07:00
Kevin Schaaf 6cebeace91 Adds restamp mode to dom-repeat. 2017-04-21 12:24:00 -07:00
Kevin Schaaf cd321a3b61 Merge branch 'master' into 2.0-binding-api-refactor 2017-04-13 09:48:25 -07:00
Daniel Freedman 2356f7b8f0 Only style elements with templates
dom-repeat and/or dom-if booting before custom-style is registered
can break the complicated loading strategy of ShadyCSS.

By only calling ShadyCSS for elements with templates, we both fix this
issue and improve performance for template-less element booting

Fixes #4521
2017-04-11 11:01:39 -07:00
Kevin Schaaf eb6ab63ee7 Add initial runtime stamping tests. 2017-04-10 18:04:13 -07:00
Steven Orvell 8467a696da Fixes #4447. Re-introduce the hostStack in order to maintain “client before host” ordering when _flushProperties is called before connectedCallback (e.g. as Templatize does). 2017-04-05 18:49:07 -07:00