[svg] xml:space support

Add xml:space attribute and implement related white space filters.

(https://www.w3.org/TR/SVG11/text.html#WhiteSpace)

Bug: skia:10840
Change-Id: I52fda50fae1cd7cf8b0dd7c1a2ee2e667ffa947b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342299
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
diff --git a/modules/svg/include/SkSVGText.h b/modules/svg/include/SkSVGText.h
index ae284f6..037444d 100644
--- a/modules/svg/include/SkSVGText.h
+++ b/modules/svg/include/SkSVGText.h
@@ -18,11 +18,14 @@
     SVG_ATTR(X, SkSVGLength, SkSVGLength(0))
     SVG_ATTR(Y, SkSVGLength, SkSVGLength(0))
 
+    SVG_ATTR(XmlSpace, SkSVGXmlSpace, SkSVGXmlSpace::kDefault)
+
 protected:
     explicit SkSVGTextContainer(SkSVGTag t) : INHERITED(t) {}
 
 private:
     void appendChild(sk_sp<SkSVGNode>) final;
+    bool onPrepareToRender(SkSVGRenderContext*) const final;
 
     bool parseAndSetAttribute(const char*, const char*) override;