update to match latest skia apis



git-svn-id: http://skia.googlecode.com/svn/trunk@566 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/svg/SkSVGParser.h b/include/svg/SkSVGParser.h
index 86ae4c2..83b120d 100644
--- a/include/svg/SkSVGParser.h
+++ b/include/svg/SkSVGParser.h
@@ -32,7 +32,7 @@
 
 class SkSVGParser : public SkXMLParser {
 public:
-    SkSVGParser();
+    SkSVGParser(SkXMLParserError* err = NULL);
     virtual ~SkSVGParser();
     void _addAttribute(const char* attrName, const char* attrValue) {
         fXMLWriter.addAttribute(attrName, attrValue); }
diff --git a/include/svg/SkSVGTypes.h b/include/svg/SkSVGTypes.h
index 38d63ce..99d8ca1 100644
--- a/include/svg/SkSVGTypes.h
+++ b/include/svg/SkSVGTypes.h
@@ -40,6 +40,7 @@
     SkSVGType_Symbol,
     SkSVGType_Text,
     SkSVGType_Tspan,
+	SkSVGType_Unknown,
     SkSVGType_Use
 };
 
diff --git a/src/svg/SkSVGParser.cpp b/src/svg/SkSVGParser.cpp
index b55c5ed..df86178 100644
--- a/src/svg/SkSVGParser.cpp
+++ b/src/svg/SkSVGParser.cpp
@@ -43,7 +43,9 @@
 
 static int gGeneratedMatrixID = 0;
 
-SkSVGParser::SkSVGParser() : fHead(&fEmptyPaint), fIDs(256),
+SkSVGParser::SkSVGParser(SkXMLParserError* errHandler) : 
+	SkXMLParser(errHandler),
+	fHead(&fEmptyPaint), fIDs(256),
         fXMLWriter(&fStream), fCurrElement(NULL), fInSVG(false), fSuppressPaint(false) {
     fLastTransform.reset();
     fEmptyPaint.f_fill.set("black");
@@ -157,7 +159,7 @@
     if (fCurrElement == NULL)    // this signals we should ignore attributes for this element
         return true;
     if (fCurrElement->fIsDef == false && fCurrElement->fIsNotDef == false)
-        return true; // also an ignored element
+        return false; // also an ignored element
     size_t nameLen = strlen(name);
     int attrIndex = findAttribute(fCurrElement, name, nameLen, false);
     if (attrIndex == -1) {
@@ -201,9 +203,11 @@
     if (nextColon && nextColon - name < len)
         return false;
     SkSVGTypes type = GetType(name, len);
-    SkASSERT(type >= 0);
-    if (type < 0)
-        return true;
+//    SkASSERT(type >= 0);
+    if (type < 0) {
+		type = SkSVGType_G;
+//        return true;
+	}
     SkSVGElement* parent = fParents.count() > 0 ? fParents.top() : NULL;
     SkSVGElement* element = CreateElement(type, parent);
     bool result = false;
diff --git a/src/svg/SkSVGRect.cpp b/src/svg/SkSVGRect.cpp
index 03fdfdc..8765d1d 100644
--- a/src/svg/SkSVGRect.cpp
+++ b/src/svg/SkSVGRect.cpp
@@ -33,7 +33,7 @@
 }
 
 void SkSVGRect::translate(SkSVGParser& parser, bool defState) {
-    parser._startElement("rectangle");
+    parser._startElement("rect");
     INHERITED::translate(parser, defState);
     SVG_ADD_ATTRIBUTE_ALIAS(left, x);
     SVG_ADD_ATTRIBUTE_ALIAS(top, y);
diff --git a/src/svg/SkSVGSVG.cpp b/src/svg/SkSVGSVG.cpp
index 1678fc1..9423c3a 100644
--- a/src/svg/SkSVGSVG.cpp
+++ b/src/svg/SkSVGSVG.cpp
@@ -27,9 +27,11 @@
     SVG_ATTRIBUTE(width),
     SVG_ATTRIBUTE(version),
     SVG_ATTRIBUTE(viewBox),
+    SVG_ATTRIBUTE(x),
     SVG_LITERAL_ATTRIBUTE(xml:space, f_xml_space),
     SVG_ATTRIBUTE(xmlns),
-    SVG_LITERAL_ATTRIBUTE(xmlns:xlink, f_xml_xlink)
+    SVG_LITERAL_ATTRIBUTE(xmlns:xlink, f_xml_xlink),
+    SVG_ATTRIBUTE(y),
 };
 
 DEFINE_SVG_INFO(SVG)
diff --git a/src/svg/SkSVGSVG.h b/src/svg/SkSVGSVG.h
index f331ccd..257c136 100644
--- a/src/svg/SkSVGSVG.h
+++ b/src/svg/SkSVGSVG.h
@@ -30,9 +30,12 @@
     SkString f_width;
     SkString f_version;
     SkString f_viewBox;
+	SkString f_x;
     SkString f_xml_space;
     SkString f_xmlns;
     SkString f_xml_xlink;
+	SkString f_y;
+
     typedef SkSVGElement INHERITED;
 };