angular-cn/packages/core/test/acceptance
Miško Hevery 9bd9590767 refactor(ivy): change styling to use programmatic API on updates (#34804)
Previously we would write to class/style as strings `element.className` and `element.style.cssText`. Turns out that approach is good for initial render but not good for updates. Updates using this approach are problematic because we have to check to see if there was an out of bound write to style and than perform reconciliation. This also requires the browser to bring up CSS parser which is expensive.

Another problem with old approach is that we had to queue the DOM writes and flush them twice. Once on element advance instruction and once in `hostBindings`. The double flushing is expensive but it also means that a directive can observe that styles are not yet written (they are written after directive executes.)

The new approach uses `element.classList.add/remove` and `element.style.setProperty/removeProperty` API for updates only (it continues to use `element.className` and `element.style.cssText` for initial render as it is cheaper.) The other change is that the styling changes are applied immediately (no queueing). This means that it is the instruction which computes priority. In some circumstances it may result in intermediate writes which are than overwritten with new value. (This should be rare)

Overall this change deletes most of the previous code and replaces it with new simplified implement. The simplification results in code savings.

PR Close #34804
2020-01-24 12:23:19 -08:00
..
BUILD.bazel build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
attributes_spec.ts refactor(core): Migrate TestBed.get to TestBed.inject (#32382) 2019-09-09 19:10:54 -04:00
bootstrap_spec.ts fix(ivy): properly bootstrap components with attribute selectors (#34450) 2020-01-14 09:45:24 -08:00
change_detection_spec.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
common_integration_spec.ts test(ivy): move common integration tests to acceptance (#30213) 2019-05-14 11:37:50 -07:00
component_spec.ts fix(ivy): properly bootstrap components with attribute selectors (#34450) 2020-01-14 09:45:24 -08:00
content_spec.ts fix(ivy): Ensure ngProjectAs marker name appears at even attribute index (#34617) 2020-01-07 10:51:46 -08:00
copy_definition_feature_spec.ts feat(ivy): add a runtime feature to copy cmp/dir definitions (#33362) 2019-10-25 09:16:50 -07:00
debug_spec.ts refactor(ivy): migrate debug spec from render3 (#32621) 2019-09-12 11:35:49 -07:00
di_spec.ts fix(ivy): handle overloaded constructors in ngtsc (#34590) 2020-01-14 15:17:09 -08:00
directive_spec.ts fix(ivy): match directives on namespaced elements (#33555) 2019-11-07 15:40:50 +00:00
discover_utils_spec.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
embedded_views_spec.ts fix(ivy): unable to bind to implicit receiver in embedded views (#30897) 2019-06-11 14:29:42 -07:00
exports_spec.ts refactor(ivy): move exports tests to acceptance (#30157) 2019-04-26 16:37:34 -07:00
host_binding_spec.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
i18n_spec.ts fix(ivy): append `advance` instructions before `i18nExp` (#34436) 2020-01-07 10:31:45 -08:00
inherit_definition_feature_spec.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
integration_spec.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
lifecycle_spec.ts fix(ivy): do not invoke change detection for destroyed views (#34241) 2019-12-06 13:03:08 -08:00
listener_spec.ts test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
ng_module_spec.ts fix(ivy): warn instead of throwing for unknown elements (#34524) 2020-01-08 15:01:42 -08:00
ngdevmode_debug_spec.ts test(ivy): Have more descriptive names for `LView` (#33449) 2019-11-07 15:33:50 +00:00
outputs_spec.ts test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
pipe_spec.ts test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
property_binding_spec.ts refactor(core): Migrate TestBed.get to TestBed.inject (#32382) 2019-09-09 19:10:54 -04:00
property_interpolation_spec.ts refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
providers_spec.ts fix(ivy): error when using forwardRef in Injectable's useClass (#30532) 2019-07-26 14:02:49 -07:00
pure_function_spec.ts fix(ivy): constant object literals shared across element and component instances (#33705) 2019-11-13 13:36:41 -08:00
query_spec.ts test(ivy): ViewContainerRef.move where the old and new indexes are the same (#34156) 2019-12-03 16:08:48 -08:00
renderer_factory_spec.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
router_integration_spec.ts refactor(core): Migrate TestBed.get to TestBed.inject (#32382) 2019-09-09 19:10:54 -04:00
styling_spec.ts refactor(ivy): change styling to use programmatic API on updates (#34804) 2020-01-24 12:23:19 -08:00
template_ref_spec.ts test(ivy): get ViewRef.rootNodes should get all root nodes from projectable nodes (#33647) 2019-11-11 09:37:38 -08:00
text_spec.ts refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
view_container_ref_spec.ts fix(ivy): allow insertion of views attached to a different container (#34156) 2019-12-03 16:08:47 -08:00
view_insertion_spec.ts test(ivy): non-regression test for ViewContainerRef queried on ng-container (#33939) 2019-11-20 14:45:43 -08:00
view_ref_spec.ts test(ivy): fix failing view ref test (#29178) 2019-03-07 18:56:22 -08:00