summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 14:39:19 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 14:39:19 +0200
commit054dde272820f12b4f3c60ee4c8b7ede47126aa6 (patch)
tree48646cf011ed28c2ae0af8f4f01dabdd270916fa /widget
parent4cfe5d84de0b8976f8bc5c005ae12ac3adf8f18a (diff)
downloadUXP-054dde272820f12b4f3c60ee4c8b7ede47126aa6.tar
UXP-054dde272820f12b4f3c60ee4c8b7ede47126aa6.tar.gz
UXP-054dde272820f12b4f3c60ee4c8b7ede47126aa6.tar.lz
UXP-054dde272820f12b4f3c60ee4c8b7ede47126aa6.tar.xz
UXP-054dde272820f12b4f3c60ee4c8b7ede47126aa6.zip
Bug 1344642 - Part 1: Cleanup dom.forms.datepicker related code
Diffstat (limited to 'widget')
-rw-r--r--widget/moz.build2
-rw-r--r--widget/nsContentProcessWidgetFactory.cpp6
-rw-r--r--widget/nsDatePickerProxy.cpp61
-rw-r--r--widget/nsDatePickerProxy.h33
-rw-r--r--widget/nsIDatePicker.idl50
-rw-r--r--widget/nsWidgetsCID.h5
6 files changed, 0 insertions, 157 deletions
diff --git a/widget/moz.build b/widget/moz.build
index 09192179f..f69f2d87c 100644
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -65,7 +65,6 @@ XPIDL_SOURCES += [
'nsIClipboardHelper.idl',
'nsIClipboardOwner.idl',
'nsIColorPicker.idl',
- 'nsIDatePicker.idl',
'nsIDisplayInfo.idl',
'nsIDragService.idl',
'nsIDragSession.idl',
@@ -151,7 +150,6 @@ UNIFIED_SOURCES += [
'nsClipboardProxy.cpp',
'nsColorPickerProxy.cpp',
'nsContentProcessWidgetFactory.cpp',
- 'nsDatePickerProxy.cpp',
'nsDragServiceProxy.cpp',
'nsFilePickerProxy.cpp',
'nsHTMLFormatConverter.cpp',
diff --git a/widget/nsContentProcessWidgetFactory.cpp b/widget/nsContentProcessWidgetFactory.cpp
index f8eaee250..2f00f1c83 100644
--- a/widget/nsContentProcessWidgetFactory.cpp
+++ b/widget/nsContentProcessWidgetFactory.cpp
@@ -9,7 +9,6 @@
#include "nsWidgetsCID.h"
#include "nsClipboardProxy.h"
#include "nsColorPickerProxy.h"
-#include "nsDatePickerProxy.h"
#include "nsDragServiceProxy.h"
#include "nsFilePickerProxy.h"
#include "nsScreenManagerProxy.h"
@@ -22,7 +21,6 @@ using namespace mozilla::widget;
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardProxy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPickerProxy)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsDatePickerProxy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragServiceProxy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePickerProxy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerProxy)
@@ -30,7 +28,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(PuppetBidiKeyboard)
NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID);
NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID);
-NS_DEFINE_NAMED_CID(NS_DATEPICKER_CID);
NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID);
NS_DEFINE_NAMED_CID(PUPPETBIDIKEYBOARD_CID);
@@ -41,8 +38,6 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
Module::CONTENT_PROCESS_ONLY },
{ &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerProxyConstructor,
Module::CONTENT_PROCESS_ONLY },
- { &kNS_DATEPICKER_CID, false, nullptr, nsDatePickerProxyConstructor,
- Module::CONTENT_PROCESS_ONLY },
{ &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceProxyConstructor,
Module::CONTENT_PROCESS_ONLY },
{ &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerProxyConstructor,
@@ -57,7 +52,6 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
{ "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::CONTENT_PROCESS_ONLY },
{ "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::CONTENT_PROCESS_ONLY },
- { "@mozilla.org/datepicker;1", &kNS_DATEPICKER_CID, Module::CONTENT_PROCESS_ONLY },
{ "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, Module::CONTENT_PROCESS_ONLY },
{ "@mozilla.org/gfx/screenmanager;1", &kNS_SCREENMANAGER_CID, Module::CONTENT_PROCESS_ONLY },
{ "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::CONTENT_PROCESS_ONLY },
diff --git a/widget/nsDatePickerProxy.cpp b/widget/nsDatePickerProxy.cpp
deleted file mode 100644
index e6b88f1be..000000000
--- a/widget/nsDatePickerProxy.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * 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 "nsDatePickerProxy.h"
-
-#include "mozilla/dom/TabChild.h"
-
-using namespace mozilla::dom;
-
-NS_IMPL_ISUPPORTS(nsDatePickerProxy, nsIDatePicker)
-
-/* void init (in nsIDOMWindow parent, in AString title, in short mode); */
-NS_IMETHODIMP
-nsDatePickerProxy::Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle,
- const nsAString& aInitialDate)
-{
- TabChild* tabChild = TabChild::GetFrom(aParent);
- if (!tabChild) {
- return NS_ERROR_FAILURE;
- }
-
- tabChild->SendPDatePickerConstructor(this,
- nsString(aTitle),
- nsString(aInitialDate));
- NS_ADDREF_THIS(); //Released in DeallocPDatePickerChild
- return NS_OK;
-}
-
-/* void open (in nsIDatePickerShownCallback aDatePickerShownCallback); */
-NS_IMETHODIMP
-nsDatePickerProxy::Open(nsIDatePickerShownCallback* aDatePickerShownCallback)
-{
- NS_ENSURE_STATE(!mCallback);
- mCallback = aDatePickerShownCallback;
-
- SendOpen();
- return NS_OK;
-}
-
-bool
-nsDatePickerProxy::RecvCancel()
-{
- if (mCallback) {
- mCallback->Cancel();
- mCallback = nullptr;
- }
- return true;
-}
-
-bool
-nsDatePickerProxy::Recv__delete__(const nsString& aDate)
-{
- if (mCallback) {
- mCallback->Done(aDate);
- mCallback = nullptr;
- }
- return true;
-}
diff --git a/widget/nsDatePickerProxy.h b/widget/nsDatePickerProxy.h
deleted file mode 100644
index 71475932c..000000000
--- a/widget/nsDatePickerProxy.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; 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/. */
-
-#ifndef nsDatePickerProxy_h
-#define nsDatePickerProxy_h
-
-#include "nsIDatePicker.h"
-
-#include "mozilla/dom/PDatePickerChild.h"
-
-class nsDatePickerProxy final : public nsIDatePicker,
- public mozilla::dom::PDatePickerChild
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIDATEPICKER
-
- nsDatePickerProxy() {}
-
- virtual bool RecvCancel() override;
- virtual bool Recv__delete__(const nsString& aDate) override;
-
-private:
- ~nsDatePickerProxy() {}
-
- nsCOMPtr<nsIDatePickerShownCallback> mCallback;
- nsString mTitle;
- nsString mInitialDate;
-};
-
-#endif // nsDatePickerProxy_h
diff --git a/widget/nsIDatePicker.idl b/widget/nsIDatePicker.idl
deleted file mode 100644
index d6be60c95..000000000
--- a/widget/nsIDatePicker.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; 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"
-
-interface mozIDOMWindowProxy;
-
-[scriptable, uuid(13388a28-1b0b-4218-a31b-588f7a4ec26c)]
-interface nsIDatePickerShownCallback : nsISupports
-{
- /**
- * Callback called when the user selects cancel in the date picker
- * This callback can not be called after done() is called.
- */
- void cancel();
-
- /**
- * Callback called when the user has finished selecting the date
- *
- * @param date The new selected date value following the format "YYYY-MM-DD"
- */
- void done(in AString date);
-};
-
-[scriptable, uuid(7becfc64-966b-4d53-87d2-9161f36bd3b3)]
-interface nsIDatePicker : nsISupports
-{
- /**
- * Initialize the date picker widget. The date picker will not be shown until
- * open() is called.
- * If the initialDate parameter does not follow the format "YYYY-MM-DD" then
- * the behavior will be unspecified.
- *
- * @param parent nsIDOMWindow parent. This dialog will be dependent
- * on this parent. parent may be null.
- * @param title The title for the date picker widget.
- * @param initialDate The date to show when the widget is opened. The
- * parameter has to follow the format "YYYY-MM-DD"
- */
- void init(in mozIDOMWindowProxy parent, in AString title, in AString initialDate);
-
- /**
- * Opens the date dialog asynchrounously.
- * The results are provided via the callback object.
- */
- void open(in nsIDatePickerShownCallback callback);
-};
diff --git a/widget/nsWidgetsCID.h b/widget/nsWidgetsCID.h
index 2589b59e0..54ebe63ab 100644
--- a/widget/nsWidgetsCID.h
+++ b/widget/nsWidgetsCID.h
@@ -33,11 +33,6 @@
{ 0x0f872c8c, 0x3ee6, 0x46bd, \
{ 0x92, 0xa2, 0x69, 0x65, 0x2c, 0x6b, 0x47, 0x4e } }
-/* 0ca832f8-978a-4dc7-a57d-adb803925d39 */
-#define NS_DATEPICKER_CID \
-{ 0x0ca832f8, 0x978a, 0x4dc7, \
- { 0xa5, 0x7d, 0xad, 0xb8, 0x03, 0x92, 0x5d, 0x39 } }
-
/* 2d96b3df-c051-11d1-a827-0040959a28c9 */
#define NS_APPSHELL_CID \
{ 0x2d96b3df, 0xc051, 0x11d1, \