backout 3335984ce688 (bug 709083) for Android orangeness
authorJonathan Kew <jfkthame@gmail.com>
Fri, 03 Feb 2012 15:09:20 +0000
changeset 109288 3ff48acf238ff1ed77ef3fa6f2f74d8fabda9dd8
parent 109287 47e1f3fc9cb03088f663cf8b29c978e968fe5f98
child 109289 a7abd9f90fef3ac01ae19e4e1f01b6ecbf52171e
push id2248
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 19:23:44 +0000
treeherdermozilla-aurora@118a3b748323 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs709083
milestone13.0a1
backs out3335984ce688f446f3752469107d043b7494083a
backout 3335984ce688 (bug 709083) for Android orangeness
accessible/tests/mochitest/name/test_browserui.xul
parser/html/nsHtml5TreeBuilderCppSupplement.h
parser/htmlparser/tests/mochitest/Makefile.in
parser/htmlparser/tests/mochitest/test_bug709083.html
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h
@@ -462,33 +462,16 @@ nsHtml5TreeBuilder::elementPushed(PRInt3
     return;
   }
   if (aName == nsHtml5Atoms::body || aName == nsHtml5Atoms::frameset) {
     nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
     NS_ASSERTION(treeOp, "Tree op allocation failed.");
     treeOp->Init(eTreeOpStartLayout);
     return;
   }
-  if (aName == nsHtml5Atoms::input ||
-      aName == nsHtml5Atoms::button) {
-    if (!formPointer) {
-      // If form inputs don't belong to a form, their state preservation
-      // won't work right without an append notification flush at this
-      // point. See bug 497861.
-      mOpQueue.AppendElement()->Init(eTreeOpFlushPendingAppendNotifications);
-    }
-    mOpQueue.AppendElement()->Init(eTreeOpDoneCreatingElement, aElement);
-    return;
-  }
-  if (aName == nsHtml5Atoms::audio ||
-      aName == nsHtml5Atoms::video ||
-      aName == nsHtml5Atoms::menuitem) {
-    mOpQueue.AppendElement()->Init(eTreeOpDoneCreatingElement, aElement);
-    return;
-  }
 }
 
 void
 nsHtml5TreeBuilder::elementPopped(PRInt32 aNamespace, nsIAtom* aName, nsIContent** aElement)
 {
   NS_ASSERTION(aNamespace == kNameSpaceID_XHTML || aNamespace == kNameSpaceID_SVG || aNamespace == kNameSpaceID_MathML, "Element isn't HTML, SVG or MathML!");
   NS_ASSERTION(aName, "Element doesn't have local name!");
   NS_ASSERTION(aElement, "No element!");
@@ -556,22 +539,45 @@ nsHtml5TreeBuilder::elementPopped(PRInt3
       NS_ASSERTION(treeOp, "Tree op allocation failed.");
       treeOp->Init(eTreeOpFlushPendingAppendNotifications);
     }
     nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
     NS_ASSERTION(treeOp, "Tree op allocation failed.");
     treeOp->Init(eTreeOpDoneAddingChildren, aElement);
     return;
   }
+  if (aName == nsHtml5Atoms::input ||
+      aName == nsHtml5Atoms::button ||
+      aName == nsHtml5Atoms::menuitem) {
+    if (!formPointer) {
+      // If form inputs don't belong to a form, their state preservation
+      // won't work right without an append notification flush at this 
+      // point. See bug 497861.
+      nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
+      NS_ASSERTION(treeOp, "Tree op allocation failed.");
+      treeOp->Init(eTreeOpFlushPendingAppendNotifications);
+    }
+    nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
+    NS_ASSERTION(treeOp, "Tree op allocation failed.");
+    treeOp->Init(eTreeOpDoneCreatingElement, aElement);
+    return;
+  }
   if (aName == nsHtml5Atoms::meta && !fragment) {
     nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
     NS_ASSERTION(treeOp, "Tree op allocation failed.");
     treeOp->Init(eTreeOpProcessMeta, aElement);
     return;
   }
+  if (aName == nsHtml5Atoms::audio || aName == nsHtml5Atoms::video) {
+    nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
+    NS_ASSERTION(treeOp, "Tree op allocation failed.");
+    treeOp->Init(eTreeOpDoneCreatingElement, aElement);
+    return;
+  }   
+
   return;
 }
 
 void
 nsHtml5TreeBuilder::accumulateCharacters(const PRUnichar* aBuf, PRInt32 aStart, PRInt32 aLength)
 {
   PRInt32 newFillLen = charBufferLen + aLength;
   if (newFillLen > charBuffer.length) {
--- a/parser/htmlparser/tests/mochitest/Makefile.in
+++ b/parser/htmlparser/tests/mochitest/Makefile.in
@@ -90,17 +90,16 @@ include $(topsrcdir)/config/rules.mk
 		test_bug613662.html \
 		test_bug613662.xhtml \
 		test_bug642908.html \
 		file_bug642908.sjs \
 		test_bug645115.html \
 		test_bug655682.html \
 		file_bug655682.sjs \
 		test_viewsource.html \
-		test_bug709083.html \
 		test_bug715112.html \
 		test_bug715739.html \
 		$(NULL)
 
 # Disabled test due to orange on Linux
 #		test_bug568470.html \
 #		file_bug568470.sjs \
 #		file_bug568470-script.sjs \
deleted file mode 100644
--- a/parser/htmlparser/tests/mochitest/test_bug709083.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=709083
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 709083</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=709083">Mozilla Bug 709083</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<video muted>
-<script type="application/javascript">
-
-/** Test for Bug 709083 **/
-
-ok(document.getElementsByTagName("video")[0].muted, "Should be muted already.");
-
-</script>
-</video>
-</pre>
-</body>
-</html>