[librsvg: 1/8] Make a list of attributes that need to be turned into properties




commit 631db05d404173400d49be2f22dc024aa7b4d9e3
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Sep 17 14:47:14 2021 -0500

    Make a list of attributes that need to be turned into properties
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/591>

 src/properties.rs | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/src/properties.rs b/src/properties.rs
index 47c11b7c..77ee7c58 100644
--- a/src/properties.rs
+++ b/src/properties.rs
@@ -378,6 +378,18 @@ make_properties! {
         "marker"                      => marker                      : Marker,
     }
 
+    // longhands that are presentation attributes right now, but need to be turned into properties:
+    // "cx" - applies only to circle, ellipse
+    // "cy" - applies only to circle, ellipse
+    // "height" - applies only to foreignObject, image, rect, svg, symbol, use
+    // "width"  - applies only to foreignObject, image, rect, svg, symbol, use
+    // "x"      - applies only to foreignObject, image, rect, svg, symbol, use
+    // "y"      - applies only to foreignObject, image, rect, svg, symbol, use
+    // "r"      - applies only to circle
+    // "rx"     - applies only to ellipse, rect
+    // "ry"     - applies only to ellipse, rect
+    // "d"      - applies only to path
+
     longhands: {
         "baseline-shift"              => baseline_shift              : BaselineShift,
         "clip-path"                   => clip_path                   : ClipPath,
@@ -387,7 +399,11 @@ make_properties! {
         "direction"                   => direction                   : Direction,
         "display"                     => display                     : Display,
         "enable-background"           => enable_background           : EnableBackground,
+
+        // "applies to any element except animation elements"
+        // https://www.w3.org/TR/SVG2/styling.html#PresentationAttributes
         "fill"                        => fill                        : Fill,
+
         "fill-opacity"                => fill_opacity                : FillOpacity,
         "fill-rule"                   => fill_rule                   : FillRule,
         "filter"                      => filter                      : Filter,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]