Confirmed users
490
edits
| Line 5: | Line 5: | ||
* can only currently interpolate between fixed-length units. (inch, mm, pt, etc). (Need to tie in with PresContext / font-metrics to interpolate/interconvert between display-pixels / em-units / ex-units.) | * can only currently interpolate between fixed-length units. (inch, mm, pt, etc). (Need to tie in with PresContext / font-metrics to interpolate/interconvert between display-pixels / em-units / ex-units.) | ||
= Overview of Strategy = | = Overview of Proposed Strategy = | ||
( | * Per the [http://www.w3.org/TR/smil-animation/#AnimationSandwichModel documentation on the "SMIL Sandwich Model"], I'm proposing to use an implementation backed by getOverrideStyle() | ||
* Basic outline of how to animate CSS properties: | |||
*# Clear the contents of getOverrideStyle() on each element, for each animated CSS property | |||
*# Perform SMIL interpolation / compositing for each animated CSS property, using getComputedStyle() as the base value. | |||
*# Store this property in the getOverrideStyle() stylesheet. | |||
* Note that we don't yet implement getOverrideStyle(). Here's a basic outline of how we'd implement getOverrideStyle(): | |||
*# Add a new nsICSSStyleRule member variable on each nsStyledElement, which is used as a backing store for the override style. | |||
*# Internally, this should mostly behave like SVG's content style rule. (See mContentStyleRule in [http://mxr.mozilla.org/seamonkey/source/content/svg/content/src/nsSVGElement.h nsSVGElement.h] and [http://mxr.mozilla.org/seamonkey/source/content/svg/content/src/nsSVGElement.cpp nsSVGElement.cpp] ) | |||