mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1125956 - Hack around the broken assumptions of Thunderbird about the HTML copy encoder by disabling the plaintext encoding detection logic; r=roc
This commit is contained in:
parent
70135c9c76
commit
df8fd3dc19
@ -1369,6 +1369,10 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
range->GetCommonAncestorContainer(getter_AddRefs(commonParent));
|
||||
|
||||
// Thunderbird's msg compose code abuses the HTML copy encoder and gets
|
||||
// confused if mIsTextWidget ends up becoming true, so for now we skip
|
||||
// this logic in Thunderbird.
|
||||
#ifndef MOZ_THUNDERBIRD
|
||||
for (nsCOMPtr<nsIContent> selContent(do_QueryInterface(commonParent));
|
||||
selContent;
|
||||
selContent = selContent->GetParent())
|
||||
@ -1395,7 +1399,7 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// normalize selection if we are not in a widget
|
||||
if (mIsTextWidget)
|
||||
{
|
||||
@ -1403,6 +1407,7 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection)
|
||||
mMimeType.AssignLiteral("text/plain");
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
// also consider ourselves in a text widget if we can't find an html document
|
||||
nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(mDocument);
|
||||
|
Loading…
Reference in New Issue
Block a user