Central mutation service for SVG DOM tree edits.
More...
#include "donner/svg/components/TreeMutation.h"
Central mutation service for SVG DOM tree edits.
TreeMutation is the public SVG layer's single path for inserting, replacing, and detaching SVG element entities. It wraps the low-level donner::components::TreeComponent link operations with SVG-specific validation, dirty-flag propagation, render-tree invalidation, and node-lifetime state updates.
◆ AppendChild()
Append child as the last child of parent.
- Parameters
-
| parent | Parent entity to receive the child. |
| child | Entity to append. |
◆ InsertBefore()
Insert newNode as a child of parent before referenceNode.
If referenceNode is invalid, newNode is appended.
- Parameters
-
| parent | Parent entity to receive the child. |
| newNode | Entity to insert. |
| referenceNode | Existing child to insert before, or an invalid handle to append. |
◆ InvalidateTextContentStyles()
| void donner::svg::components::TreeMutation::InvalidateTextContentStyles |
( |
EntityHandle | element | ) |
|
|
static |
Invalidate nonlocal selector results after an element's emptiness changes.
Does nothing when no stylesheet has a selector that depends on text content.
- Parameters
-
| element | Modified element; the caller holds document write access. |
◆ Remove()
| void donner::svg::components::TreeMutation::Remove |
( |
EntityHandle | entity | ) |
|
|
static |
Remove entity from its parent, if it has one.
- Parameters
-
| entity | Entity to detach from its parent. |
◆ RemoveChild()
Remove child from parent.
The child entity and its descendants remain alive as a detached subtree.
- Parameters
-
| parent | Parent entity whose child is removed. |
| child | Existing child to detach. |
◆ ReplaceChild()
Replace oldChild with newChild under parent.
- Parameters
-
| parent | Parent entity whose child is replaced. |
| newChild | Replacement entity. |
| oldChild | Existing child to detach. |
◆ SetValue()
Set an XML node value under document write access and refresh affected selector caches.
- Parameters
-
| node | XML node to modify. |
| value | New node value. |
The documentation for this class was generated from the following file: