Merge mozilla-central into mozilla-inbound
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 23 Nov 2012 15:03:21 -0500
changeset 114083 0d373cf880fde56ed9c61a5422b13a09462344df
parent 114082 fcaecad202eb9ccae99cb9185bcf29c8db91d771 (current diff)
parent 114070 4d832dcd0be9c65073b6789705420f1fffc552a4 (diff)
child 114084 db5efb6ea4487b1afabf11611624face8b8056c8
child 114198 c55dfc5147c2fa244f61ca04de8a1dc498983fea
child 117348 f352f0484a2fb0364f522664ba7a1cc5598798d4
push id23901
push userryanvm@gmail.com
push dateFri, 23 Nov 2012 21:11:03 +0000
treeherdermozilla-central@0d373cf880fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone20.0a1
first release with
nightly linux32
0d373cf880fd / 20.0a1 / 20121124030824 / files
nightly linux64
0d373cf880fd / 20.0a1 / 20121124030824 / files
nightly mac
0d373cf880fd / 20.0a1 / 20121124030824 / files
nightly win32
0d373cf880fd / 20.0a1 / 20121124030824 / files
nightly win64
0d373cf880fd / 20.0a1 / 20121124030824 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central into mozilla-inbound
--- a/b2g/config/unagi/config.json
+++ b/b2g/config/unagi/config.json
@@ -11,10 +11,17 @@
         "{objdir}/dist/b2g-*.tar.gz",
         "{objdir}/dist/b2g-*.crashreporter-symbols.zip",
         "{workdir}/sources.xml"
     ],
     "env": {
         "VARIANT": "user",
         "B2GUPDATER": "1"
     },
-    "gaia": {"vcs": "hgtool", "repo": "http://hg.mozilla.org/projects/gaia"}
+    "gaia": {
+        "vcs": "hgtool",
+        "repo": "http://hg.mozilla.org/projects/gaia",
+        "l10n": {
+            "vcs": "hgtool",
+            "root": "http://hg.mozilla.org/gaia-l10n"
+        }
+    }
 }
--- a/content/base/src/nsRange.cpp
+++ b/content/base/src/nsRange.cpp
@@ -554,17 +554,17 @@ nsRange::ContentAppended(nsIDocument* aD
       }
       child = child->GetNextSibling();
     }
   }
 
   if (mStartOffsetWasIncremented || mEndOffsetWasIncremented) {
     MOZ_ASSERT(mAssertNextInsertOrAppendIndex == aNewIndexInContainer);
     MOZ_ASSERT(mAssertNextInsertOrAppendNode == aFirstNewContent);
-    MOZ_ASSERT(aFirstNewContent->IsNodeOfType(nsINode::eTEXT));
+    MOZ_ASSERT(aFirstNewContent->IsNodeOfType(nsINode::eDATA_NODE));
     mStartOffsetWasIncremented = mEndOffsetWasIncremented = false;
 #ifdef DEBUG
     mAssertNextInsertOrAppendIndex = -1;
     mAssertNextInsertOrAppendNode = nullptr;
 #endif
   }
 }
 
@@ -591,17 +591,17 @@ nsRange::ContentInserted(nsIDocument* aD
       !aChild->IsDescendantOfCommonAncestorForRangeInSelection()) {
     MarkDescendants(aChild);
     aChild->SetDescendantOfCommonAncestorForRangeInSelection();
   }
 
   if (mStartOffsetWasIncremented || mEndOffsetWasIncremented) {
     MOZ_ASSERT(mAssertNextInsertOrAppendIndex == aIndexInContainer);
     MOZ_ASSERT(mAssertNextInsertOrAppendNode == aChild);
-    MOZ_ASSERT(aChild->IsNodeOfType(nsINode::eTEXT));
+    MOZ_ASSERT(aChild->IsNodeOfType(nsINode::eDATA_NODE));
     mStartOffsetWasIncremented = mEndOffsetWasIncremented = false;
 #ifdef DEBUG
     mAssertNextInsertOrAppendIndex = -1;
     mAssertNextInsertOrAppendNode = nullptr;
 #endif
   }
 }
 
--- a/content/base/test/Makefile.in
+++ b/content/base/test/Makefile.in
@@ -591,16 +591,17 @@ MOCHITEST_FILES_B = \
     bug803225_test_mailto.html \
 		test_bug789856.html \
 		file_bug804395.jar \
 		test_bug804395.html \
 		test_bug809003.html \
 		test_textnode_split_in_selection.html \
 		test_textnode_normalize_in_selection.html \
 		test_xhr_send_readystate.html \
+		test_bug813919.html \
 		$(NULL)
 
 # OOP tests don't work on Windows (bug 763081) or native-fennec
 # (see Bug 774939)
 ifneq ($(OS_ARCH),WINNT)
 ifndef MOZ_ANDROID_OMTC
 MOCHITEST_FILES_B += \
 		test_messagemanager_assertpermission.html \
new file mode 100644
--- /dev/null
+++ b/content/base/test/test_bug813919.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=813919
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 813919</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=813919">Mozilla Bug 813919</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 813919 **/
+
+  function testDataNode(dataNode) {
+    var div = document.createElement("div");
+    div.appendChild(dataNode);
+    var span = document.createElement("span");
+    div.appendChild(span);
+    var r = document.createRange();
+    r.setStart(dataNode, 0);
+    r.setEnd(div, div.childNodes.length);
+    r.deleteContents();
+    ok(r.collapsed, "Range should be collapsed!");
+    is(r.startContainer, div, "startContainer should be div.");
+    is(r.startOffset, div.childNodes.length,
+       "Range should be collaped to the end of the div element.");
+  }
+
+  testDataNode(document.createProcessingInstruction("x", "x"));
+  testDataNode(document.createComment("x"));
+  testDataNode(document.createTextNode("x"));
+
+
+</script>
+</pre>
+</body>
+</html>