Backed out changeset e7688fa5ba48 (bug 1134545) for browser_vimemacs.js crashes.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2015-03-25 13:19:29 -04:00
parent b7f540fb31
commit e88da8056c
3 changed files with 2 additions and 25 deletions

View File

@ -1,22 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0065)https://bug1134545.bugzilla.mozilla.org/attachment.cgi?id=8566418 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script>
function boom()
{
textNode = document.createTextNode(" ");
x.appendChild(textNode);
x.setAttribute('contenteditable', "true");
textNode.remove();
window.getSelection().selectAllChildren(textNode);
document.execCommand("increasefontsize", false, null);
}
</script>
</head>
<body onload="boom();">
<div id="x" contenteditable="true"></div>
</body></html>

View File

@ -59,4 +59,3 @@ load 772282.html
load 776323.html
needs-focus load 793866.html
load 1057677.html
load 1134545.html

View File

@ -1527,10 +1527,10 @@ nsHTMLEditor::RelativeFontChange( int32_t aSizeChange)
int32_t offset;
nsCOMPtr<nsINode> selectedNode;
GetStartNodeAndOffset(selection, getter_AddRefs(selectedNode), &offset);
if (selectedNode && IsTextNode(selectedNode)) {
NS_ENSURE_TRUE(selectedNode, NS_OK);
if (IsTextNode(selectedNode)) {
selectedNode = selectedNode->GetParentNode();
}
NS_ENSURE_TRUE(selectedNode, NS_OK);
if (!CanContainTag(*selectedNode, *atom)) {
return NS_OK;
}