mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 455451. Don't notify from inside frame construction. r+sr=jst
This commit is contained in:
parent
33105ca61f
commit
c1fe6ebd6e
17
layout/forms/crashtests/455451-1.html
Normal file
17
layout/forms/crashtests/455451-1.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
|
||||
function boom()
|
||||
{
|
||||
window.addEventListener("DOMCharacterDataModified", function(){}, false);
|
||||
document.body.appendChild(document.createElement("isindex"));
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"></body>
|
||||
|
||||
</html>
|
@ -22,3 +22,4 @@ load 393656-1.xhtml
|
||||
load 393656-2.xhtml
|
||||
load 404118-1.html
|
||||
load 404123-1.html
|
||||
load 455451-1.html
|
||||
|
@ -110,8 +110,8 @@ nsIsIndexFrame::Destroy()
|
||||
// REVIEW: We don't need to override BuildDisplayList, nsAreaFrame will honour
|
||||
// our visibility setting
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIsIndexFrame::UpdatePromptLabel()
|
||||
nsresult
|
||||
nsIsIndexFrame::UpdatePromptLabel(PRBool aNotify)
|
||||
{
|
||||
if (!mTextContent) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
@ -133,7 +133,7 @@ nsIsIndexFrame::UpdatePromptLabel()
|
||||
"IsIndexPrompt", prompt);
|
||||
}
|
||||
|
||||
mTextContent->SetText(prompt, PR_TRUE);
|
||||
mTextContent->SetText(prompt, aNotify);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -203,7 +203,7 @@ nsIsIndexFrame::CreateAnonymousContent(nsTArray<nsIContent*>& aElements)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
// set the value of the text node and add it to the child list
|
||||
UpdatePromptLabel();
|
||||
UpdatePromptLabel(PR_FALSE);
|
||||
if (!aElements.AppendElement(mTextContent))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
@ -283,7 +283,7 @@ nsIsIndexFrame::AttributeChanged(PRInt32 aNameSpaceID,
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
if (nsGkAtoms::prompt == aAttribute) {
|
||||
rv = UpdatePromptLabel();
|
||||
rv = UpdatePromptLabel(PR_TRUE);
|
||||
} else {
|
||||
rv = nsAreaFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ protected:
|
||||
nsCOMPtr<nsIContent> mPostHr;
|
||||
|
||||
private:
|
||||
NS_IMETHOD UpdatePromptLabel();
|
||||
nsresult UpdatePromptLabel(PRBool aNotify);
|
||||
nsresult GetInputFrame(nsIFormControlFrame** oFrame);
|
||||
void GetInputValue(nsString& oString);
|
||||
void SetInputValue(const nsString& aString);
|
||||
|
Loading…
Reference in New Issue
Block a user