Backed out changeset ba0e8ae48b47 (bug 1341137) for wpt bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 27 Feb 2017 16:44:30 +0100
changeset 378737 cbd562b2b0b34dcdad2da531645c345e87123b33
parent 378736 6a0ae8ac574d0b37066095efa2a075a1e5bab0cb
child 378738 20d59272b035c6b81568e95e0efbf4aa8fd01843
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1341137
milestone53.0a2
backs outba0e8ae48b470aa661a2f3ec769cd0b88f9a8139
Backed out changeset ba0e8ae48b47 (bug 1341137) for wpt bustage
layout/generic/nsSelection.cpp
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -4952,26 +4952,16 @@ Selection::AddRange(nsIDOMRange* aDOMRan
   ErrorResult result;
   AddRange(*range, result);
   return result.StealNSResult();
 }
 
 void
 Selection::AddRange(nsRange& aRange, ErrorResult& aRv)
 {
-  nsINode* rangeRoot = aRange.GetRoot();
-  nsIDocument* doc = GetParentObject();
-  if (doc != rangeRoot && (!rangeRoot ||
-                           doc != rangeRoot->GetComposedDoc())) {
-    // http://w3c.github.io/selection-api/#dom-selection-addrange
-    // "...  if the root of the range's boundary points are the document
-    // associated with context object. Otherwise, this method must do nothing."
-    return;
-  }
-
   // This inserts a table cell range in proper document order
   // and returns NS_OK if range doesn't contain just one table cell
   bool didAddRange;
   int32_t rangeIndex;
   nsresult result = addTableCellRange(&aRange, &didAddRange, &rangeIndex);
   if (NS_FAILED(result)) {
     aRv.Throw(result);
     return;