зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e1f3907c3c
Коммит
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче