SVG:Use: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
## same document undisplayed content
## same document undisplayed content
## other document
## other document
## foreignObject containing HTML form elements (textbox)
# dynamic changes
# dynamic changes
## attribute change within used content
## attribute change within used content
Line 10: Line 11:
## tree structure changes within use
## tree structure changes within use
## addition/removal of use itself
## addition/removal of use itself
## non-DOM content changes (e.g. form contents)
# event delivery to shadow instance tree
# event delivery to shadow instance tree


Line 21: Line 23:
# Clone content for svg:use
# Clone content for svg:use
# Let style contexts know they're held by content (bit)
# Let style contexts know they're held by content (bit)
== Single Content Tree, Multiple Frame Trees ==
# leverage multiple presentations
# use existing content-style-frame setup
# SVG elements whose style we need (e.g. gradients) continue to need frames
# hack style system to get inheritance-across-use to work (how?)

Revision as of 17:14, 8 December 2005

Mental Testcases

  1. svg:use to
    1. same document displayed content
    2. same document undisplayed content
    3. other document
    4. foreignObject containing HTML form elements (textbox)
  2. dynamic changes
    1. attribute change within used content
    2. style change inherited from ancestor of use
    3. tree structure changes within use
    4. addition/removal of use itself
    5. non-DOM content changes (e.g. form contents)
  3. event delivery to shadow instance tree

Implementation Strategies

No Frame Tree

  1. remove multiple presentations
  2. Move SVG painting and event handling to content
    • ownership of style context also therefore goes to content
  3. Clone content for svg:use
  4. Let style contexts know they're held by content (bit)

Single Content Tree, Multiple Frame Trees

  1. leverage multiple presentations
  2. use existing content-style-frame setup
  3. SVG elements whose style we need (e.g. gradients) continue to need frames
  4. hack style system to get inheritance-across-use to work (how?)