angular-cn/packages/core
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
..
global build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
schematics feat(core): add migration for `XhrFactory` import (#41313) 2021-03-29 15:14:16 -07:00
src perf(core): optimize getDirectives (#41525) 2021-04-13 16:06:32 -07:00
test fix(animations): allow animations on elements in the shadow DOM (#40134) 2021-04-15 12:45:52 -07:00
testing refactor(core): rename `ɵɵInjectableDef` interface to `ɵɵInjectableDeclaration` (#41316) 2021-04-07 13:57:12 -07:00
BUILD.bazel fix(core): disable tsickle pass when producing APF packages (#37221) 2020-05-21 09:14:47 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): update supported range of node versions (#41544) 2021-04-14 09:40:17 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00