mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1134545 - Insufficient null check; r=ehsan
This commit is contained in:
parent
c5b43471e3
commit
9870e20371
22
editor/libeditor/crashtests/1134545.html
Normal file
22
editor/libeditor/crashtests/1134545.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!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>
|
@ -59,3 +59,4 @@ load 772282.html
|
||||
load 776323.html
|
||||
needs-focus load 793866.html
|
||||
load 1057677.html
|
||||
load 1134545.html
|
||||
|
@ -1527,10 +1527,10 @@ nsHTMLEditor::RelativeFontChange( int32_t aSizeChange)
|
||||
int32_t offset;
|
||||
nsCOMPtr<nsINode> selectedNode;
|
||||
GetStartNodeAndOffset(selection, getter_AddRefs(selectedNode), &offset);
|
||||
NS_ENSURE_TRUE(selectedNode, NS_OK);
|
||||
if (IsTextNode(selectedNode)) {
|
||||
if (selectedNode && IsTextNode(selectedNode)) {
|
||||
selectedNode = selectedNode->GetParentNode();
|
||||
}
|
||||
NS_ENSURE_TRUE(selectedNode, NS_OK);
|
||||
if (!CanContainTag(*selectedNode, *atom)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user