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:
troy%netscape.com 1999-09-17 20:57:06 +00:00
Родитель e1f3907c3c
Коммит cbf2204bfc
2 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -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);