Minor changes
authorPhilippe Le Hégaret <plh@w3.org>
Thu, 29 Oct 2009 14:01:11 +0000
changeset 181 deef819ecea4
parent 180 77c8dfa1da36
child 182 9cdcafb85ff1
Minor changes
testsuite/web-framework/HTML5_player.js
--- a/testsuite/web-framework/HTML5_player.js	Thu Oct 29 13:35:53 2009 +0000
+++ b/testsuite/web-framework/HTML5_player.js	Thu Oct 29 14:01:11 2009 +0000
@@ -389,13 +389,15 @@
 	    || dfxpNode.namespaceURI == DFXP_NS_Metadata) {
 	    // ignore metadata stuff
 	    return null;
-	} else {		
-	    if (dfxpNode.namespaceURI == DFXP_NS) {
-		if (dfxpNode.aDur <= 0) {
+	} else if (dfxpNode.namespaceURI == DFXP_NS) {
+
+		if (dfxpNode.localName == "head") {
+		    // nothing for the moment
+		    return null;
+		} else if (dfxpNode.aDur <= 0) {
 		    // eliminates non-active elements
 		    return null;
-		}
-		if (dfxpNode.localName == "span") {
+		} else if (dfxpNode.localName == "span") {
 		    htmlNode = document.createElementNS(XHTML_NS, "span");
 		} else if (dfxpNode.localName == "p") {
 		    htmlNode = document.createElementNS(XHTML_NS, "p");
@@ -411,14 +413,13 @@
 		    return null;
 		}
 		
-	    } else {
-		// there is something here, but it's not dfxp, let's copy it as-is if XHTML
-		if (dfxpNode.namespaceURI == XHTML_NS) {
-		    try {
-			htmlNode = document.importNode(dfxpNode, true);
-		    } catch (e) {
-			return null;
-		    }
+	} else {
+	    // there is something here, but it's not dfxp, let's copy it as-is if XHTML
+	    if (dfxpNode.namespaceURI == XHTML_NS) {
+		try {
+		    htmlNode = document.importNode(dfxpNode, true);
+		} catch (e) {
+		    return null;
 		}
 	    }
 	}