Revert "Make DOM selection-addRange spec compliant."

This reverts commit 475aff8d80.
This commit is contained in:
Pale Moon
2017-03-15 23:08:05 +01:00
parent b1f0d29f7b
commit cf17adabdf
-10
View File
@@ -4632,16 +4632,6 @@ Selection::AddRange(nsIDOMRange* aDOMRange)
void
Selection::AddRange(nsRange& aRange, ErrorResult& aRv)
{
auto rangeRoot = aRange.GetRoot();
auto 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;