Bug 1403231 - Remove the "image" XBL binding. r=bz,bgrins
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Sat, 28 Oct 2017 16:54:09 +0100
changeset 443305 baeb2e4f4c1c46b8eced876a4d60de306f20c0a4
parent 443304 58101c3badd54b512456a23342930c45c3127439
child 443306 7dfb5111a3a8bc78cabdfaca96c4d949e33bafdb
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, bgrins
bugs1403231
milestone58.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
Bug 1403231 - Remove the "image" XBL binding. r=bz,bgrins MozReview-Commit-ID: 3pI7jZovUX6
dom/interfaces/xul/moz.build
dom/interfaces/xul/nsIDOMXULImageElement.idl
dom/webidl/XULElement.webidl
dom/xul/nsXULElement.h
toolkit/content/widgets/general.xml
toolkit/content/xul.css
--- 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 **********/