зеркало из https://github.com/mozilla/gecko-dev.git
Bug 856358 - Remove ContactProperties types from window. r=gwagner
--HG-- rename : dom/interfaces/contacts/nsIDOMContactProperties.idl => dom/interfaces/contacts/nsIContactProperties.idl extra : rebase_source : 3581687c7285ed8e9c653d1d71f2b60837708679
This commit is contained in:
Родитель
e7d0400d09
Коммит
211e11853d
|
@ -25,8 +25,8 @@ XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
|
|||
"nsIMessageSender");
|
||||
|
||||
const nsIClassInfo = Ci.nsIClassInfo;
|
||||
const CONTACTPROPERTIES_CID = Components.ID("{f5181640-89e8-11e1-b0c4-0800200c9a66}");
|
||||
const nsIDOMContactProperties = Ci.nsIDOMContactProperties;
|
||||
const CONTACTPROPERTIES_CID = Components.ID("{0a6720d7-9cae-4467-989d-e9e450e21341}");
|
||||
const nsIContactProperties = Ci.nsIContactProperties;
|
||||
|
||||
// ContactProperties is not directly instantiated. It is used as interface.
|
||||
|
||||
|
@ -38,17 +38,17 @@ ContactProperties.prototype = {
|
|||
classInfo : XPCOMUtils.generateCI({classID: CONTACTPROPERTIES_CID,
|
||||
contractID:"@mozilla.org/contactProperties;1",
|
||||
classDescription: "ContactProperties",
|
||||
interfaces: [nsIDOMContactProperties],
|
||||
interfaces: [nsIContactProperties],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactProperties])
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIContactProperties])
|
||||
}
|
||||
|
||||
//ContactAddress
|
||||
|
||||
const CONTACTADDRESS_CONTRACTID = "@mozilla.org/contactAddress;1";
|
||||
const CONTACTADDRESS_CID = Components.ID("{eba48030-89e8-11e1-b0c4-0800200c9a66}");
|
||||
const nsIDOMContactAddress = Components.interfaces.nsIDOMContactAddress;
|
||||
const CONTACTADDRESS_CID = Components.ID("{c5d6eb73-a079-4a9f-8cd5-618194f73b30}");
|
||||
const nsIContactAddress = Components.interfaces.nsIContactAddress;
|
||||
|
||||
function ContactAddress(aType, aStreetAddress, aLocality, aRegion, aPostalCode, aCountryName) {
|
||||
this.type = aType || null;
|
||||
|
@ -73,17 +73,17 @@ ContactAddress.prototype = {
|
|||
classInfo : XPCOMUtils.generateCI({classID: CONTACTADDRESS_CID,
|
||||
contractID: CONTACTADDRESS_CONTRACTID,
|
||||
classDescription: "ContactAddress",
|
||||
interfaces: [nsIDOMContactAddress],
|
||||
interfaces: [nsIContactAddress],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactAddress])
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIContactAddress])
|
||||
}
|
||||
|
||||
//ContactField
|
||||
|
||||
const CONTACTFIELD_CONTRACTID = "@mozilla.org/contactField;1";
|
||||
const CONTACTFIELD_CID = Components.ID("{e2cb19c0-e4aa-11e1-9b23-0800200c9a66}");
|
||||
const nsIDOMContactField = Components.interfaces.nsIDOMContactField;
|
||||
const CONTACTFIELD_CID = Components.ID("{474b8c6d-f984-431f-9636-e523ca3ec34d}");
|
||||
const nsIContactField = Components.interfaces.nsIContactField;
|
||||
|
||||
function ContactField(aType, aValue) {
|
||||
this.type = aType || null;
|
||||
|
@ -100,17 +100,17 @@ ContactField.prototype = {
|
|||
classInfo : XPCOMUtils.generateCI({classID: CONTACTFIELD_CID,
|
||||
contractID: CONTACTFIELD_CONTRACTID,
|
||||
classDescription: "ContactField",
|
||||
interfaces: [nsIDOMContactField],
|
||||
interfaces: [nsIContactField],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactField])
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIContactField])
|
||||
}
|
||||
|
||||
//ContactTelField
|
||||
|
||||
const CONTACTTELFIELD_CONTRACTID = "@mozilla.org/contactTelField;1";
|
||||
const CONTACTTELFIELD_CID = Components.ID("{ed0ab260-e4aa-11e1-9b23-0800200c9a66}");
|
||||
const nsIDOMContactTelField = Components.interfaces.nsIDOMContactTelField;
|
||||
const CONTACTTELFIELD_CID = Components.ID("{4d42c5a9-ea5d-4102-80c3-40cc986367ca}");
|
||||
const nsIContactTelField = Components.interfaces.nsIContactTelField;
|
||||
|
||||
function ContactTelField(aType, aValue, aCarrier) {
|
||||
this.type = aType || null;
|
||||
|
@ -129,17 +129,17 @@ ContactTelField.prototype = {
|
|||
classInfo : XPCOMUtils.generateCI({classID: CONTACTTELFIELD_CID,
|
||||
contractID: CONTACTTELFIELD_CONTRACTID,
|
||||
classDescription: "ContactTelField",
|
||||
interfaces: [nsIDOMContactTelField],
|
||||
interfaces: [nsIContactTelField],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactTelField])
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIContactTelField])
|
||||
}
|
||||
|
||||
//ContactFindSortOptions
|
||||
|
||||
const CONTACTFINDSORTOPTIONS_CONTRACTID = "@mozilla.org/contactFindSortOptions;1"
|
||||
const CONTACTFINDSORTOPTIONS_CID = Components.ID("{cb008c06-3bf8-495c-8865-f9ca1673a1e1}");
|
||||
const nsIDOMContactFindSortOptions = Ci.nsIDOMContactFindSortOptions;
|
||||
const CONTACTFINDSORTOPTIONS_CID = Components.ID("{0a5b1fab-70da-46dd-b902-619904d920c2}");
|
||||
const nsIContactFindSortOptions = Ci.nsIContactFindSortOptions;
|
||||
|
||||
function ContactFindSortOptions () { }
|
||||
|
||||
|
@ -148,16 +148,16 @@ ContactFindSortOptions.prototype = {
|
|||
classInfo: XPCOMUtils.generateCI({classID: CONTACTFINDSORTOPTIONS_CID,
|
||||
contractID: CONTACTFINDSORTOPTIONS_CONTRACTID,
|
||||
classDescription: "ContactFindSortOptions",
|
||||
interfaces: [nsIDOMContactFindSortOptions],
|
||||
interfaces: [nsIContactFindSortOptions],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
QueryInterface: XPCOMUtils.generateQI([nsIDOMContactFindSortOptions])
|
||||
QueryInterface: XPCOMUtils.generateQI([nsIContactFindSortOptions])
|
||||
};
|
||||
|
||||
//ContactFindOptions
|
||||
|
||||
const CONTACTFINDOPTIONS_CONTRACTID = "@mozilla.org/contactFindOptions;1";
|
||||
const CONTACTFINDOPTIONS_CID = Components.ID("{e31daea0-0cb6-11e1-be50-0800200c9a66}");
|
||||
const nsIDOMContactFindOptions = Components.interfaces.nsIDOMContactFindOptions;
|
||||
const CONTACTFINDOPTIONS_CID = Components.ID("{28ce07d0-45d9-4b7a-8843-521df4edd8bc}");
|
||||
const nsIContactFindOptions = Components.interfaces.nsIContactFindOptions;
|
||||
|
||||
function ContactFindOptions() { };
|
||||
|
||||
|
@ -167,18 +167,18 @@ ContactFindOptions.prototype = {
|
|||
classInfo : XPCOMUtils.generateCI({classID: CONTACTFINDOPTIONS_CID,
|
||||
contractID: CONTACTFINDOPTIONS_CONTRACTID,
|
||||
classDescription: "ContactFindOptions",
|
||||
interfaces: [nsIDOMContactFindSortOptions,
|
||||
nsIDOMContactFindOptions],
|
||||
interfaces: [nsIContactFindSortOptions,
|
||||
nsIContactFindOptions],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactFindSortOptions,
|
||||
nsIDOMContactFindOptions])
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIContactFindSortOptions,
|
||||
nsIContactFindOptions])
|
||||
}
|
||||
|
||||
//Contact
|
||||
|
||||
const CONTACT_CONTRACTID = "@mozilla.org/contact;1";
|
||||
const CONTACT_CID = Components.ID("{da0f7040-388b-11e1-b86c-0800200c9a66}");
|
||||
const CONTACT_CID = Components.ID("{72a5ee28-81d8-4af8-90b3-ae935396cc66}");
|
||||
const nsIDOMContact = Components.interfaces.nsIDOMContact;
|
||||
|
||||
function Contact() { };
|
||||
|
@ -329,16 +329,16 @@ Contact.prototype = {
|
|||
classInfo : XPCOMUtils.generateCI({classID: CONTACT_CID,
|
||||
contractID: CONTACT_CONTRACTID,
|
||||
classDescription: "Contact",
|
||||
interfaces: [nsIDOMContact, nsIDOMContactProperties],
|
||||
interfaces: [nsIDOMContact, nsIContactProperties],
|
||||
flags: nsIClassInfo.DOM_OBJECT}),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContact, nsIDOMContactProperties])
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMContact, nsIContactProperties])
|
||||
}
|
||||
|
||||
// ContactManager
|
||||
|
||||
const CONTACTMANAGER_CONTRACTID = "@mozilla.org/contactManager;1";
|
||||
const CONTACTMANAGER_CID = Components.ID("{1d70322b-f11b-4f19-9586-7bf291f212aa}");
|
||||
const CONTACTMANAGER_CID = Components.ID("{4efae3f8-dd69-4622-97c8-f16e4d38d95c}");
|
||||
const nsIDOMContactManager = Components.interfaces.nsIDOMContactManager;
|
||||
|
||||
function ContactManager()
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
component {f5181640-89e8-11e1-b0c4-0800200c9a66} ContactManager.js
|
||||
contract @mozilla.org/contactProperties;1 {f5181640-89e8-11e1-b0c4-0800200c9a66}
|
||||
component {0a6720d7-9cae-4467-989d-e9e450e21341} ContactManager.js
|
||||
contract @mozilla.org/contactProperties;1 {0a6720d7-9cae-4467-989d-e9e450e21341}
|
||||
|
||||
component {eba48030-89e8-11e1-b0c4-0800200c9a66} ContactManager.js
|
||||
contract @mozilla.org/contactAddress;1 {eba48030-89e8-11e1-b0c4-0800200c9a66}
|
||||
component {c5d6eb73-a079-4a9f-8cd5-618194f73b30} ContactManager.js
|
||||
contract @mozilla.org/contactAddress;1 {c5d6eb73-a079-4a9f-8cd5-618194f73b30}
|
||||
|
||||
component {e2cb19c0-e4aa-11e1-9b23-0800200c9a66} ContactManager.js
|
||||
contract @mozilla.org/contactField;1 {e2cb19c0-e4aa-11e1-9b23-0800200c9a66}
|
||||
component {474b8c6d-f984-431f-9636-e523ca3ec34d} ContactManager.js
|
||||
contract @mozilla.org/contactField;1 {474b8c6d-f984-431f-9636-e523ca3ec34d}
|
||||
|
||||
component {ed0ab260-e4aa-11e1-9b23-0800200c9a66} ContactManager.js
|
||||
contract @mozilla.org/contactTelField;1 {ed0ab260-e4aa-11e1-9b23-0800200c9a66}
|
||||
component {4d42c5a9-ea5d-4102-80c3-40cc986367ca} ContactManager.js
|
||||
contract @mozilla.org/contactTelField;1 {4d42c5a9-ea5d-4102-80c3-40cc986367ca}
|
||||
|
||||
component {cb008c06-3bf8-495c-8865-f9ca1673a1e1} ContactManager.js
|
||||
contract @mozilla.org/contactFindSortOptions;1 {cb008c06-3bf8-495c-8865-f9ca1673a1e1}
|
||||
component {0a5b1fab-70da-46dd-b902-619904d920c2} ContactManager.js
|
||||
contract @mozilla.org/contactFindSortOptions;1 {0a5b1fab-70da-46dd-b902-619904d920c2}
|
||||
|
||||
component {e13ca4c5-c9cd-40bb-95e9-b636d42f5edf} ContactManager.js
|
||||
contract @mozilla.org/contactFindOptions;1 {e13ca4c5-c9cd-40bb-95e9-b636d42f5edf}
|
||||
component {28ce07d0-45d9-4b7a-8843-521df4edd8bc} ContactManager.js
|
||||
contract @mozilla.org/contactFindOptions;1 {28ce07d0-45d9-4b7a-8843-521df4edd8bc}
|
||||
|
||||
component {da0f7040-388b-11e1-b86c-0800200c9a66} ContactManager.js
|
||||
contract @mozilla.org/contact;1 {da0f7040-388b-11e1-b86c-0800200c9a66}
|
||||
component {72a5ee28-81d8-4af8-90b3-ae935396cc66} ContactManager.js
|
||||
contract @mozilla.org/contact;1 {72a5ee28-81d8-4af8-90b3-ae935396cc66}
|
||||
category JavaScript-global-constructor mozContact @mozilla.org/contact;1
|
||||
|
||||
component {1d70322b-f11b-4f19-9586-7bf291f212aa} ContactManager.js
|
||||
contract @mozilla.org/contactManager;1 {1d70322b-f11b-4f19-9586-7bf291f212aa}
|
||||
component {4efae3f8-dd69-4622-97c8-f16e4d38d95c} ContactManager.js
|
||||
contract @mozilla.org/contactManager;1 {4efae3f8-dd69-4622-97c8-f16e4d38d95c}
|
||||
category JavaScript-navigator-property mozContacts @mozilla.org/contactManager;1
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMContactManager.idl',
|
||||
'nsIDOMContactProperties.idl',
|
||||
'nsIContactProperties.idl',
|
||||
'nsIDOMMozContactChangeEvent.idl',
|
||||
]
|
||||
|
||||
|
|
|
@ -4,11 +4,8 @@
|
|||
|
||||
#include "domstubs.idl"
|
||||
|
||||
interface nsIArray;
|
||||
interface nsIDOMContact;
|
||||
|
||||
[scriptable, uuid(eba48030-89e8-11e1-b0c4-0800200c9a66)]
|
||||
interface nsIDOMContactAddress : nsISupports
|
||||
[scriptable, uuid(c5d6eb73-a079-4a9f-8cd5-618194f73b30)]
|
||||
interface nsIContactAddress : nsISupports
|
||||
{
|
||||
attribute DOMString type;
|
||||
attribute DOMString streetAddress;
|
||||
|
@ -18,28 +15,28 @@ interface nsIDOMContactAddress : nsISupports
|
|||
attribute DOMString countryName;
|
||||
};
|
||||
|
||||
[scriptable, uuid(e2cb19c0-e4aa-11e1-9b23-0800200c9a66)]
|
||||
interface nsIDOMContactField : nsISupports
|
||||
[scriptable, uuid(474b8c6d-f984-431f-9636-e523ca3ec34d)]
|
||||
interface nsIContactField : nsISupports
|
||||
{
|
||||
attribute jsval type; // DOMString[] for primary/favorite (use:"PREF"), "home", "work", etc.
|
||||
attribute DOMString value;
|
||||
};
|
||||
|
||||
[scriptable, uuid(ed0ab260-e4aa-11e1-9b23-0800200c9a66)]
|
||||
interface nsIDOMContactTelField : nsIDOMContactField
|
||||
[scriptable, uuid(4d42c5a9-ea5d-4102-80c3-40cc986367ca)]
|
||||
interface nsIContactTelField : nsIContactField
|
||||
{
|
||||
attribute DOMString carrier;
|
||||
};
|
||||
|
||||
[scriptable, uuid(cb008c06-3bf8-495c-8865-f9ca1673a1e1)]
|
||||
interface nsIDOMContactFindSortOptions : nsISupports
|
||||
[scriptable, uuid(0a5b1fab-70da-46dd-b902-619904d920c2)]
|
||||
interface nsIContactFindSortOptions : nsISupports
|
||||
{
|
||||
attribute DOMString sortBy; // "givenName" or "familyName"
|
||||
attribute DOMString sortOrder; // e.g. "descending"
|
||||
};
|
||||
|
||||
[scriptable, uuid(e13ca4c5-c9cd-40bb-95e9-b636d42f5edf)]
|
||||
interface nsIDOMContactFindOptions : nsIDOMContactFindSortOptions
|
||||
[scriptable, uuid(28ce07d0-45d9-4b7a-8843-521df4edd8bc)]
|
||||
interface nsIContactFindOptions : nsIContactFindSortOptions
|
||||
{
|
||||
attribute DOMString filterValue; // e.g. "Tom"
|
||||
attribute DOMString filterOp; // e.g. "contains"
|
||||
|
@ -47,8 +44,8 @@ interface nsIDOMContactFindOptions : nsIDOMContactFindSortOptions
|
|||
attribute unsigned long filterLimit;
|
||||
};
|
||||
|
||||
[scriptable, uuid(f0ddb360-e4aa-11e1-9b23-0800200c9a66)]
|
||||
interface nsIDOMContactProperties : nsISupports
|
||||
[scriptable, uuid(0a6720d7-9cae-4467-989d-e9e450e21341)]
|
||||
interface nsIContactProperties : nsISupports
|
||||
{
|
||||
attribute jsval name; // DOMString[]
|
||||
attribute jsval honorificPrefix; // DOMString[]
|
|
@ -3,32 +3,29 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "domstubs.idl"
|
||||
#include "nsIDOMContactProperties.idl"
|
||||
#include "nsIContactProperties.idl"
|
||||
#include "nsIDOMEventTarget.idl"
|
||||
|
||||
interface nsIArray;
|
||||
interface nsIDOMContactFindSortOptions;
|
||||
interface nsIDOMContactFindOptions;
|
||||
interface nsIDOMContactProperties;
|
||||
interface nsIDOMDOMRequest;
|
||||
interface nsIDOMDOMCursor;
|
||||
|
||||
[scriptable, uuid(da0f7040-388b-11e1-b86c-0800200c9a66)]
|
||||
interface nsIDOMContact : nsIDOMContactProperties
|
||||
[scriptable, uuid(72a5ee28-81d8-4af8-90b3-ae935396cc66)]
|
||||
interface nsIDOMContact : nsIContactProperties
|
||||
{
|
||||
attribute DOMString id;
|
||||
readonly attribute jsval published;
|
||||
readonly attribute jsval updated;
|
||||
|
||||
void init(in nsIDOMContactProperties properties); // Workaround BUG 723206
|
||||
void init(in nsIContactProperties properties); // Workaround BUG 723206
|
||||
};
|
||||
|
||||
[scriptable, uuid(1d70322b-f11b-4f19-9586-7bf291f212aa)]
|
||||
[scriptable, uuid(4efae3f8-dd69-4622-97c8-f16e4d38d95c)]
|
||||
interface nsIDOMContactManager : nsISupports
|
||||
{
|
||||
nsIDOMDOMRequest find(in nsIDOMContactFindOptions options);
|
||||
nsIDOMDOMRequest find(in nsIContactFindOptions options);
|
||||
|
||||
nsIDOMDOMCursor getAll(in nsIDOMContactFindSortOptions options);
|
||||
nsIDOMDOMCursor getAll(in nsIContactFindSortOptions options);
|
||||
|
||||
nsIDOMDOMRequest clear();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=766694
|
|||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=766694">Mozilla Bug 766694</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
@ -186,7 +186,6 @@ var interfaceNamesInGlobalScope =
|
|||
"XULDocument",
|
||||
"XULMultiSelectControlElement",
|
||||
"SVGTitleElement",
|
||||
"ContactProperties",
|
||||
"PerformanceTiming",
|
||||
"LSProgressEvent",
|
||||
"NSEvent",
|
||||
|
@ -237,7 +236,6 @@ var interfaceNamesInGlobalScope =
|
|||
"HTMLCanvasElement",
|
||||
"MouseEvent",
|
||||
"OfflineResourceList",
|
||||
"ContactAddress",
|
||||
"Range",
|
||||
"MozCSSKeyframeRule",
|
||||
"SettingsLock",
|
||||
|
@ -410,8 +408,6 @@ var interfaceNamesInGlobalScope =
|
|||
"XULMenuListElement",
|
||||
"SVGTransform",
|
||||
"SVGTextPositioningElement",
|
||||
"ContactFindSortOptions",
|
||||
"ContactFindOptions",
|
||||
"SVGFEMergeElement",
|
||||
"FileRequest",
|
||||
"SVGDefsElement",
|
||||
|
@ -507,8 +503,6 @@ var interfaceNamesInGlobalScope =
|
|||
"EventTarget",
|
||||
"File",
|
||||
"SVGGradientElement",
|
||||
"ContactTelField",
|
||||
"ContactField",
|
||||
"SVGFitToViewBox",
|
||||
"SVGAElement",
|
||||
"NavigatorCamera",
|
||||
|
@ -559,7 +553,7 @@ for (var i in SpecialPowers.Components.interfaces) {
|
|||
name = s.substring("nsIDOM".length);
|
||||
} else if (s.indexOf("nsI") == 0) {
|
||||
name = s.substring("nsI".length);
|
||||
}
|
||||
}
|
||||
if (name && (name in window)) {
|
||||
ok(interfaceNamesInGlobalScope.indexOf(name) >= 0,
|
||||
"Unexpected interface name in global scope: " + name);
|
||||
|
|
Загрузка…
Ссылка в новой задаче