Merge branch 'upstream' into desktop-hot-reload

This commit is contained in:
Evan Almloff committed 2023-01-13 17:34:22 -06:00
commit 33c1b4e98f
5 files changed
+113 -89

No files matched your search

+15 -4
View File
@@ -1,3 +1,5 @@
use std::ptr::NonNull;
use crate::{ use crate::{
nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, AttributeValue, DynamicNode, nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, AttributeValue, DynamicNode,
ScopeId, ScopeId,
@@ -17,7 +19,7 @@ pub(crate) struct ElementRef {
pub path: ElementPath, pub path: ElementPath,
// The actual template // The actual template
pub template: *const VNode<'static>, pub template: Option<NonNull<VNode<'static>>>,
} }
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
@@ -27,9 +29,9 @@ pub enum ElementPath {
} }
impl ElementRef { impl ElementRef {
pub(crate) fn null() -> Self { pub(crate) fn none() -> Self {
Self { Self {
template: std::ptr::null_mut(), template: None,
path: ElementPath::Root(0), path: ElementPath::Root(0),
} }
} }
@@ -44,12 +46,21 @@ impl VirtualDom {
self.next_reference(template, ElementPath::Root(path)) self.next_reference(template, ElementPath::Root(path))
} }
pub(crate) fn next_null(&mut self) -> ElementId {
let entry = self.elements.vacant_entry();
let id = entry.key();
entry.insert(ElementRef::none());
ElementId(id)
}
fn next_reference(&mut self, template: &VNode, path: ElementPath) -> ElementId { fn next_reference(&mut self, template: &VNode, path: ElementPath) -> ElementId {
let entry = self.elements.vacant_entry(); let entry = self.elements.vacant_entry();
let id = entry.key(); let id = entry.key();
entry.insert(ElementRef { entry.insert(ElementRef {
template: template as *const _ as *mut _, // We know this is non-null because it comes from a reference
template: Some(unsafe { NonNull::new_unchecked(template as *const _ as *mut _) }),
path, path,
}); });
ElementId(id) ElementId(id)
+22 -9
View File
@@ -42,7 +42,7 @@ impl<'b> VirtualDom {
// Just move over the placeholder // Just move over the placeholder
(Aborted(l), Aborted(r)) => r.id.set(l.id.get()), (Aborted(l), Aborted(r)) => r.id.set(l.id.get()),
// Becomes async, do nothing while we ait // Becomes async, do nothing while we wait
(Ready(_nodes), Pending(_fut)) => self.diff_ok_to_async(_nodes, scope), (Ready(_nodes), Pending(_fut)) => self.diff_ok_to_async(_nodes, scope),
// Placeholder becomes something // Placeholder becomes something
@@ -65,8 +65,26 @@ impl<'b> VirtualDom {
// //
} }
fn diff_ok_to_err(&mut self, _l: &'b VNode<'b>, _p: &'b VPlaceholder) { fn diff_ok_to_err(&mut self, l: &'b VNode<'b>, p: &'b VPlaceholder) {
todo!() let id = self.next_null();
p.id.set(Some(id));
self.mutations.push(Mutation::CreatePlaceholder { id });
let pre_edits = self.mutations.edits.len();
self.remove_node(l, true);
// We should always have a remove mutation
// Eventually we don't want to generate placeholders, so this might not be true. But it's true today
assert!(self.mutations.edits.len() > pre_edits);
// We want to optimize the replace case to use one less mutation if possible
// Since mutations are done in reverse, the last node removed will be the first in the stack
// Instead of *just* removing it, we can use the replace mutation
match self.mutations.edits.pop().unwrap() {
Mutation::Remove { id } => self.mutations.push(Mutation::ReplaceWith { id, m: 1 }),
_ => panic!("Expected remove mutation from remove_node"),
};
} }
fn diff_node(&mut self, left_template: &'b VNode<'b>, right_template: &'b VNode<'b>) { fn diff_node(&mut self, left_template: &'b VNode<'b>, right_template: &'b VNode<'b>) {
@@ -905,12 +923,7 @@ impl<'b> VirtualDom {
match unsafe { self.scopes[scope.0].root_node().extend_lifetime_ref() } { match unsafe { self.scopes[scope.0].root_node().extend_lifetime_ref() } {
RenderReturn::Ready(t) => self.remove_node(t, gen_muts), RenderReturn::Ready(t) => self.remove_node(t, gen_muts),
RenderReturn::Aborted(t) => { RenderReturn::Aborted(placeholder) => self.remove_placeholder(placeholder, gen_muts),
if let Some(id) = t.id.get() {
self.try_reclaim(id);
}
return;
}
_ => todo!(), _ => todo!(),
}; };
+2 -2
View File
@@ -282,7 +282,7 @@ impl VirtualDom {
root.provide_context(Rc::new(ErrorBoundary::new(ScopeId(0)))); root.provide_context(Rc::new(ErrorBoundary::new(ScopeId(0))));
// the root element is always given element ID 0 since it's the container for the entire tree // the root element is always given element ID 0 since it's the container for the entire tree
dom.elements.insert(ElementRef::null()); dom.elements.insert(ElementRef::none());
dom dom
} }
@@ -387,7 +387,7 @@ impl VirtualDom {
// Loop through each dynamic attribute in this template before moving up to the template's parent. // Loop through each dynamic attribute in this template before moving up to the template's parent.
while let Some(el_ref) = parent_path { while let Some(el_ref) = parent_path {
// safety: we maintain references of all vnodes in the element slab // safety: we maintain references of all vnodes in the element slab
let template = unsafe { &*el_ref.template }; let template = unsafe { el_ref.template.unwrap().as_ref() };
let node_template = template.template.get(); let node_template = template.template.get();
let target_path = el_ref.path; let target_path = el_ref.path;
+12 -12
View File
@@ -294,7 +294,7 @@ builder_constructors! {
rel: LinkType DEFAULT, rel: LinkType DEFAULT,
sizes: String DEFAULT, // FIXME sizes: String DEFAULT, // FIXME
title: String DEFAULT, // FIXME title: String DEFAULT, // FIXME
r#type: Mime DEFAULT, r#type: Mime "type",
integrity: String DEFAULT, integrity: String DEFAULT,
}; };
@@ -312,7 +312,7 @@ builder_constructors! {
/// [`<style>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style) /// [`<style>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style)
/// element. /// element.
style None { style None {
r#type: Mime DEFAULT, r#type: Mime "type",
media: String DEFAULT, // FIXME media query media: String DEFAULT, // FIXME media query
nonce: Nonce DEFAULT, nonce: Nonce DEFAULT,
title: String DEFAULT, // FIXME title: String DEFAULT, // FIXME
@@ -517,7 +517,7 @@ builder_constructors! {
ol None { ol None {
reversed: Bool DEFAULT, reversed: Bool DEFAULT,
start: isize DEFAULT, start: isize DEFAULT,
r#type: OrderedListType DEFAULT, r#type: OrderedListType "type",
}; };
/// Build a /// Build a
@@ -546,7 +546,7 @@ builder_constructors! {
href: Uri DEFAULT, href: Uri DEFAULT,
hreflang: LanguageTag DEFAULT, hreflang: LanguageTag DEFAULT,
target: Target DEFAULT, target: Target DEFAULT,
r#type: Mime DEFAULT, r#type: Mime "type",
// ping: SpacedList<Uri>, // ping: SpacedList<Uri>,
// rel: SpacedList<LinkType>, // rel: SpacedList<LinkType>,
ping: SpacedList DEFAULT, ping: SpacedList DEFAULT,
@@ -737,7 +737,7 @@ builder_constructors! {
muted: Bool DEFAULT, muted: Bool DEFAULT,
preload: Preload DEFAULT, preload: Preload DEFAULT,
src: Uri DEFAULT, src: Uri DEFAULT,
r#loop: Bool DEFAULT, r#loop: Bool "loop",
}; };
/// Build a /// Build a
@@ -783,7 +783,7 @@ builder_constructors! {
controls: Bool DEFAULT, controls: Bool DEFAULT,
crossorigin: CrossOrigin DEFAULT, crossorigin: CrossOrigin DEFAULT,
height: usize DEFAULT, height: usize DEFAULT,
r#loop: Bool DEFAULT, r#loop: Bool "loop",
muted: Bool DEFAULT, muted: Bool DEFAULT,
preload: Preload DEFAULT, preload: Preload DEFAULT,
playsinline: Bool DEFAULT, playsinline: Bool DEFAULT,
@@ -801,7 +801,7 @@ builder_constructors! {
embed None { embed None {
height: usize DEFAULT, height: usize DEFAULT,
src: Uri DEFAULT, src: Uri DEFAULT,
r#type: Mime DEFAULT, r#type: Mime "type",
width: usize DEFAULT, width: usize DEFAULT,
}; };
@@ -819,13 +819,13 @@ builder_constructors! {
srcdoc: Uri DEFAULT, srcdoc: Uri DEFAULT,
width: usize DEFAULT, width: usize DEFAULT,
marginWidth: String DEFAULT, margin_width: String "marginWidth",
align: String DEFAULT, align: String DEFAULT,
longdesc: String DEFAULT, longdesc: String DEFAULT,
scrolling: String DEFAULT, scrolling: String DEFAULT,
marginHeight: String DEFAULT, margin_height: String "marginHeight",
frameBorder: String DEFAULT, frame_border: String "frameBorder",
// sandbox: SpacedSet<Sandbox>, // sandbox: SpacedSet<Sandbox>,
}; };
@@ -837,7 +837,7 @@ builder_constructors! {
form: Id DEFAULT, form: Id DEFAULT,
height: usize DEFAULT, height: usize DEFAULT,
name: Id DEFAULT, name: Id DEFAULT,
r#type: Mime DEFAULT, r#type: Mime "type",
typemustmatch: Bool DEFAULT, typemustmatch: Bool DEFAULT,
usemap: String DEFAULT, // TODO should be a fragment starting with '#' usemap: String DEFAULT, // TODO should be a fragment starting with '#'
width: usize DEFAULT, width: usize DEFAULT,
@@ -861,7 +861,7 @@ builder_constructors! {
/// element. /// element.
source None { source None {
src: Uri DEFAULT, src: Uri DEFAULT,
r#type: Mime DEFAULT, r#type: Mime "type",
}; };
+62 -62
View File
@@ -1622,22 +1622,22 @@ trait_methods! {
ascent: "ascent"; ascent: "ascent";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/attributeName> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/attributeName>
attributeName: "attributeName"; attribute_name: "attributeName";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/attributeType> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/attributeType>
attributeType: "attributeType"; attribute_type: "attributeType";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/azimuth> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/azimuth>
azimuth: "azimuth"; azimuth: "azimuth";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseFrequency> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseFrequency>
baseFrequency: "baseFrequency"; base_frequency: "baseFrequency";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift>
baseline_shift: "baseline-shift"; baseline_shift: "baseline-shift";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseProfile> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseProfile>
baseProfile: "baseProfile"; base_profile: "baseProfile";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/bbox> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/bbox>
bbox: "bbox"; bbox: "bbox";
@@ -1652,7 +1652,7 @@ trait_methods! {
by: "by"; by: "by";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/calcMode> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/calcMode>
calcMode: "calcMode"; calc_mode: "calcMode";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/cap-height> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/cap-height>
cap_height: "cap-height"; cap_height: "cap-height";
@@ -1664,7 +1664,7 @@ trait_methods! {
clip: "clip"; clip: "clip";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clipPathUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clipPathUnits>
clipPathUnits: "clipPathUnits"; clip_path_units: "clipPathUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-path> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-path>
clip_path: "clip-path"; clip_path: "clip-path";
@@ -1688,10 +1688,10 @@ trait_methods! {
color_rendering: "color-rendering"; color_rendering: "color-rendering";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/contentScriptType> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/contentScriptType>
contentScriptType: "contentScriptType"; content_script_type: "contentScriptType";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/contentStyleType> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/contentStyleType>
contentStyleType: "contentStyleType"; content_style_type: "contentStyleType";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/crossorigin> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/crossorigin>
crossorigin: "crossorigin"; crossorigin: "crossorigin";
@@ -1715,7 +1715,7 @@ trait_methods! {
descent: "descent"; descent: "descent";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/diffuseConstant> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/diffuseConstant>
diffuseConstant: "diffuseConstant"; diffuse_constant: "diffuseConstant";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/direction> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/direction>
direction: "direction"; direction: "direction";
@@ -1739,7 +1739,7 @@ trait_methods! {
dy: "dy"; dy: "dy";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/edgeMode> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/edgeMode>
edgeMode: "edgeMode"; edge_mode: "edgeMode";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/elevation> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/elevation>
elevation: "elevation"; elevation: "elevation";
@@ -1829,13 +1829,13 @@ trait_methods! {
glyph_orientation_vertical: "glyph-orientation-vertical"; glyph_orientation_vertical: "glyph-orientation-vertical";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/glyphRef> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/glyphRef>
glyphRef: "glyphRef"; glyph_ref: "glyphRef";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/gradientTransform> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/gradientTransform>
gradientTransform: "gradientTransform"; gradient_transform: "gradientTransform";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/gradientUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/gradientUnits>
gradientUnits: "gradientUnits"; gradient_units: "gradientUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/hanging> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/hanging>
hanging: "hanging"; hanging: "hanging";
@@ -1889,28 +1889,28 @@ trait_methods! {
k4: "k4"; k4: "k4";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kernelMatrix> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kernelMatrix>
kernelMatrix: "kernelMatrix"; kernel_matrix: "kernelMatrix";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kernelUnitLength> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kernelUnitLength>
kernelUnitLength: "kernelUnitLength"; kernel_unit_length: "kernelUnitLength";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kerning> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kerning>
kerning: "kerning"; kerning: "kerning";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keyPoints> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keyPoints>
keyPoints: "keyPoints"; key_points: "keyPoints";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keySplines> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keySplines>
keySplines: "keySplines"; key_splines: "keySplines";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keyTimes> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keyTimes>
keyTimes: "keyTimes"; key_times: "keyTimes";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/lang> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/lang>
lang: "lang"; lang: "lang";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/lengthAdjust> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/lengthAdjust>
lengthAdjust: "lengthAdjust"; length_adjust: "lengthAdjust";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing>
letter_spacing: "letter-spacing"; letter_spacing: "letter-spacing";
@@ -1919,7 +1919,7 @@ trait_methods! {
lighting_color: "lighting-color"; lighting_color: "lighting-color";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/limitingConeAngle> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/limitingConeAngle>
limitingConeAngle: "limitingConeAngle"; limiting_cone_angle: "limitingConeAngle";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/local> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/local>
local: "local"; local: "local";
@@ -1930,26 +1930,26 @@ trait_methods! {
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-mid> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-mid>
marker_mid: "marker-mid"; marker_mid: "marker-mid";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker_start> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-start>
marker_start: "marker_start"; marker_start: "marker-start";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerHeight> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerHeight>
markerHeight: "markerHeight"; marker_height: "markerHeight";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerUnits>
markerUnits: "markerUnits"; marker_units: "markerUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerWidth> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerWidth>
markerWidth: "markerWidth"; marker_width: "markerWidth";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/mask> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/mask>
mask: "mask"; mask: "mask";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/maskContentUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/maskContentUnits>
maskContentUnits: "maskContentUnits"; mask_content_units: "maskContentUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/maskUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/maskUnits>
maskUnits: "maskUnits"; mask_units: "maskUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/mathematical> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/mathematical>
mathematical: "mathematical"; mathematical: "mathematical";
@@ -1973,7 +1973,7 @@ trait_methods! {
name: "name"; name: "name";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/numOctaves> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/numOctaves>
numOctaves: "numOctaves"; num_octaves: "numOctaves";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/offset> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/offset>
offset: "offset"; offset: "offset";
@@ -2015,16 +2015,16 @@ trait_methods! {
path: "path"; path: "path";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pathLength> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pathLength>
pathLength: "pathLength"; path_length: "pathLength";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/patternContentUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/patternContentUnits>
patternContentUnits: "patternContentUnits"; pattern_content_units: "patternContentUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/patternTransform> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/patternTransform>
patternTransform: "patternTransform"; pattern_transform: "patternTransform";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/patternUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/patternUnits>
patternUnits: "patternUnits"; pattern_units: "patternUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/ping> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/ping>
ping: "ping"; ping: "ping";
@@ -2036,22 +2036,22 @@ trait_methods! {
points: "points"; points: "points";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtX> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtX>
pointsAtX: "pointsAtX"; points_at_x: "pointsAtX";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtY> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtY>
pointsAtY: "pointsAtY"; points_at_y: "pointsAtY";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtZ> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtZ>
pointsAtZ: "pointsAtZ"; points_at_z: "pointsAtZ";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAlpha> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAlpha>
preserveAlpha: "preserveAlpha"; preserve_alpha: "preserveAlpha";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio>
preserveAspectRatio: "preserveAspectRatio"; preserve_aspect_ratio: "preserveAspectRatio";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/primitiveUnits> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/primitiveUnits>
primitiveUnits: "primitiveUnits"; primitive_units: "primitiveUnits";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/r> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/r>
r: "r"; r: "r";
@@ -2060,13 +2060,13 @@ trait_methods! {
radius: "radius"; radius: "radius";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/referrerPolicy> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/referrerPolicy>
referrerPolicy: "referrerPolicy"; referrer_policy: "referrerPolicy";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/refX> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/refX>
refX: "refX"; ref_x: "refX";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/refY> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/refY>
refY: "refY"; ref_y: "refY";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rel> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rel>
rel: "rel"; rel: "rel";
@@ -2075,16 +2075,16 @@ trait_methods! {
rendering_intent: "rendering-intent"; rendering_intent: "rendering-intent";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/repeatCount> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/repeatCount>
repeatCount: "repeatCount"; repeat_count: "repeatCount";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/repeatDur> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/repeatDur>
repeatDur: "repeatDur"; repeat_dur: "repeatDur";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/requiredExtensions> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/requiredExtensions>
requiredExtensions: "requiredExtensions"; required_extensions: "requiredExtensions";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/requiredFeatures> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/requiredFeatures>
requiredFeatures: "requiredFeatures"; required_features: "requiredFeatures";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/restart> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/restart>
restart: "restart"; restart: "restart";
@@ -2120,22 +2120,22 @@ trait_methods! {
spacing: "spacing"; spacing: "spacing";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/specularConstant> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/specularConstant>
specularConstant: "specularConstant"; specular_constant: "specularConstant";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/specularExponent> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/specularExponent>
specularExponent: "specularExponent"; specular_exponent: "specularExponent";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/speed> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/speed>
speed: "speed"; speed: "speed";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/spreadMethod> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/spreadMethod>
spreadMethod: "spreadMethod"; spread_method: "spreadMethod";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/startOffset> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/startOffset>
startOffset: "startOffset"; start_offset: "startOffset";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stdDeviation> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stdDeviation>
stdDeviation: "stdDeviation"; std_deviation: "stdDeviation";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stemh> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stemh>
stemh: "stemh"; stemh: "stemh";
@@ -2144,13 +2144,13 @@ trait_methods! {
stemv: "stemv"; stemv: "stemv";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stitchTiles> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stitchTiles>
stitchTiles: "stitchTiles"; stitch_tiles: "stitchTiles";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stop_color> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stop-color>
stop_color: "stop_color"; stop_color: "stop-color";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stop_opacity> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stop-opacity>
stop_opacity: "stop_opacity"; stop_opacity: "stop-opacity";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/strikethrough-position> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/strikethrough-position>
strikethrough_position: "strikethrough-position"; strikethrough_position: "strikethrough-position";
@@ -2189,25 +2189,25 @@ trait_methods! {
style: "style"; style: "style";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/surfaceScale> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/surfaceScale>
surfaceScale: "surfaceScale"; surface_scale: "surfaceScale";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/systemLanguage> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/systemLanguage>
systemLanguage: "systemLanguage"; system_language: "systemLanguage";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/tabindex> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/tabindex>
tabindex: "tabindex"; tabindex: "tabindex";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/tableValues> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/tableValues>
tableValues: "tableValues"; table_values: "tableValues";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/target> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/target>
target: "target"; target: "target";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/targetX> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/targetX>
targetX: "targetX"; target_x: "targetX";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/targetY> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/targetY>
targetY: "targetY"; target_y: "targetY";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor>
text_anchor: "text-anchor"; text_anchor: "text-anchor";
@@ -2219,7 +2219,7 @@ trait_methods! {
text_rendering: "text-rendering"; text_rendering: "text-rendering";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/textLength> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/textLength>
textLength: "textLength"; text_length: "textLength";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/to> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/to>
to: "to"; to: "to";
@@ -2342,6 +2342,6 @@ trait_methods! {
z: "z"; z: "z";
/// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/zoomAndPan> /// <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/zoomAndPan>
zoomAndPan: "zoomAndPan"; zoom_and_pan: "zoomAndPan";
} }