angular-docs-cn/packages/core/test/linker
jeripeierSBB a99aa29040 fix(animations): allow animations on elements in the shadow DOM (#40134)
When determining whether to run an animation, the `TransitionAnimationPlayer`
checks to see if a DOM element is attached to the document. This is done by
checking to see if the element is "contained" by the document body node.

Previously, if the element was inside a shadow DOM, the engine would
determine that the element was not attached, even if the shadow DOM's
host was attached to the document. This commit updates the `containsElement()`
method on `AnimationDriver` implementations to also include shadow DOM
elements as being contained if their shadow host element is contained.

Further, when using CSS keyframes to trigger animations, the styling
was always added to the `head` element of the document, even for
animations on elements within a shadow DOM. This meant that those
elements never receive those styles and the animation would not run.
This commit updates the insertion of these styles so that they are added,
to the element's "root node", which is the nearest shadow DOM host, or the
`head` of the document if the element is not in a shadow DOM.

Closes #25672

PR Close #40134
2021-04-15 12:45:52 -07:00
..
change_detection_integration_spec.ts
entry_components_integration_spec.ts
inheritance_integration_spec.ts
integration_spec.ts perf(common): remove unused methods from DomAdapter (#41102) 2021-03-10 11:48:24 -08:00
jit_summaries_integration_spec.ts
ng_container_integration_spec.ts
ng_module_integration_spec.ts refactor(core): rename `ɵɵInjectableDef` interface to `ɵɵInjectableDeclaration` (#41316) 2021-04-07 13:57:12 -07:00
projection_integration_spec.ts fix(animations): allow animations on elements in the shadow DOM (#40134) 2021-04-15 12:45:52 -07:00
query_integration_spec.ts
query_list_spec.ts perf(common): remove unused methods from DomAdapter (#41102) 2021-03-10 11:48:24 -08:00
regression_integration_spec.ts perf(common): remove unused methods from DomAdapter (#41102) 2021-03-10 11:48:24 -08:00
security_integration_spec.ts perf(common): remove unused methods from DomAdapter (#41102) 2021-03-10 11:48:24 -08:00
source_map_integration_node_only_spec.ts
system_ng_module_factory_loader_spec.ts
view_injector_integration_spec.ts refactor(core): add links to top runtime errors (#40326) 2021-01-19 10:14:56 -08:00