Bug 1499567 - Do not append an empty text node when creating options from HTMLOptionCollection::SetLength. r=bzbarsky
Only we do that. Align with other browsers instead. I removed the max-asserts as well because I cannot make my browser assert when running this test on a debug build. Differential Revision: https://phabricator.services.mozilla.com/D8929
This commit is contained in:
@@ -642,14 +642,6 @@ HTMLSelectElement::SetLength(uint32_t aLength, ErrorResult& aRv)
|
||||
getter_AddRefs(nodeInfo));
|
||||
|
||||
nsCOMPtr<nsINode> node = NS_NewHTMLOptionElement(nodeInfo.forget());
|
||||
|
||||
RefPtr<nsTextNode> text = new nsTextNode(mNodeInfo->NodeInfoManager());
|
||||
|
||||
aRv = node->AppendChildTo(text, false);
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint32_t i = curlen; i < aLength; i++) {
|
||||
nsINode::AppendChild(*node, aRv);
|
||||
if (aRv.Failed()) {
|
||||
|
||||
Reference in New Issue
Block a user