зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1480637 - Remove nsIClipboardCommands; r=nika
Summary: Unused interface that can be removed. MozReview-Commit-ID: GnHRXdtI4qe Test Plan: Try run Reviewers: nika Tags: #secure-revision Bug #: 1480637 Differential Revision: https://phabricator.services.mozilla.com/D2694
This commit is contained in:
Родитель
d920d54421
Коммит
ee7197155b
|
@ -37,7 +37,6 @@ DIRS += [
|
|||
|
||||
XPIDL_SOURCES += [
|
||||
'nsCDefaultURIFixup.idl',
|
||||
'nsIClipboardCommands.idl',
|
||||
'nsIContentViewer.idl',
|
||||
'nsIContentViewerEdit.idl',
|
||||
'nsIDocShell.idl',
|
||||
|
|
|
@ -528,7 +528,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocShell)
|
|||
NS_INTERFACE_MAP_ENTRY(nsIAuthPromptProvider)
|
||||
NS_INTERFACE_MAP_ENTRY(nsILoadContext)
|
||||
NS_INTERFACE_MAP_ENTRY(nsILinkHandler)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIClipboardCommands)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMStorageManager)
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsINetworkInterceptController,
|
||||
mInterceptController)
|
||||
|
@ -13289,96 +13288,6 @@ nsDocShell::EnsureCommandHandler()
|
|||
return mCommandManager ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CanCutSelection(bool* aResult)
|
||||
{
|
||||
return IsCommandEnabled("cmd_cut", aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CanCopySelection(bool* aResult)
|
||||
{
|
||||
return IsCommandEnabled("cmd_copy", aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CanCopyLinkLocation(bool* aResult)
|
||||
{
|
||||
return IsCommandEnabled("cmd_copyLink", aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CanCopyImageLocation(bool* aResult)
|
||||
{
|
||||
return IsCommandEnabled("cmd_copyImageLocation", aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CanCopyImageContents(bool* aResult)
|
||||
{
|
||||
return IsCommandEnabled("cmd_copyImageContents", aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CanPaste(bool* aResult)
|
||||
{
|
||||
return IsCommandEnabled("cmd_paste", aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CutSelection(void)
|
||||
{
|
||||
return DoCommand("cmd_cut");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CopySelection(void)
|
||||
{
|
||||
return DoCommand("cmd_copy");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CopyLinkLocation(void)
|
||||
{
|
||||
return DoCommand("cmd_copyLink");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CopyImageLocation(void)
|
||||
{
|
||||
return DoCommand("cmd_copyImageLocation");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::CopyImageContents(void)
|
||||
{
|
||||
return DoCommand("cmd_copyImageContents");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::Paste(void)
|
||||
{
|
||||
return DoCommand("cmd_paste");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SelectAll(void)
|
||||
{
|
||||
return DoCommand("cmd_selectAll");
|
||||
}
|
||||
|
||||
//
|
||||
// SelectNone
|
||||
//
|
||||
// Collapses the current selection, insertion point ends up at beginning
|
||||
// of previous selection.
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SelectNone(void)
|
||||
{
|
||||
return DoCommand("cmd_selectNone");
|
||||
}
|
||||
|
||||
// link handling
|
||||
|
||||
class OnLinkClickEvent : public Runnable
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include "nsIAuthPromptProvider.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIClipboardCommands.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
|
@ -129,7 +128,6 @@ class nsDocShell final
|
|||
, public nsIAuthPromptProvider
|
||||
, public nsILoadContext
|
||||
, public nsILinkHandler
|
||||
, public nsIClipboardCommands
|
||||
, public nsIDOMStorageManager
|
||||
, public nsINetworkInterceptController
|
||||
, public nsIDeprecationWarner
|
||||
|
@ -178,7 +176,6 @@ public:
|
|||
NS_DECL_NSIREFRESHURI
|
||||
NS_DECL_NSIWEBPAGEDESCRIPTOR
|
||||
NS_DECL_NSIAUTHPROMPTPROVIDER
|
||||
NS_DECL_NSICLIPBOARDCOMMANDS
|
||||
NS_DECL_NSINETWORKINTERCEPTCONTROLLER
|
||||
NS_DECL_NSIDEPRECATIONWARNER
|
||||
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/**
|
||||
* An interface for embedding clients who wish to interact with
|
||||
* the system-wide OS clipboard. Mozilla does not use a private
|
||||
* clipboard, instead it places its data directly onto the system
|
||||
* clipboard. The webshell implements this interface.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(b8100c90-73be-11d2-92a5-00105a1b0d64)]
|
||||
interface nsIClipboardCommands : nsISupports {
|
||||
|
||||
/**
|
||||
* Returns whether there is a selection and it is not read-only.
|
||||
*
|
||||
* @return <code>true</code> if the current selection can be cut,
|
||||
* <code>false</code> otherwise.
|
||||
*/
|
||||
boolean canCutSelection();
|
||||
|
||||
/**
|
||||
* Returns whether there is a selection and it is copyable.
|
||||
*
|
||||
* @return <code>true</code> if there is a selection,
|
||||
* <code>false</code> otherwise.
|
||||
*/
|
||||
boolean canCopySelection();
|
||||
|
||||
/**
|
||||
* Returns whether we can copy a link location.
|
||||
*
|
||||
* @return <code>true</code> if a link is selected,
|
||||
* <code>false</code> otherwise.
|
||||
*/
|
||||
boolean canCopyLinkLocation();
|
||||
|
||||
/**
|
||||
* Returns whether we can copy an image location.
|
||||
*
|
||||
* @return <code>true</code> if an image is selected,
|
||||
<code>false</code> otherwise.
|
||||
*/
|
||||
boolean canCopyImageLocation();
|
||||
|
||||
/**
|
||||
* Returns whether we can copy an image's contents.
|
||||
*
|
||||
* @return <code>true</code> if an image is selected,
|
||||
* <code>false</code> otherwise
|
||||
*/
|
||||
boolean canCopyImageContents();
|
||||
|
||||
/**
|
||||
* Returns whether the current contents of the clipboard can be
|
||||
* pasted and if the current selection is not read-only.
|
||||
*
|
||||
* @return <code>true</code> there is data to paste on the clipboard
|
||||
* and the current selection is not read-only,
|
||||
* <code>false</code> otherwise
|
||||
*/
|
||||
boolean canPaste();
|
||||
|
||||
/**
|
||||
* Cut the current selection onto the clipboard.
|
||||
*/
|
||||
void cutSelection();
|
||||
|
||||
/**
|
||||
* Copy the current selection onto the clipboard.
|
||||
*/
|
||||
void copySelection();
|
||||
|
||||
/**
|
||||
* Copy the link location of the current selection (e.g.,
|
||||
* the |href| attribute of a selected |a| tag).
|
||||
*/
|
||||
void copyLinkLocation();
|
||||
|
||||
/**
|
||||
* Copy the location of the selected image.
|
||||
*/
|
||||
void copyImageLocation();
|
||||
|
||||
/**
|
||||
* Copy the contents of the selected image.
|
||||
*/
|
||||
void copyImageContents();
|
||||
|
||||
/**
|
||||
* Paste the contents of the clipboard into the current selection.
|
||||
*/
|
||||
void paste();
|
||||
|
||||
/**
|
||||
* Select the entire contents.
|
||||
*/
|
||||
void selectAll();
|
||||
|
||||
/**
|
||||
* Clear the current selection (if any). Insertion point ends up
|
||||
* at beginning of current selection.
|
||||
*/
|
||||
void selectNone();
|
||||
|
||||
};
|
Загрузка…
Ссылка в новой задаче