mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
Fix for bug #14157. Changed ConstructAlternateImageFrame() to set the document
pointer and the parent content pointer for the text frame
This commit is contained in:
parent
e1f3907c3c
commit
cbf2204bfc
@ -6817,9 +6817,16 @@ nsCSSFrameConstructor::ConstructAlternateImageFrame(nsIPresContext* aPresContex
|
||||
|
||||
// Create a text content element for the alternate text
|
||||
nsCOMPtr<nsIContent> altTextContent;
|
||||
nsIDOMCharacterData* domData;
|
||||
|
||||
NS_NewTextNode(getter_AddRefs(altTextContent));
|
||||
|
||||
// Set aContent as the parent content and set the document object
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
aContent->GetDocument(*getter_AddRefs(document));
|
||||
altTextContent->SetParent(aContent);
|
||||
altTextContent->SetDocument(document, PR_TRUE);
|
||||
|
||||
// Set the content's text
|
||||
nsIDOMCharacterData* domData;
|
||||
altTextContent->QueryInterface(kIDOMCharacterDataIID, (void**)&domData);
|
||||
domData->SetData(altText);
|
||||
NS_RELEASE(domData);
|
||||
|
@ -6817,9 +6817,16 @@ nsCSSFrameConstructor::ConstructAlternateImageFrame(nsIPresContext* aPresContex
|
||||
|
||||
// Create a text content element for the alternate text
|
||||
nsCOMPtr<nsIContent> altTextContent;
|
||||
nsIDOMCharacterData* domData;
|
||||
|
||||
NS_NewTextNode(getter_AddRefs(altTextContent));
|
||||
|
||||
// Set aContent as the parent content and set the document object
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
aContent->GetDocument(*getter_AddRefs(document));
|
||||
altTextContent->SetParent(aContent);
|
||||
altTextContent->SetDocument(document, PR_TRUE);
|
||||
|
||||
// Set the content's text
|
||||
nsIDOMCharacterData* domData;
|
||||
altTextContent->QueryInterface(kIDOMCharacterDataIID, (void**)&domData);
|
||||
domData->SetData(altText);
|
||||
NS_RELEASE(domData);
|
||||
|
Loading…
Reference in New Issue
Block a user