New issue
Advanced search Search tips

Issue 838526 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

@keyframe animation names leak from the shadow tree.

Project Member Reported by emilio@chromium.org, May 1 2018

Issue description

     Safari: OK
    Firefox: OK-ish. I'm deciding what to do about this in https://bugzilla.mozilla.org/show_bug.cgi?id=1018269
    IE/Edge: N/A

What steps will reproduce the problem?
1. Load the attached testcase.

What is the expected result?

The animation does not apply, since it's not defined in the document tree, but in the shadow tree.


What happens instead of that?
The animation applies.
 
t.html
354 bytes View Download
Note that this is kind of like https://github.com/w3c/csswg-drafts/issues/1995.

WebKit fixed this "properly" in https://bugs.webkit.org/show_bug.cgi?id=164608, so that the lookup depends on where the name came from.
I guess this is pretty intentional looking at https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/resolver/style_resolver.cc?l=1267&rcl=90f9f8680ebb4a87d177f3b0833372ae4e0c88d8.

Given the spec issue is unresolved, feel free to just WONTFIX, or block on the spec issue.

The spec situation here is somewhat bad...
Actually, I misread and GetDocument().GetStyleEngine().FindKeyframeRulesForAnimation does not return document rules. So it may not be that intentional...

Comment 4 by e...@chromium.org, May 1 2018

Status: Available (was: Untriaged)
I looked at how we could implement animation-name matching a @keyframes rule in the scope that the declaration for animation-name is matched, which seems doable without too much trouble.

It would be good to get this properly spec'ed first.

Sign in to add a comment