Bug 1298243 part 6. Remove the unused xpidl versions of DataTransfer.types and DataTransfer.getData. r=mystor
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 10 Oct 2016 21:07:47 -0400
changeset 317390 1493789a0ce5976af2c78fb8b8f5dc3fff475ac7
parent 317389 d15ec8c5a75f89e80f90491526303255d6d4723c
child 317391 67d40adfa5e12f58326a00f27262036edd9386ba
push id30804
push usercbook@mozilla.com
push dateTue, 11 Oct 2016 10:01:46 +0000
treeherdermozilla-central@7ae377917236 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmystor
bugs1298243
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1298243 part 6. Remove the unused xpidl versions of DataTransfer.types and DataTransfer.getData. r=mystor
dom/events/DataTransfer.cpp
dom/interfaces/events/nsIDOMDataTransfer.idl
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -351,33 +351,16 @@ DataTransfer::GetTypes(ErrorResult& aRv)
       return nullptr;
     }
     break;
   }
 
   return types.forget();
 }
 
-NS_IMETHODIMP
-DataTransfer::GetTypes(nsISupports** aTypes)
-{
-  if (NS_WARN_IF(!aTypes)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  ErrorResult rv;
-  RefPtr<DOMStringList> types = GetTypes(rv);
-  if (NS_WARN_IF(rv.Failed())) {
-    return rv.StealNSResult();
-  }
-
-  types.forget(aTypes);
-  return NS_OK;
-}
-
 void
 DataTransfer::GetData(const nsAString& aFormat, nsAString& aData,
                       const Maybe<nsIPrincipal*>& aSubjectPrincipal,
                       ErrorResult& aRv)
 {
   MOZ_ASSERT(aSubjectPrincipal.isSome());
 
   // return an empty string if data for the format was not found
@@ -428,24 +411,16 @@ DataTransfer::GetData(const nsAString& a
       }
     }
     else {
       aData = stringdata;
     }
   }
 }
 
-NS_IMETHODIMP
-DataTransfer::GetData(const nsAString& aFormat, nsAString& aData)
-{
-  ErrorResult rv;
-  GetData(aFormat, aData, Some(nsContentUtils::SubjectPrincipal()), rv);
-  return rv.StealNSResult();
-}
-
 void
 DataTransfer::SetData(const nsAString& aFormat, const nsAString& aData,
                       const Maybe<nsIPrincipal*>& aSubjectPrincipal,
                       ErrorResult& aRv)
 {
   MOZ_ASSERT(aSubjectPrincipal.isSome());
 
   RefPtr<nsVariantCC> variant = new nsVariantCC();
--- a/dom/interfaces/events/nsIDOMDataTransfer.idl
+++ b/dom/interfaces/events/nsIDOMDataTransfer.idl
@@ -62,29 +62,16 @@ interface nsIDOMDataTransfer : nsISuppor
   /**
    * Holds a list of all the local files available on this data transfer.
    * A dataTransfer containing no files will return an empty list, and an
    * invalid index access on the resulting file list will return null. 
    */
   readonly attribute nsIDOMFileList files;
 
   /**
-   * Holds a list of the format types of the data that is stored for the first
-   * item, in the same order the data was added. An empty list will be
-   * returned if no data was added.
-   */
-  readonly attribute nsISupports types;
-
-  /**
-   * Retrieves the data for a given format, or an empty string if data for
-   * that format does not exist or the data transfer contains no data.
-   */
-  DOMString getData(in DOMString format);
-
-  /**
    * Set the image to be used for dragging if a custom one is desired. Most of
    * the time, this would not be set, as a default image is created from the
    * node that was dragged.
    *
    * If the node is an HTML img element, an HTML canvas element or a XUL image
    * element, the image data is used. Otherwise, image should be a visible
    * node and the drag image will be created from this. If image is null, any
    * custom drag image is cleared and the default is used instead.