author | Peter Van der Beken <peterv@propagandism.org> |
Thu, 22 Nov 2012 12:09:43 +0100 | |
changeset 114365 | 67e95e421678221c8d8532860ef990af49d73249 |
parent 114364 | 33b2ec1bc7f37e943d33d251512c28756da1ef86 |
child 114366 | a8c28e8d114a097e63939c7c9497a84af66a38fc |
push id | 23917 |
push user | emorley@mozilla.com |
push date | Thu, 29 Nov 2012 14:20:29 +0000 |
treeherder | mozilla-central@c72d38e7a212 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz |
bugs | 814195 |
milestone | 20.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
|
--- a/content/base/public/Element.h +++ b/content/base/public/Element.h @@ -525,17 +525,17 @@ public: { GetAttr(kNameSpaceID_None, nsGkAtoms::id, aId); } void SetId(const nsAString& aId) { SetAttr(kNameSpaceID_None, nsGkAtoms::id, aId, true); } - nsDOMTokenList* ClassList(); + nsDOMTokenList* GetClassList(); nsDOMAttributeMap* GetAttributes() { nsDOMSlots *slots = DOMSlots(); if (!slots->mAttributeMap) { slots->mAttributeMap = new nsDOMAttributeMap(this); } return slots->mAttributeMap;
--- a/content/base/src/Element.cpp +++ b/content/base/src/Element.cpp @@ -442,34 +442,34 @@ Element::GetLastElementChild() const return child->AsElement(); } } return nullptr; } nsDOMTokenList* -Element::ClassList() +Element::GetClassList() { Element::nsDOMSlots *slots = DOMSlots(); if (!slots->mClassList) { - nsCOMPtr<nsIAtom> classAttr = GetClassAttributeName(); + nsIAtom* classAttr = GetClassAttributeName(); if (classAttr) { slots->mClassList = new nsDOMTokenList(this, classAttr); } } return slots->mClassList; } void Element::GetClassList(nsIDOMDOMTokenList** aClassList) { - NS_IF_ADDREF(*aClassList = ClassList()); + NS_IF_ADDREF(*aClassList = GetClassList()); } already_AddRefed<nsIHTMLCollection> Element::GetElementsByTagName(const nsAString& aLocalName) { return NS_GetContentList(this, kNameSpaceID_Unknown, aLocalName); }
--- a/content/base/src/nsContentList.h +++ b/content/base/src/nsContentList.h @@ -255,17 +255,17 @@ public: void* aData, bool aDeep = true, nsIAtom* aMatchAtom = nullptr, int32_t aMatchNameSpaceId = kNameSpaceID_None, bool aFuncMayDependOnAttr = true); virtual ~nsContentList(); // nsWrapperCache - using nsWrapperCache::GetWrapper; + using nsWrapperCache::GetWrapperPreserveColor; virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); // nsIDOMHTMLCollection NS_DECL_NSIDOMHTMLCOLLECTION // nsBaseContentList overrides virtual int32_t IndexOf(nsIContent *aContent, bool aDoFlush);
--- a/content/html/content/public/nsIHTMLCollection.h +++ b/content/html/content/public/nsIHTMLCollection.h @@ -65,21 +65,21 @@ public: { JSObject* namedItem = NamedItem(cx, name, error); found = !!namedItem; return namedItem; } virtual void GetSupportedNames(nsTArray<nsString>& aNames) = 0; - JSObject* GetWrapper() + JSObject* GetWrapperPreserveColor() { nsWrapperCache* cache; CallQueryInterface(this, &cache); - return cache->GetWrapper(); + return cache->GetWrapperPreserveColor(); } virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLCollection, NS_IHTMLCOLLECTION_IID) #endif /* nsIHTMLCollection_h___ */
--- a/content/html/content/src/HTMLPropertiesCollection.h +++ b/content/html/content/src/HTMLPropertiesCollection.h @@ -53,17 +53,17 @@ class HTMLPropertiesCollection : public public nsWrapperCache { friend class PropertyNodeList; friend class PropertyStringList; public: HTMLPropertiesCollection(nsGenericHTMLElement* aRoot); virtual ~HTMLPropertiesCollection(); - using nsWrapperCache::GetWrapper; + using nsWrapperCache::GetWrapperPreserveColor; virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); virtual Element* GetElementAt(uint32_t aIndex); NS_IMETHOD NamedItem(const nsAString& aName, nsIDOMNode** aResult); void SetDocument(nsIDocument* aDocument); nsINode* GetParentObject();
--- a/content/html/content/test/reflect.js +++ b/content/html/content/test/reflect.js @@ -43,19 +43,19 @@ function reflectString(aParameters) is(element[idlAttr], "", "When not set, the IDL attribute should return the empty string"); /** * TODO: as long as null stringification doesn't follow the WebIDL * specifications, don't add it to the loop below and keep it here. */ element.setAttribute(contentAttr, null); - todo_is(element.getAttribute(contentAttr), "null", + is(element.getAttribute(contentAttr), "null", "null should have been stringified to 'null'"); - todo_is(element[idlAttr], "null", + is(element[idlAttr], "null", "null should have been stringified to 'null'"); element.removeAttribute(contentAttr); element[idlAttr] = null; // TODO: remove this ugly hack when null stringification will work as expected. if (element.localName == "textarea" && idlAttr == "wrap") { is(element.getAttribute(contentAttr), "null", "null should have been stringified to 'null'"); @@ -418,24 +418,18 @@ function reflectBoolean(aParameters) result: true }, { value: { }, stringified: "[object Object]", result: true }, ]; valuesToTest.forEach(function(v) { element.setAttribute(contentAttr, v.value); is(element[idlAttr], true, "IDL attribute should return always return 'true' if the content attribute has been set"); - if (v.value === null) { - // bug 667856 - todo(element.getAttribute(contentAttr), v.stringified, - "Content attribute should return the stringified value it has been set to."); - } else { - is(element.getAttribute(contentAttr), v.stringified, - "Content attribute should return the stringified value it has been set to."); - } + is(element.getAttribute(contentAttr), v.stringified, + "Content attribute should return the stringified value it has been set to."); element.removeAttribute(contentAttr); element[idlAttr] = v.value; is(element[idlAttr], v.result, "IDL attribute should return " + v.result); is(element.getAttribute(contentAttr), v.result ? "" : null, v.result ? "Content attribute should return the empty string." : "Content attribute should return null."); is(element.hasAttribute(contentAttr), v.result, @@ -460,17 +454,17 @@ function reflectBoolean(aParameters) * - attribute String name of the attribute * - nonNegative Boolean true if the attribute is limited to 'non-negative numbers', false otherwise * - defaultValue Integer [optional] default value, if one exists */ function reflectInt(aParameters) { // Expected value returned by .getAttribute() when |value| has been previously passed to .setAttribute(). function expectedGetAttributeResult(value) { - return (value !== null) ? String(value) : ""; + return String(value); } function stringToInteger(value, nonNegative, defaultValue) { // Parse: Ignore leading whitespace, find [+/-][numbers] var result = /^[ \t\n\f\r]*([\+\-]?[0-9]+)/.exec(value); if (result) { if ((nonNegative ? 0:-0x80000000) <= result[1] && result[1] <= 0x7FFFFFFF) { // If the value is within allowed value range for signed/unsigned integer, return value
--- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -189,16 +189,30 @@ DOMInterfaces = { { 'resultNotAddRefed': [ 'threshold', 'knee', 'ratio', 'reduction', 'attack', 'release' ], 'binaryNames': { 'release': 'getRelease' } }], +'Element': { + # 'prefable' is True because some nodes are not on new bindings yet, so the + # wrapping code for Element return values needs to fall back to XPConnect as + # needed. + 'prefable': True, + 'hasXPConnectImpls': True, + 'hasInstanceInterface': 'nsIDOMElement', + 'resultNotAddRefed': [ + 'classList', 'attributes', 'children', 'firstElementChild', + 'lastElementChild', 'previousElementSibling', 'nextElementSibling', + 'getAttributeNode', 'getAttributeNodeNS' + ] +}, + 'Event': [ { 'workers': True, }], 'EventListener': [ { 'workers': True, @@ -719,17 +733,16 @@ addExternalIface('Attr') addExternalIface('CanvasGradient', headerFile='nsIDOMCanvasRenderingContext2D.h') addExternalIface('CanvasPattern', headerFile='nsIDOMCanvasRenderingContext2D.h') addExternalIface('ClientRect') addExternalIface('CSSRule') addExternalIface('CSSValue') addExternalIface('DocumentType', nativeType='nsIDOMDocumentType') addExternalIface('DOMStringList', nativeType='nsDOMStringList', headerFile='nsDOMLists.h') -addExternalIface('Element', nativeType='mozilla::dom::Element') addExternalIface('File') addExternalIface('HitRegionOptions', nativeType='nsISupports') addExternalIface('HTMLElement') addExternalIface('MediaStream') addExternalIface('NamedNodeMap') addExternalIface('PaintRequest') addExternalIface('Principal', nativeType='nsIPrincipal', headerFile='nsIPrincipal.h', notflattened=True)
--- a/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json +++ b/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json @@ -149,44 +149,25 @@ "DocumentType interface: attribute publicId": true, "DocumentType interface: attribute systemId": true, "DocumentType interface: operation remove()": true, "Stringification of document.doctype": "debug", "DocumentType interface: document.doctype must inherit property \"remove\" with the proper type (3)": true, "EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.doctype with too few arguments must throw TypeError": true, "EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.doctype with too few arguments must throw TypeError": true, "EventTarget interface: calling dispatchEvent(Event) on document.doctype with too few arguments must throw TypeError": true, - "Element interface: existence and properties of interface object": true, - "Element interface: existence and properties of interface prototype object": true, - "Element interface: existence and properties of interface prototype object's \"constructor\" property": true, - "Element interface: attribute tagName": true, - "Element interface: attribute id": true, + "Element interface: attribute namespaceURI": true, + "Element interface: attribute prefix": true, + "Element interface: attribute localName": true, "Element interface: attribute className": true, - "Element interface: attribute classList": true, - "Element interface: attribute children": true, - "Element interface: attribute firstElementChild": true, - "Element interface: attribute lastElementChild": true, - "Element interface: attribute previousElementSibling": true, - "Element interface: attribute nextElementSibling": true, - "Element interface: attribute childElementCount": true, + "Element interface: attribute attributes": true, "Element interface: operation remove()": true, + "Element must be primary interface of element": true, "Stringification of element": "debug", - "Element interface: element must inherit property \"id\" with the proper type (4)": true, "Element interface: element must inherit property \"className\" with the proper type (5)": true, - "Element interface: calling getAttribute(DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling getAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling setAttribute(DOMString,DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling setAttributeNS(DOMString,DOMString,DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling removeAttribute(DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling removeAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling hasAttribute(DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling hasAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling getElementsByTagName(DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling getElementsByTagNameNS(DOMString,DOMString) on element with too few arguments must throw TypeError": true, - "Element interface: calling getElementsByClassName(DOMString) on element with too few arguments must throw TypeError": true, "Element interface: element must inherit property \"remove\" with the proper type (25)": true, "EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on element with too few arguments must throw TypeError": true, "EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on element with too few arguments must throw TypeError": true, "EventTarget interface: calling dispatchEvent(Event) on element with too few arguments must throw TypeError": true, "Attr interface: existence and properties of interface object": true, "Attr interface: existence and properties of interface prototype object": true, "Attr interface: existence and properties of interface prototype object's \"constructor\" property": true, "Attr interface: attribute name": true,
--- a/dom/webidl/Element.webidl +++ b/dom/webidl/Element.webidl @@ -27,17 +27,17 @@ interface Element : Node { */ readonly attribute DOMString tagName; attribute DOMString id; /* FIXME Bug 810677 Move className from HTMLElement to Element attribute DOMString className; */ - readonly attribute DOMTokenList classList; + readonly attribute DOMTokenList? classList; //readonly attribute Attr[] attributes; DOMString? getAttribute(DOMString name); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); [Throws] void setAttribute(DOMString name, DOMString value); [Throws] void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); @@ -69,16 +69,23 @@ interface Element : Node { void before((Node or DOMString)... nodes); void after((Node or DOMString)... nodes); void replace((Node or DOMString)... nodes); void remove(); */ // Mozilla specific stuff + [SetterThrows,LenientThis] + attribute EventHandler onmouseenter; + [SetterThrows,LenientThis] + attribute EventHandler onmouseleave; + [SetterThrows] + attribute EventHandler onwheel; + // Selectors API /** * Returns whether this element would be selected by the given selector * string. * * See <http://dev.w3.org/2006/webapi/selectors-api2/#matchesselector> */ [Throws] @@ -120,17 +127,17 @@ interface Element : Node { // Obsolete methods. Attr getAttributeNode(DOMString name); [Throws] Attr setAttributeNode(Attr newAttr); [Throws] Attr removeAttributeNode(Attr oldAttr); [Throws] - Attr getAttributeNodeNS(DOMString namespaceURI, DOMString localName); + Attr getAttributeNodeNS(DOMString? namespaceURI, DOMString localName); [Throws] Attr setAttributeNodeNS(Attr newAttr); /* }; // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface partial interface Element { */
--- a/dom/webidl/HTMLElement.webidl +++ b/dom/webidl/HTMLElement.webidl @@ -196,23 +196,16 @@ interface HTMLElement : Element { attribute EventHandler onmozpointerlockchange; [SetterThrows] attribute EventHandler onmozpointerlockerror; // Mozilla specific stuff // FIXME Bug 810677 Move className from HTMLElement to Element attribute DOMString className; - [SetterThrows,LenientThis] - attribute EventHandler onmouseenter; - [SetterThrows,LenientThis] - attribute EventHandler onmouseleave; - [SetterThrows] - attribute EventHandler onwheel; - [SetterThrows,Pref="dom.w3c_touch_events.expose"] attribute EventHandler ontouchstart; [SetterThrows,Pref="dom.w3c_touch_events.expose"] attribute EventHandler ontouchend; [SetterThrows,Pref="dom.w3c_touch_events.expose"] attribute EventHandler ontouchmove; [SetterThrows,Pref="dom.w3c_touch_events.expose"] attribute EventHandler ontouchenter;
--- a/dom/webidl/WebIDL.mk +++ b/dom/webidl/WebIDL.mk @@ -23,16 +23,17 @@ webidl_files = \ ClientRectList.webidl \ CSSStyleDeclaration.webidl \ DelayNode.webidl \ DOMImplementation.webidl \ DOMTokenList.webidl \ DOMSettableTokenList.webidl \ DOMStringMap.webidl \ DynamicsCompressorNode.webidl \ + Element.webidl \ EventHandler.webidl \ EventListener.webidl \ EventTarget.webidl \ FileList.webidl \ FileReaderSync.webidl \ Function.webidl \ GainNode.webidl \ HTMLCollection.webidl \
--- a/js/xpconnect/src/dom_quickstubs.qsconf +++ b/js/xpconnect/src/dom_quickstubs.qsconf @@ -90,50 +90,16 @@ members = [ # case for security. #'nsIDOMDocument.location', 'nsIDOMDocument.elementFromPoint', 'nsIDOMDocument.activeElement', 'nsIDOMDocument.onreadystatechange', 'nsIDOMDocument.onmouseenter', 'nsIDOMDocument.onmouseleave', 'nsIDOMDocument.URL', - 'nsIDOMElement.removeAttributeNS', - 'nsIDOMElement.removeAttribute', - 'nsIDOMElement.getAttribute', - 'nsIDOMElement.getElementsByTagName', - 'nsIDOMElement.setAttribute', - 'nsIDOMElement.getElementsByTagNameNS', - 'nsIDOMElement.hasAttributeNS', - 'nsIDOMElement.tagName', - 'nsIDOMElement.setAttributeNS', - 'nsIDOMElement.hasAttribute', - 'nsIDOMElement.getAttributeNS', - 'nsIDOMElement.onmouseenter', - 'nsIDOMElement.onmouseleave', - 'nsIDOMElement.getElementsByClassName', - 'nsIDOMElement.getClientRects', - 'nsIDOMElement.getBoundingClientRect', - 'nsIDOMElement.scrollTop', - 'nsIDOMElement.scrollLeft', - 'nsIDOMElement.scrollHeight', - 'nsIDOMElement.scrollWidth', - 'nsIDOMElement.clientTop', - 'nsIDOMElement.clientLeft', - 'nsIDOMElement.clientHeight', - 'nsIDOMElement.clientWidth', - 'nsIDOMElement.firstElementChild', - 'nsIDOMElement.lastElementChild', - 'nsIDOMElement.previousElementSibling', - 'nsIDOMElement.nextElementSibling', - 'nsIDOMElement.childElementCount', - 'nsIDOMElement.children', - 'nsIDOMElement.classList', - 'nsIDOMElement.setCapture', - 'nsIDOMElement.releaseCapture', - 'nsIDOMElement.mozMatchesSelector', 'nsIDOMNamedNodeMap.item', 'nsIDOMNamedNodeMap.length', 'nsIDOMNodeSelector.querySelector', 'nsIDOMNodeSelector.querySelectorAll', 'nsIDOMText.splitText', 'nsIDOMDOMStringList.*', 'nsIDOMXULDocument.getBoxObjectFor', 'nsIDOMMutationRecord.*', @@ -478,17 +444,18 @@ customIncludes = [ 'nsGenericHTMLElement.h', 'nsSVGStylableElement.h', 'nsHTMLDocument.h', 'nsDOMQS.h', 'nsDOMStringMap.h', 'HTMLPropertiesCollection.h', 'nsHTMLMenuElement.h', 'nsICSSDeclaration.h', - 'mozilla/dom/NodeBinding.h' + 'mozilla/dom/NodeBinding.h', + 'mozilla/dom/ElementBinding.h' ] customReturnInterfaces = [ 'nsIDOMCanvasPattern', 'nsIDOMCanvasGradient', ] nsIDOMHTMLDocument_Write_customMethodCallCode = """ @@ -538,111 +505,16 @@ customMethodCalls = { 'thisType': 'nsHTMLDocument', 'code': ' nsRefPtr<nsContentList> result = ' 'self->GetElementsByName(arg0);', 'canFail': False }, 'nsIDOMStorage_Clear': { 'code': nsIDOMStorage_Clear_customMethodCallCode }, - 'nsIDOMElement_GetScrollTop': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ScrollTop();', - 'canFail': False - }, - 'nsIDOMElement_SetScrollTop': { - 'thisType': 'mozilla::dom::Element', - 'canFail': False - }, - 'nsIDOMElement_GetScrollLeft': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ScrollLeft();', - 'canFail': False - }, - 'nsIDOMElement_SetScrollLeft': { - 'thisType': 'mozilla::dom::Element', - 'canFail': False - }, - 'nsIDOMElement_GetScrollHeight': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ScrollHeight();', - 'canFail': False - }, - 'nsIDOMElement_GetScrollWidth': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ScrollWidth();', - 'canFail': False - }, - 'nsIDOMElement_GetClientTop': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ClientTop();', - 'canFail': False - }, - 'nsIDOMElement_SetClientTop': { - 'thisType': 'mozilla::dom::Element', - 'canFail': False - }, - 'nsIDOMElement_GetClientLeft': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ClientLeft();', - 'canFail': False - }, - 'nsIDOMElement_SetClientLeft': { - 'thisType': 'mozilla::dom::Element', - 'canFail': False - }, - 'nsIDOMElement_GetClientHeight': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ClientHeight();', - 'canFail': False - }, - 'nsIDOMElement_GetClientWidth': { - 'thisType': 'mozilla::dom::Element', - 'code': ' int32_t result = self->ClientWidth();', - 'canFail': False - }, - 'nsIDOMElement_GetFirstElementChild': { - 'thisType': 'mozilla::dom::Element', - 'code': ' nsIContent *result = self->GetFirstElementChild();', - 'canFail': False - }, - 'nsIDOMElement_GetLastElementChild': { - 'thisType': 'mozilla::dom::Element', - 'code': ' nsIContent *result = self->GetLastElementChild();', - 'canFail': False - }, - 'nsIDOMElement_GetPreviousElementSibling': { - 'thisType': 'mozilla::dom::Element', - 'code': ' nsIContent *result = self->GetPreviousElementSibling();', - 'canFail': False - }, - 'nsIDOMElement_GetNextElementSibling': { - 'thisType': 'mozilla::dom::Element', - 'code': ' nsIContent *result = self->GetNextElementSibling();', - 'canFail': False - }, - 'nsIDOMElement_GetClassList': { - 'thisType': 'mozilla::dom::Element', - 'code': ' nsDOMTokenList *result = self->ClassList();', - 'canFail': False - }, - 'nsIDOMElement_SetCapture': { - 'thisType': 'mozilla::dom::Element', - 'canFail': False - }, - 'nsIDOMElement_ReleaseCapture': { - 'thisType': 'mozilla::dom::Element', - 'canFail': False - }, - 'nsIDOMElement_MozMatchesSelector': { - 'thisType': 'mozilla::dom::Element', - 'code': ' mozilla::ErrorResult error;\n' - ' bool result = self->MozMatchesSelector(arg0, error);\n' - ' rv = error.ErrorCode();' - }, 'nsIDOMNodeSelector_QuerySelector': { 'thisType': 'nsINode', 'code': ' mozilla::ErrorResult error;\n' ' nsIContent* result = ' 'self->QuerySelector(arg0, error);\n' ' rv = error.ErrorCode();' }, 'nsIDOMNodeSelector_QuerySelectorAll': { @@ -734,24 +606,16 @@ customMethodCalls = { 'canFail': False }, 'nsIDOMDocument_GetElementsByTagNameNS': { 'thisType': 'nsDocument', 'code': ' nsRefPtr<nsContentList> result =' 'self->GetElementsByTagNameNS(arg0, arg1);', 'canFail': False }, - 'nsIDOMElement_': { - 'thisType': 'mozilla::dom::Element' - }, - 'nsIDOMElement_GetTagName': { - 'thisType': 'mozilla::dom::Element', - 'code': 'nsString result = self->NodeName();', - 'canFail': False - }, 'nsIDOMDocument_CreateElement': { 'thisType': 'nsDocument', 'code': ' nsCOMPtr<nsIContent> result;\n' ' rv = self->CreateElement(arg0, getter_AddRefs(result));' }, 'nsIDOMDocument_CreateElementNS': { 'thisType': 'nsDocument', 'code': ' nsCOMPtr<nsIContent> result;\n' @@ -781,104 +645,16 @@ customMethodCalls = { 'nsIDOMDocument_GetOnmouseleave' : { 'thisType' : 'nsDocument', 'unwrapThisFailureFatal' : False }, 'nsIDOMDocument_SetOnmouseleave' : { 'thisType' : 'nsDocument', 'unwrapThisFailureFatal' : False }, - 'nsIDOMElement_GetOnmouseenter' : { - 'thisType' : 'mozilla::dom::Element', - 'unwrapThisFailureFatal' : False - }, - 'nsIDOMElement_SetOnmouseenter' : { - 'thisType' : 'mozilla::dom::Element', - 'unwrapThisFailureFatal' : False - }, - 'nsIDOMElement_GetOnmouseleave' : { - 'thisType' : 'mozilla::dom::Element', - 'unwrapThisFailureFatal' : False - }, - 'nsIDOMElement_SetOnmouseleave' : { - 'thisType' : 'mozilla::dom::Element', - 'unwrapThisFailureFatal' : False - }, - 'nsIDOMElement_RemoveAttributeNS' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' mozilla::ErrorResult error;\n' - ' self->RemoveAttributeNS(arg0, arg1, error);\n' - ' rv = error.ErrorCode();' - }, - 'nsIDOMElement_RemoveAttribute' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' mozilla::ErrorResult error;\n' - ' self->RemoveAttribute(arg0, error);\n' - ' rv = error.ErrorCode();' - }, - 'nsIDOMElement_GetAttribute' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' nsString result;\n' - ' self->GetAttribute(arg0, result);', - 'canFail': False - }, - 'nsIDOMElement_GetAttributeNS' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' nsString result;\n' - ' self->GetAttributeNS(arg0, arg1, result);', - 'canFail': False - }, - 'nsIDOMElement_SetAttribute' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' mozilla::ErrorResult error;\n' - ' self->SetAttribute(arg0, arg1, error);\n' - ' rv = error.ErrorCode();' - }, - 'nsIDOMElement_SetAttributeNS' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' mozilla::ErrorResult error;\n' - ' self->SetAttributeNS(arg0, arg1, arg2, error);\n' - ' rv = error.ErrorCode();' - }, - 'nsIDOMElement_HasAttribute' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' bool result = self->HasAttribute(arg0);', - 'canFail': False - }, - 'nsIDOMElement_HasAttributeNS' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' bool result = self->HasAttributeNS(arg0, arg1);', - 'canFail': False - }, - 'nsIDOMElement_GetElementsByTagName' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' nsCOMPtr<nsIHTMLCollection> result = self->GetElementsByTagName(arg0);', - 'canFail': False - }, - 'nsIDOMElement_GetClientRects' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' mozilla::ErrorResult error;\n' - ' nsRefPtr<nsClientRectList> result = self->GetClientRects(error);\n' - ' rv = error.ErrorCode();' - }, - 'nsIDOMElement_GetBoundingClientRect' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' nsRefPtr<nsClientRect> result = self->GetBoundingClientRect();', - 'canFail': False - }, - 'nsIDOMElement_GetChildElementCount' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' uint32_t result = self->ChildElementCount();', - 'canFail': False - }, - 'nsIDOMElement_GetChildElements' : { - 'thisType' : 'mozilla::dom::Element', - 'code': ' nsIHTMLCollection* result = self->Children();', - 'canFail': False - }, 'nsIDOMHTMLElement_GetTitle': { 'thisType' : 'nsGenericHTMLElement', 'canFail': False }, 'nsIDOMHTMLElement_SetTitle': { 'thisType' : 'nsGenericHTMLElement', 'canFail': False }, @@ -1050,10 +826,11 @@ customMethodCalls = { }, 'nsIDOMWindow_SetOnmouseleave' : { 'thisType' : 'nsIDOMWindow', 'unwrapThisFailureFatal' : False } } newBindingProperties = { - 'nsIDOMNode': 'mozilla::dom::NodeBinding::sNativePropertyHooks.mNativeProperties.regular' + 'nsIDOMNode': 'mozilla::dom::NodeBinding::sNativePropertyHooks.mNativeProperties.regular', + 'nsIDOMElement': 'mozilla::dom::ElementBinding::sNativePropertyHooks.mNativeProperties.regular' }
--- a/toolkit/components/prompts/src/CommonDialog.jsm +++ b/toolkit/components/prompts/src/CommonDialog.jsm @@ -214,17 +214,18 @@ CommonDialog.prototype = { // Need to set this after aNode.setAttribute("value", aLabel); if (accessKey) aNode.accessKey = accessKey; }, initTextbox : function (aName, aValue) { this.ui[aName + "Container"].hidden = false; - this.ui[aName + "Textbox"].setAttribute("value", aValue); + this.ui[aName + "Textbox"].setAttribute("value", + aValue !== null ? aValue : ""); }, setButtonsEnabledState : function(enabled) { this.ui.button0.disabled = !enabled; // button1 (cancel) remains enabled. this.ui.button2.disabled = !enabled; this.ui.button3.disabled = !enabled; },
--- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -2508,17 +2508,17 @@ var gDetailView = { // If the search category isn't selected then make sure to select the // correct category if (gCategories.selected != "addons://search/") gCategories.select("addons://list/" + aAddon.type); document.getElementById("detail-name").textContent = aAddon.name; var icon = aAddon.icon64URL ? aAddon.icon64URL : aAddon.iconURL; - document.getElementById("detail-icon").src = icon ? icon : null; + document.getElementById("detail-icon").src = icon ? icon : ""; document.getElementById("detail-creator").setCreator(aAddon.creator, aAddon.homepageURL); var version = document.getElementById("detail-version"); if (shouldShowVersionNumber(aAddon)) { version.hidden = false; version.value = aAddon.version; } else { version.hidden = true;