Open Bug 662351 Opened 13 years ago Updated 2 years ago

Allow keyframe animations and transitions to work on the ::-moz-progress-bar pseudo element

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

People

(Reporter: jykng, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110606 Firefox/6.0a2
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110606 Firefox/6.0a2

I know it's non-standard in the first place but with being able to style the progress bar of a progress element using ::-moz-progress-bar but I've determined that css transitions and animations won't work on it.

In an attempt to simulate a progress bar that's sort of like the windows 7 default system one, it would help if you could at least animate something like the background position.

Reproducible: Always
Product: Firefox → Core
QA Contact: general → general
Component: General → Style System (CSS)
QA Contact: general → style-system
It is possible to animate progress but not the anonymous child. Are animations disabled for anonymous child on purpose or is that a bug?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86 → All
Version: unspecified → Trunk
Animations and transitions are tied to elements.

::before and ::after pseudo-elements are explicitly special-cased to also work.

You could try adding such special-casing for ::-moz-progress-bar and seeing what happens....

David, do you recall why we didn't just allow transitions on all pseudo-elements?  I guess there's the issue of figuring out which Element to actually hang the transitions off of, since this differs for different pseudo-elements...
I suppose we could store pseudo-element transition/animation data in a hash table in the element properties.

The motivation for storing the data on elements was preserving it across reframes; the pseudo-element anonymous content is not preserved across reframes (as far as I know, anyway), so it's all stored on the real element.
We could store it as we do now; just have a list of atoms that correspond to all the pseudo-element IDs.

> The motivation for storing the data on elements was preserving it across
> reframes

That's probably worth documenting in the code.
(In reply to comment #5)
> We could store it as we do now; just have a list of atoms that correspond to
> all the pseudo-element IDs.

That leads to a lot of property lookup when removing nodes from the tree, though, to check for and destroy each property, and it means adding new code for each new pseudo-element (possibly via preprocessing hacks, but it's still new code).
Hmm.  That first is a good point.  The second would be automatic if we used nsCSSPseudoElementList right, as you note, but the first is something that would best to avoid.
Blocks: 665367
Attachment #560227 - Attachment is obsolete: true
Attachment #560227 - Flags: review?(dbaron)
Attachment #560231 - Attachment is obsolete: true
Attachment #560231 - Flags: review?(dbaron)
Blocks: 1064053
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: