Bug 1083724: Restore the optionality of string arguments to methods on PopupBoxObject. r=bz
authorKyle Huey <khuey@kylehuey.com>
Mon, 20 Oct 2014 13:33:09 -0700
changeset 223666 9601c62261c91481d43f27c482e40e02d8133979
parent 223665 1ab57d5a8e6ae0a773083d5856c1b11b37891609
child 223667 bbfa604ad1c17c657813f3237b2f5fead67a09cd
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-esr52@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1083724
milestone36.0a1
Bug 1083724: Restore the optionality of string arguments to methods on PopupBoxObject. r=bz
dom/webidl/PopupBoxObject.webidl
--- a/dom/webidl/PopupBoxObject.webidl
+++ b/dom/webidl/PopupBoxObject.webidl
@@ -6,18 +6,19 @@
 [Func="IsChromeOrXBL"]
 interface PopupBoxObject : BoxObject
 {
   /**
    *  This method is deprecated. Use openPopup or openPopupAtScreen instead.
    */
   void showPopup(Element? srcContent, Element popupContent,
                  long xpos, long ypos,
-                 DOMString popupType, DOMString anchorAlignment,
-                 DOMString popupAlignment);
+                 optional DOMString popupType = "",
+                 optional DOMString anchorAlignment = "",
+                 optional DOMString popupAlignment = "");
 
   /**
    *  Hide the popup if it is open. The cancel argument is used as a hint that
    *  the popup is being closed because it has been cancelled, rather than
    *  something being selected within the panel.
    *
    * @param cancel if true, then the popup is being cancelled.
    */
@@ -100,18 +101,19 @@ interface PopupBoxObject : BoxObject
    * @param position manner is which to anchor the popup to node
    * @param x horizontal offset
    * @param y vertical offset
    * @param isContextMenu true for context menus, false for other popups
    * @param attributesOverride true if popup node attributes override position
    * @param triggerEvent the event that triggered this popup (mouse click for example)
    */
   void openPopup(Element? anchorElement,
-                 DOMString position,
-                 long x, long y,
+                 optional DOMString position = "",
+                 long x,
+                 long y,
                  boolean isContextMenu,
                  boolean attributesOverride,
                  Event? triggerEvent);
 
   /**
    * Open the popup at a specific screen position specified by x and y. This
    * position may be adjusted if it would cause the popup to be off of the
    * screen. The x and y coordinates are measured in CSS pixels, and like all
@@ -155,17 +157,17 @@ interface PopupBoxObject : BoxObject
   DOMRect getOuterScreenRect();
 
   /**
    * Move an open popup to the given anchor position. The arguments have the same
    * meaning as the corresponding argument to openPopup. This method has no effect
    * on popups that are not open.
    */
   void moveToAnchor(Element? anchorElement,
-                    DOMString position,
+                    optional DOMString position = "",
                     long x, long y,
                     boolean attributesOverride);
 
   /** Returns the alignment position where the popup has appeared relative to its
    *  anchor node or point, accounting for any flipping that occurred.
    */
   readonly attribute DOMString alignmentPosition;
   readonly attribute long alignmentOffset;