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:
Reuben Morais 2013-04-10 16:09:10 -07:00
Родитель e7d0400d09
Коммит 211e11853d
6 изменённых файлов: 68 добавлений и 80 удалений

Просмотреть файл

@ -25,8 +25,8 @@ XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"nsIMessageSender"); "nsIMessageSender");
const nsIClassInfo = Ci.nsIClassInfo; const nsIClassInfo = Ci.nsIClassInfo;
const CONTACTPROPERTIES_CID = Components.ID("{f5181640-89e8-11e1-b0c4-0800200c9a66}"); const CONTACTPROPERTIES_CID = Components.ID("{0a6720d7-9cae-4467-989d-e9e450e21341}");
const nsIDOMContactProperties = Ci.nsIDOMContactProperties; const nsIContactProperties = Ci.nsIContactProperties;
// ContactProperties is not directly instantiated. It is used as interface. // ContactProperties is not directly instantiated. It is used as interface.
@ -38,17 +38,17 @@ ContactProperties.prototype = {
classInfo : XPCOMUtils.generateCI({classID: CONTACTPROPERTIES_CID, classInfo : XPCOMUtils.generateCI({classID: CONTACTPROPERTIES_CID,
contractID:"@mozilla.org/contactProperties;1", contractID:"@mozilla.org/contactProperties;1",
classDescription: "ContactProperties", classDescription: "ContactProperties",
interfaces: [nsIDOMContactProperties], interfaces: [nsIContactProperties],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactProperties]) QueryInterface : XPCOMUtils.generateQI([nsIContactProperties])
} }
//ContactAddress //ContactAddress
const CONTACTADDRESS_CONTRACTID = "@mozilla.org/contactAddress;1"; const CONTACTADDRESS_CONTRACTID = "@mozilla.org/contactAddress;1";
const CONTACTADDRESS_CID = Components.ID("{eba48030-89e8-11e1-b0c4-0800200c9a66}"); const CONTACTADDRESS_CID = Components.ID("{c5d6eb73-a079-4a9f-8cd5-618194f73b30}");
const nsIDOMContactAddress = Components.interfaces.nsIDOMContactAddress; const nsIContactAddress = Components.interfaces.nsIContactAddress;
function ContactAddress(aType, aStreetAddress, aLocality, aRegion, aPostalCode, aCountryName) { function ContactAddress(aType, aStreetAddress, aLocality, aRegion, aPostalCode, aCountryName) {
this.type = aType || null; this.type = aType || null;
@ -73,17 +73,17 @@ ContactAddress.prototype = {
classInfo : XPCOMUtils.generateCI({classID: CONTACTADDRESS_CID, classInfo : XPCOMUtils.generateCI({classID: CONTACTADDRESS_CID,
contractID: CONTACTADDRESS_CONTRACTID, contractID: CONTACTADDRESS_CONTRACTID,
classDescription: "ContactAddress", classDescription: "ContactAddress",
interfaces: [nsIDOMContactAddress], interfaces: [nsIContactAddress],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactAddress]) QueryInterface : XPCOMUtils.generateQI([nsIContactAddress])
} }
//ContactField //ContactField
const CONTACTFIELD_CONTRACTID = "@mozilla.org/contactField;1"; const CONTACTFIELD_CONTRACTID = "@mozilla.org/contactField;1";
const CONTACTFIELD_CID = Components.ID("{e2cb19c0-e4aa-11e1-9b23-0800200c9a66}"); const CONTACTFIELD_CID = Components.ID("{474b8c6d-f984-431f-9636-e523ca3ec34d}");
const nsIDOMContactField = Components.interfaces.nsIDOMContactField; const nsIContactField = Components.interfaces.nsIContactField;
function ContactField(aType, aValue) { function ContactField(aType, aValue) {
this.type = aType || null; this.type = aType || null;
@ -100,17 +100,17 @@ ContactField.prototype = {
classInfo : XPCOMUtils.generateCI({classID: CONTACTFIELD_CID, classInfo : XPCOMUtils.generateCI({classID: CONTACTFIELD_CID,
contractID: CONTACTFIELD_CONTRACTID, contractID: CONTACTFIELD_CONTRACTID,
classDescription: "ContactField", classDescription: "ContactField",
interfaces: [nsIDOMContactField], interfaces: [nsIContactField],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactField]) QueryInterface : XPCOMUtils.generateQI([nsIContactField])
} }
//ContactTelField //ContactTelField
const CONTACTTELFIELD_CONTRACTID = "@mozilla.org/contactTelField;1"; const CONTACTTELFIELD_CONTRACTID = "@mozilla.org/contactTelField;1";
const CONTACTTELFIELD_CID = Components.ID("{ed0ab260-e4aa-11e1-9b23-0800200c9a66}"); const CONTACTTELFIELD_CID = Components.ID("{4d42c5a9-ea5d-4102-80c3-40cc986367ca}");
const nsIDOMContactTelField = Components.interfaces.nsIDOMContactTelField; const nsIContactTelField = Components.interfaces.nsIContactTelField;
function ContactTelField(aType, aValue, aCarrier) { function ContactTelField(aType, aValue, aCarrier) {
this.type = aType || null; this.type = aType || null;
@ -129,17 +129,17 @@ ContactTelField.prototype = {
classInfo : XPCOMUtils.generateCI({classID: CONTACTTELFIELD_CID, classInfo : XPCOMUtils.generateCI({classID: CONTACTTELFIELD_CID,
contractID: CONTACTTELFIELD_CONTRACTID, contractID: CONTACTTELFIELD_CONTRACTID,
classDescription: "ContactTelField", classDescription: "ContactTelField",
interfaces: [nsIDOMContactTelField], interfaces: [nsIContactTelField],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactTelField]) QueryInterface : XPCOMUtils.generateQI([nsIContactTelField])
} }
//ContactFindSortOptions //ContactFindSortOptions
const CONTACTFINDSORTOPTIONS_CONTRACTID = "@mozilla.org/contactFindSortOptions;1" const CONTACTFINDSORTOPTIONS_CONTRACTID = "@mozilla.org/contactFindSortOptions;1"
const CONTACTFINDSORTOPTIONS_CID = Components.ID("{cb008c06-3bf8-495c-8865-f9ca1673a1e1}"); const CONTACTFINDSORTOPTIONS_CID = Components.ID("{0a5b1fab-70da-46dd-b902-619904d920c2}");
const nsIDOMContactFindSortOptions = Ci.nsIDOMContactFindSortOptions; const nsIContactFindSortOptions = Ci.nsIContactFindSortOptions;
function ContactFindSortOptions () { } function ContactFindSortOptions () { }
@ -148,16 +148,16 @@ ContactFindSortOptions.prototype = {
classInfo: XPCOMUtils.generateCI({classID: CONTACTFINDSORTOPTIONS_CID, classInfo: XPCOMUtils.generateCI({classID: CONTACTFINDSORTOPTIONS_CID,
contractID: CONTACTFINDSORTOPTIONS_CONTRACTID, contractID: CONTACTFINDSORTOPTIONS_CONTRACTID,
classDescription: "ContactFindSortOptions", classDescription: "ContactFindSortOptions",
interfaces: [nsIDOMContactFindSortOptions], interfaces: [nsIContactFindSortOptions],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface: XPCOMUtils.generateQI([nsIDOMContactFindSortOptions]) QueryInterface: XPCOMUtils.generateQI([nsIContactFindSortOptions])
}; };
//ContactFindOptions //ContactFindOptions
const CONTACTFINDOPTIONS_CONTRACTID = "@mozilla.org/contactFindOptions;1"; const CONTACTFINDOPTIONS_CONTRACTID = "@mozilla.org/contactFindOptions;1";
const CONTACTFINDOPTIONS_CID = Components.ID("{e31daea0-0cb6-11e1-be50-0800200c9a66}"); const CONTACTFINDOPTIONS_CID = Components.ID("{28ce07d0-45d9-4b7a-8843-521df4edd8bc}");
const nsIDOMContactFindOptions = Components.interfaces.nsIDOMContactFindOptions; const nsIContactFindOptions = Components.interfaces.nsIContactFindOptions;
function ContactFindOptions() { }; function ContactFindOptions() { };
@ -167,18 +167,18 @@ ContactFindOptions.prototype = {
classInfo : XPCOMUtils.generateCI({classID: CONTACTFINDOPTIONS_CID, classInfo : XPCOMUtils.generateCI({classID: CONTACTFINDOPTIONS_CID,
contractID: CONTACTFINDOPTIONS_CONTRACTID, contractID: CONTACTFINDOPTIONS_CONTRACTID,
classDescription: "ContactFindOptions", classDescription: "ContactFindOptions",
interfaces: [nsIDOMContactFindSortOptions, interfaces: [nsIContactFindSortOptions,
nsIDOMContactFindOptions], nsIContactFindOptions],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface : XPCOMUtils.generateQI([nsIDOMContactFindSortOptions, QueryInterface : XPCOMUtils.generateQI([nsIContactFindSortOptions,
nsIDOMContactFindOptions]) nsIContactFindOptions])
} }
//Contact //Contact
const CONTACT_CONTRACTID = "@mozilla.org/contact;1"; 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; const nsIDOMContact = Components.interfaces.nsIDOMContact;
function Contact() { }; function Contact() { };
@ -329,16 +329,16 @@ Contact.prototype = {
classInfo : XPCOMUtils.generateCI({classID: CONTACT_CID, classInfo : XPCOMUtils.generateCI({classID: CONTACT_CID,
contractID: CONTACT_CONTRACTID, contractID: CONTACT_CONTRACTID,
classDescription: "Contact", classDescription: "Contact",
interfaces: [nsIDOMContact, nsIDOMContactProperties], interfaces: [nsIDOMContact, nsIContactProperties],
flags: nsIClassInfo.DOM_OBJECT}), flags: nsIClassInfo.DOM_OBJECT}),
QueryInterface : XPCOMUtils.generateQI([nsIDOMContact, nsIDOMContactProperties]) QueryInterface : XPCOMUtils.generateQI([nsIDOMContact, nsIContactProperties])
} }
// ContactManager // ContactManager
const CONTACTMANAGER_CONTRACTID = "@mozilla.org/contactManager;1"; 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; const nsIDOMContactManager = Components.interfaces.nsIDOMContactManager;
function ContactManager() function ContactManager()

Просмотреть файл

@ -1,25 +1,25 @@
component {f5181640-89e8-11e1-b0c4-0800200c9a66} ContactManager.js component {0a6720d7-9cae-4467-989d-e9e450e21341} ContactManager.js
contract @mozilla.org/contactProperties;1 {f5181640-89e8-11e1-b0c4-0800200c9a66} contract @mozilla.org/contactProperties;1 {0a6720d7-9cae-4467-989d-e9e450e21341}
component {eba48030-89e8-11e1-b0c4-0800200c9a66} ContactManager.js component {c5d6eb73-a079-4a9f-8cd5-618194f73b30} ContactManager.js
contract @mozilla.org/contactAddress;1 {eba48030-89e8-11e1-b0c4-0800200c9a66} contract @mozilla.org/contactAddress;1 {c5d6eb73-a079-4a9f-8cd5-618194f73b30}
component {e2cb19c0-e4aa-11e1-9b23-0800200c9a66} ContactManager.js component {474b8c6d-f984-431f-9636-e523ca3ec34d} ContactManager.js
contract @mozilla.org/contactField;1 {e2cb19c0-e4aa-11e1-9b23-0800200c9a66} contract @mozilla.org/contactField;1 {474b8c6d-f984-431f-9636-e523ca3ec34d}
component {ed0ab260-e4aa-11e1-9b23-0800200c9a66} ContactManager.js component {4d42c5a9-ea5d-4102-80c3-40cc986367ca} ContactManager.js
contract @mozilla.org/contactTelField;1 {ed0ab260-e4aa-11e1-9b23-0800200c9a66} contract @mozilla.org/contactTelField;1 {4d42c5a9-ea5d-4102-80c3-40cc986367ca}
component {cb008c06-3bf8-495c-8865-f9ca1673a1e1} ContactManager.js component {0a5b1fab-70da-46dd-b902-619904d920c2} ContactManager.js
contract @mozilla.org/contactFindSortOptions;1 {cb008c06-3bf8-495c-8865-f9ca1673a1e1} contract @mozilla.org/contactFindSortOptions;1 {0a5b1fab-70da-46dd-b902-619904d920c2}
component {e13ca4c5-c9cd-40bb-95e9-b636d42f5edf} ContactManager.js component {28ce07d0-45d9-4b7a-8843-521df4edd8bc} ContactManager.js
contract @mozilla.org/contactFindOptions;1 {e13ca4c5-c9cd-40bb-95e9-b636d42f5edf} contract @mozilla.org/contactFindOptions;1 {28ce07d0-45d9-4b7a-8843-521df4edd8bc}
component {da0f7040-388b-11e1-b86c-0800200c9a66} ContactManager.js component {72a5ee28-81d8-4af8-90b3-ae935396cc66} ContactManager.js
contract @mozilla.org/contact;1 {da0f7040-388b-11e1-b86c-0800200c9a66} contract @mozilla.org/contact;1 {72a5ee28-81d8-4af8-90b3-ae935396cc66}
category JavaScript-global-constructor mozContact @mozilla.org/contact;1 category JavaScript-global-constructor mozContact @mozilla.org/contact;1
component {1d70322b-f11b-4f19-9586-7bf291f212aa} ContactManager.js component {4efae3f8-dd69-4622-97c8-f16e4d38d95c} ContactManager.js
contract @mozilla.org/contactManager;1 {1d70322b-f11b-4f19-9586-7bf291f212aa} contract @mozilla.org/contactManager;1 {4efae3f8-dd69-4622-97c8-f16e4d38d95c}
category JavaScript-navigator-property mozContacts @mozilla.org/contactManager;1 category JavaScript-navigator-property mozContacts @mozilla.org/contactManager;1

Просмотреть файл

@ -6,7 +6,7 @@
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIDOMContactManager.idl', 'nsIDOMContactManager.idl',
'nsIDOMContactProperties.idl', 'nsIContactProperties.idl',
'nsIDOMMozContactChangeEvent.idl', 'nsIDOMMozContactChangeEvent.idl',
] ]

Просмотреть файл

@ -4,11 +4,8 @@
#include "domstubs.idl" #include "domstubs.idl"
interface nsIArray; [scriptable, uuid(c5d6eb73-a079-4a9f-8cd5-618194f73b30)]
interface nsIDOMContact; interface nsIContactAddress : nsISupports
[scriptable, uuid(eba48030-89e8-11e1-b0c4-0800200c9a66)]
interface nsIDOMContactAddress : nsISupports
{ {
attribute DOMString type; attribute DOMString type;
attribute DOMString streetAddress; attribute DOMString streetAddress;
@ -18,28 +15,28 @@ interface nsIDOMContactAddress : nsISupports
attribute DOMString countryName; attribute DOMString countryName;
}; };
[scriptable, uuid(e2cb19c0-e4aa-11e1-9b23-0800200c9a66)] [scriptable, uuid(474b8c6d-f984-431f-9636-e523ca3ec34d)]
interface nsIDOMContactField : nsISupports interface nsIContactField : nsISupports
{ {
attribute jsval type; // DOMString[] for primary/favorite (use:"PREF"), "home", "work", etc. attribute jsval type; // DOMString[] for primary/favorite (use:"PREF"), "home", "work", etc.
attribute DOMString value; attribute DOMString value;
}; };
[scriptable, uuid(ed0ab260-e4aa-11e1-9b23-0800200c9a66)] [scriptable, uuid(4d42c5a9-ea5d-4102-80c3-40cc986367ca)]
interface nsIDOMContactTelField : nsIDOMContactField interface nsIContactTelField : nsIContactField
{ {
attribute DOMString carrier; attribute DOMString carrier;
}; };
[scriptable, uuid(cb008c06-3bf8-495c-8865-f9ca1673a1e1)] [scriptable, uuid(0a5b1fab-70da-46dd-b902-619904d920c2)]
interface nsIDOMContactFindSortOptions : nsISupports interface nsIContactFindSortOptions : nsISupports
{ {
attribute DOMString sortBy; // "givenName" or "familyName" attribute DOMString sortBy; // "givenName" or "familyName"
attribute DOMString sortOrder; // e.g. "descending" attribute DOMString sortOrder; // e.g. "descending"
}; };
[scriptable, uuid(e13ca4c5-c9cd-40bb-95e9-b636d42f5edf)] [scriptable, uuid(28ce07d0-45d9-4b7a-8843-521df4edd8bc)]
interface nsIDOMContactFindOptions : nsIDOMContactFindSortOptions interface nsIContactFindOptions : nsIContactFindSortOptions
{ {
attribute DOMString filterValue; // e.g. "Tom" attribute DOMString filterValue; // e.g. "Tom"
attribute DOMString filterOp; // e.g. "contains" attribute DOMString filterOp; // e.g. "contains"
@ -47,8 +44,8 @@ interface nsIDOMContactFindOptions : nsIDOMContactFindSortOptions
attribute unsigned long filterLimit; attribute unsigned long filterLimit;
}; };
[scriptable, uuid(f0ddb360-e4aa-11e1-9b23-0800200c9a66)] [scriptable, uuid(0a6720d7-9cae-4467-989d-e9e450e21341)]
interface nsIDOMContactProperties : nsISupports interface nsIContactProperties : nsISupports
{ {
attribute jsval name; // DOMString[] attribute jsval name; // DOMString[]
attribute jsval honorificPrefix; // DOMString[] attribute jsval honorificPrefix; // DOMString[]

Просмотреть файл

@ -3,32 +3,29 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "domstubs.idl" #include "domstubs.idl"
#include "nsIDOMContactProperties.idl" #include "nsIContactProperties.idl"
#include "nsIDOMEventTarget.idl" #include "nsIDOMEventTarget.idl"
interface nsIArray; interface nsIArray;
interface nsIDOMContactFindSortOptions;
interface nsIDOMContactFindOptions;
interface nsIDOMContactProperties;
interface nsIDOMDOMRequest; interface nsIDOMDOMRequest;
interface nsIDOMDOMCursor; interface nsIDOMDOMCursor;
[scriptable, uuid(da0f7040-388b-11e1-b86c-0800200c9a66)] [scriptable, uuid(72a5ee28-81d8-4af8-90b3-ae935396cc66)]
interface nsIDOMContact : nsIDOMContactProperties interface nsIDOMContact : nsIContactProperties
{ {
attribute DOMString id; attribute DOMString id;
readonly attribute jsval published; readonly attribute jsval published;
readonly attribute jsval updated; 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 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(); 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> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=766694">Mozilla Bug 766694</a>
<p id="display"></p> <p id="display"></p>
<div id="content" style="display: none"> <div id="content" style="display: none">
</div> </div>
<pre id="test"> <pre id="test">
<script type="application/javascript"> <script type="application/javascript">
@ -186,7 +186,6 @@ var interfaceNamesInGlobalScope =
"XULDocument", "XULDocument",
"XULMultiSelectControlElement", "XULMultiSelectControlElement",
"SVGTitleElement", "SVGTitleElement",
"ContactProperties",
"PerformanceTiming", "PerformanceTiming",
"LSProgressEvent", "LSProgressEvent",
"NSEvent", "NSEvent",
@ -237,7 +236,6 @@ var interfaceNamesInGlobalScope =
"HTMLCanvasElement", "HTMLCanvasElement",
"MouseEvent", "MouseEvent",
"OfflineResourceList", "OfflineResourceList",
"ContactAddress",
"Range", "Range",
"MozCSSKeyframeRule", "MozCSSKeyframeRule",
"SettingsLock", "SettingsLock",
@ -410,8 +408,6 @@ var interfaceNamesInGlobalScope =
"XULMenuListElement", "XULMenuListElement",
"SVGTransform", "SVGTransform",
"SVGTextPositioningElement", "SVGTextPositioningElement",
"ContactFindSortOptions",
"ContactFindOptions",
"SVGFEMergeElement", "SVGFEMergeElement",
"FileRequest", "FileRequest",
"SVGDefsElement", "SVGDefsElement",
@ -507,8 +503,6 @@ var interfaceNamesInGlobalScope =
"EventTarget", "EventTarget",
"File", "File",
"SVGGradientElement", "SVGGradientElement",
"ContactTelField",
"ContactField",
"SVGFitToViewBox", "SVGFitToViewBox",
"SVGAElement", "SVGAElement",
"NavigatorCamera", "NavigatorCamera",
@ -559,7 +553,7 @@ for (var i in SpecialPowers.Components.interfaces) {
name = s.substring("nsIDOM".length); name = s.substring("nsIDOM".length);
} else if (s.indexOf("nsI") == 0) { } else if (s.indexOf("nsI") == 0) {
name = s.substring("nsI".length); name = s.substring("nsI".length);
} }
if (name && (name in window)) { if (name && (name in window)) {
ok(interfaceNamesInGlobalScope.indexOf(name) >= 0, ok(interfaceNamesInGlobalScope.indexOf(name) >= 0,
"Unexpected interface name in global scope: " + name); "Unexpected interface name in global scope: " + name);