Bug 405951. Thunderbird: newsgroup/feed messages blank in virtual buffer, r=surkov, a=blocking1.9

This commit is contained in:
aaronleventhal@moonset.net 2008-01-28 20:38:18 -08:00
Родитель c656869b47
Коммит cb7a18cf55
3 изменённых файлов: 16 добавлений и 18 удалений

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

@ -132,13 +132,12 @@ nsresult nsCaretAccessible::SetControlSelectionListener(nsIDOMNode *aCurrentNode
return selPrivate->AddSelectionListener(this);
}
nsresult nsCaretAccessible::AddDocSelectionListener(nsIDOMDocument *aDoc)
nsresult
nsCaretAccessible::AddDocSelectionListener(nsIPresShell *aShell)
{
NS_ENSURE_TRUE(mRootAccessible, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(doc->GetPrimaryShell());
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(aShell);
NS_ENSURE_TRUE(selCon, NS_ERROR_FAILURE);
nsCOMPtr<nsISelection> domSel;
@ -149,12 +148,10 @@ nsresult nsCaretAccessible::AddDocSelectionListener(nsIDOMDocument *aDoc)
return selPrivate->AddSelectionListener(this);
}
nsresult nsCaretAccessible::RemoveDocSelectionListener(nsIDOMDocument *aDoc)
nsresult
nsCaretAccessible::RemoveDocSelectionListener(nsIPresShell *aShell)
{
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(doc->GetPrimaryShell());
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(aShell);
NS_ENSURE_TRUE(selCon, NS_ERROR_FAILURE);
nsCOMPtr<nsISelection> domSel;

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

@ -103,17 +103,19 @@ public:
* Start listening to selection events for a given document
* More than one document's selection events can be listened to
* at the same time, by a given nsCaretAccessible
* @param aDocument Document to listen to selection events for.
* @param aShell PresShell for document to listen to selection events from.
*/
nsresult AddDocSelectionListener(nsIDOMDocument *aDoc);
nsresult AddDocSelectionListener(nsIPresShell *aShell);
/**
* Stop listening to selection events for a given document
* If the document goes away, this method needs to be called for
* that document by the owner of the caret
* @param aDocument Document to listen to selection events for.
* that document by the owner of the caret. We use presShell because
* instead of document because it is more direct than getting it from
* the document, and in any case it is unavailable from the doc after a pagehide.
* @param aShell PresShell for document to no longer listen to selection events from.
*/
nsresult RemoveDocSelectionListener(nsIDOMDocument *aDoc);
nsresult RemoveDocSelectionListener(nsIPresShell *aShell);
nsRect GetCaretRect(nsIWidget **aOutWidget);

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

@ -669,8 +669,7 @@ nsresult nsDocAccessible::AddEventListeners()
NS_ENSURE_TRUE(rootAccessible, NS_ERROR_FAILURE);
nsRefPtr<nsCaretAccessible> caretAccessible = rootAccessible->GetCaretAccessible();
if (caretAccessible) {
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(mDocument);
caretAccessible->AddDocSelectionListener(domDoc);
caretAccessible->AddDocSelectionListener(presShell);
}
}
@ -698,8 +697,8 @@ nsresult nsDocAccessible::RemoveEventListeners()
if (rootAccessible) {
nsRefPtr<nsCaretAccessible> caretAccessible = rootAccessible->GetCaretAccessible();
if (caretAccessible) {
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(mDocument);
caretAccessible->RemoveDocSelectionListener(domDoc);
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
caretAccessible->RemoveDocSelectionListener(presShell);
}
}