From 5f7f5fb74ef922476bb5b74bb3e81b303b75355b Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Sun, 25 Aug 2024 19:29:55 +0200 Subject: [PATCH] Upgrade to SVGOM 1.1.1 --- .../extension/StylableExtensionElement.java | 15 ++++++--------- gradle.properties | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/echosvg-extension/src/main/java/io/sf/carte/echosvg/extension/StylableExtensionElement.java b/echosvg-extension/src/main/java/io/sf/carte/echosvg/extension/StylableExtensionElement.java index 1f8fc3cb6..f6ef907db 100644 --- a/echosvg-extension/src/main/java/io/sf/carte/echosvg/extension/StylableExtensionElement.java +++ b/echosvg-extension/src/main/java/io/sf/carte/echosvg/extension/StylableExtensionElement.java @@ -22,13 +22,13 @@ import org.w3c.css.om.typed.CSSStyleValue; import org.w3c.dom.Node; import org.w3c.dom.svg.SVGAnimatedString; -import org.w3c.dom.svg.SVGStylableP; +import org.w3c.dom.svg.SVGStylable; -import io.sf.carte.echosvg.css.dom.CSSValue; import io.sf.carte.echosvg.css.engine.CSSStylableElement; import io.sf.carte.echosvg.css.engine.StyleDeclarationProvider; import io.sf.carte.echosvg.css.engine.StyleMap; import io.sf.carte.echosvg.dom.AbstractDocument; +import io.sf.carte.echosvg.dom.AbstractStylableDocument; import io.sf.carte.echosvg.util.ParsedURL; /** @@ -43,7 +43,7 @@ * @version $Id$ */ public abstract class StylableExtensionElement extends ExtensionElement implements CSSStylableElement, - SVGStylableP { + SVGStylable { private static final long serialVersionUID = 1L; @@ -157,13 +157,10 @@ public CSSStyleDeclaration getStyle() { throw new UnsupportedOperationException("Not implemented"); } - /** - * DOM: Implements - * {@link org.w3c.dom.svg.SVGStylable#getPresentationAttribute(String)}. - */ @Override - public CSSValue getPresentationAttribute(String name) { - throw new UnsupportedOperationException("Not implemented"); + public CSSStyleValue getPresentationAttributeValue(String name) { + AbstractStylableDocument doc = (AbstractStylableDocument) getCurrentDocument(); + return computedStyleMap.getValue(doc.getCSSEngine().getPropertyIndex(name)); } /** diff --git a/gradle.properties b/gradle.properties index 910604e6a..08d29bdc0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ xmlDtdVersion=4.3 rhinoVersion=1.7.15 legacyColorsVersion=1.0 domViewVersion=1.0 -svgomVersion=1.1 +svgomVersion=1.1.1 xmlApisVersion=1.4.01 commonsIOVersion=2.16.1 htmlParserVersion=1.4.16