mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 570624 - "ASSERTION: called nsGenericElement::SetText"; r=roc
--HG-- extra : rebase_source : 24d41a8eccef1c6d8b3adc6a04ca1a20912263ef
This commit is contained in:
parent
f1bf233213
commit
8c018044af
15
layout/forms/crashtests/570624-1.html
Normal file
15
layout/forms/crashtests/570624-1.html
Normal file
@ -0,0 +1,15 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
var xt = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", 'textbox');
|
||||
document.body.appendChild(xt);
|
||||
xt.setAttribute('disabled', "true");
|
||||
xt.setAttribute('value', "foo");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
</body>
|
||||
</html>
|
@ -38,4 +38,5 @@ load 455451-1.html
|
||||
load 457537-1.html
|
||||
load 457537-2.html
|
||||
load 478219-1.xhtml
|
||||
load 570624-1.html
|
||||
load 498698-1.html
|
||||
|
@ -822,9 +822,8 @@ nsTextControlFrame::GetRootNodeAndInitializeEditor(nsIDOMElement **aRootElement)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aRootElement);
|
||||
|
||||
nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(GetContent());
|
||||
NS_ASSERTION(txtCtrl, "Content not a text control element");
|
||||
nsIEditor* editor = txtCtrl->GetTextEditor();
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
GetEditor(getter_AddRefs(editor));
|
||||
if (!editor)
|
||||
return NS_OK;
|
||||
|
||||
@ -1216,9 +1215,9 @@ nsTextControlFrame::AttributeChanged(PRInt32 aNameSpaceID,
|
||||
const PRBool needEditor = nsGkAtoms::maxlength == aAttribute ||
|
||||
nsGkAtoms::readonly == aAttribute ||
|
||||
nsGkAtoms::disabled == aAttribute;
|
||||
nsIEditor *editor = nsnull;
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
if (needEditor) {
|
||||
editor = txtCtrl->GetTextEditor();
|
||||
GetEditor(getter_AddRefs(editor));
|
||||
}
|
||||
if ((needEditor && !editor) || !selCon)
|
||||
return nsBoxFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);;
|
||||
|
Loading…
Reference in New Issue
Block a user