Fix bug 208601: DocumentViewerImpl::GetCanGetContents() was incorrectly returning false for text fields, because it was looking at the document's selection, rather than the text field selection. Fix by exposing nsIPresShell::GetSelectionForCopy(), and calling that. This fixes the Services menu in Camino to work in text fields. r/sr=roc.

git-svn-id: svn://10.0.0.236/trunk@179200 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
smfr%smfr.org
2005-08-29 15:19:13 +00:00
parent 8d7f1b51a8
commit c3be847acf
3 changed files with 20 additions and 17 deletions

View File

@@ -1120,6 +1120,8 @@ public:
NS_IMETHOD NotifyDestroyingFrame(nsIFrame* aFrame);
NS_IMETHOD DoCopy();
NS_IMETHOD GetSelectionForCopy(nsISelection** outSelection);
NS_IMETHOD GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocationString);
NS_IMETHOD DoGetContents(const nsACString& aMimeType, PRUint32 aFlags, PRBool aSelectionOnly, nsAString& outValue);
@@ -1334,9 +1336,6 @@ protected:
nsresult SetPrefNoScriptRule();
nsresult SetPrefNoFramesRule(void);
nsresult GetSelectionForCopy(nsISelection** outSelection);
nsICSSStyleSheet* mPrefStyleSheet; // mStyleSet owns it but we maintain a ref, may be null
#ifdef DEBUG
PRUint32 mUpdateCount;
@@ -4545,7 +4544,7 @@ NS_IMETHODIMP PresShell::GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocation
return NS_ERROR_FAILURE;
}
nsresult
NS_IMETHODIMP
PresShell::GetSelectionForCopy(nsISelection** outSelection)
{
nsresult rv = NS_OK;