Bug 1403231 - Remove the "image" XBL binding. r=bz,bgrins
MozReview-Commit-ID: 3pI7jZovUX6
--- a/dom/interfaces/xul/moz.build
+++ b/dom/interfaces/xul/moz.build
@@ -12,17 +12,16 @@ XPIDL_SOURCES += [
'nsIDOMXULCheckboxElement.idl',
'nsIDOMXULCommandDispatcher.idl',
'nsIDOMXULCommandEvent.idl',
'nsIDOMXULContainerElement.idl',
'nsIDOMXULControlElement.idl',
'nsIDOMXULDescriptionElement.idl',
'nsIDOMXULDocument.idl',
'nsIDOMXULElement.idl',
- 'nsIDOMXULImageElement.idl',
'nsIDOMXULLabeledControlEl.idl',
'nsIDOMXULLabelElement.idl',
'nsIDOMXULMenuListElement.idl',
'nsIDOMXULMultSelectCntrlEl.idl',
'nsIDOMXULPopupElement.idl',
'nsIDOMXULRelatedElement.idl',
'nsIDOMXULSelectCntrlEl.idl',
'nsIDOMXULSelectCntrlItemEl.idl',
deleted file mode 100644
--- a/dom/interfaces/xul/nsIDOMXULImageElement.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 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 "nsIDOMElement.idl"
-#include "nsIDOMXULElement.idl"
-
-[scriptable, uuid(0a391077-c509-49d2-af73-72e2114edd65)]
-interface nsIDOMXULImageElement : nsISupports {
- attribute DOMString src;
-};
-
--- a/dom/webidl/XULElement.webidl
+++ b/dom/webidl/XULElement.webidl
@@ -75,16 +75,20 @@ interface XULElement : Element {
attribute DOMString ref;
// Tooltip and status info
[SetterThrows]
attribute DOMString tooltipText;
[SetterThrows]
attribute DOMString statusText;
+ // Properties for images
+ [SetterThrows]
+ attribute DOMString src;
+
attribute boolean allowEvents;
readonly attribute MozRDFCompositeDataSource? database;
readonly attribute XULTemplateBuilder? builder;
[Throws]
readonly attribute MozRDFResource? resource;
[Throws, ChromeOnly]
readonly attribute XULControllers controllers;
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -659,16 +659,24 @@ public:
void GetStatusText(DOMString& aValue) const
{
GetXULAttr(nsGkAtoms::statustext, aValue);
}
void SetStatusText(const nsAString& aValue, mozilla::ErrorResult& rv)
{
SetXULAttr(nsGkAtoms::statustext, aValue, rv);
}
+ void GetSrc(DOMString& aValue) const
+ {
+ GetXULAttr(nsGkAtoms::src, aValue);
+ }
+ void SetSrc(const nsAString& aValue, mozilla::ErrorResult& rv)
+ {
+ SetXULAttr(nsGkAtoms::src, aValue, rv);
+ }
bool AllowEvents() const
{
return BoolAttrIsTrue(nsGkAtoms::allowevents);
}
void SetAllowEvents(bool aAllowEvents)
{
SetXULBoolAttr(nsGkAtoms::allowevents, aAllowEvents);
}
--- a/toolkit/content/widgets/general.xml
+++ b/toolkit/content/widgets/general.xml
@@ -149,24 +149,16 @@
<binding id="statusbarpanel-iconic-text" display="xul:button" role="xul:button"
extends="chrome://global/content/bindings/general.xml#statusbarpanel">
<content>
<xul:image class="statusbarpanel-icon" xbl:inherits="src,src=image"/>
<xul:label class="statusbarpanel-text" xbl:inherits="value=label,crop"/>
</content>
</binding>
- <binding id="image" role="xul:image">
- <implementation implements="nsIDOMXULImageElement">
- <property name="src"
- onget="return this.getAttribute('src');"
- onset="this.setAttribute('src',val); return val;"/>
- </implementation>
- </binding>
-
<binding id="deck">
<implementation>
<property name="selectedIndex"
onget="return this.getAttribute('selectedIndex') || '0'">
<setter>
<![CDATA[
if (this.selectedIndex == val)
return val;
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -208,22 +208,16 @@ notification.animated {
popupnotification {
-moz-binding: url("chrome://global/content/bindings/notification.xml#popup-notification");
}
.popup-notification-menubutton:not([label]) {
display: none;
}
-/********** image **********/
-
-image {
- -moz-binding: url("chrome://global/content/bindings/general.xml#image");
-}
-
/********** checkbox **********/
checkbox {
-moz-binding: url("chrome://global/content/bindings/checkbox.xml#checkbox");
}
/********** radio **********/