Bug 821140 - Replace 'UniversalXPConnect' with 'chrome' in nsIDOMWindowUtils.idl comments. r=mccr8 DONTBUILD
authorNikhil Marathe <nsm.nikhil@gmail.com>
Mon, 17 Dec 2012 10:56:24 -0800
changeset 125401 fbad4186f7359f12d7159254dff5acda61d8d90a
parent 125400 e7c7f7e0de997fdd5ca95d4186d7b04fd8a1139c
child 125402 6817de3ec64af2167688cde02c87c6ab99d0e0fd
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs821140
milestone20.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 821140 - Replace 'UniversalXPConnect' with 'chrome' in nsIDOMWindowUtils.idl comments. r=mccr8 DONTBUILD
dom/interfaces/base/nsIDOMWindowUtils.idl
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -75,36 +75,34 @@ interface nsIDOMWindowUtils : nsISupport
    */
   short getCursorType();
 
   /**
    * Function to get metadata associated with the window's current document
    * @param aName the name of the metadata.  This should be all lowercase.
    * @return the value of the metadata, or the empty string if it's not set
    *
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    */
   AString getDocumentMetadata(in AString aName);
 
   /**
    * Force an immediate redraw of this window.  The parameter specifies
    * the number of times to redraw, and the return value is the length,
    * in milliseconds, that the redraws took.  If aCount is not specified
    * or is 0, it is taken to be 1.
    */
   unsigned long redraw([optional] in unsigned long aCount);
 
   /**
    * Set the CSS viewport to be |widthPx| x |heightPx| in units of CSS
    * pixels, regardless of the size of the enclosing widget/view.
    * This will trigger reflow.
    *
-   * The caller of this method must have UniversalXPConnect
-   * privileges.
+   * The caller of this method must have chrome privileges.
    */
   void setCSSViewport(in float aWidthPx, in float aHeightPx);
 
   /**
    * Information retrieved from the <meta name="viewport"> tag.
    * See nsContentUtils::GetViewportInfo for more information.
    */
   void getViewportInfo(in uint32_t aDisplayWidth, in uint32_t aDisplayHeight,
@@ -131,18 +129,17 @@ interface nsIDOMWindowUtils : nsISupport
    * for example.
    *
    * It's legal to set a displayport that extends beyond the overflow
    * area in any direction (left/right/top/bottom).
    *
    * It's also legal to set a displayport that extends beyond the
    * area's bounds.  No pixels are rendered outside the area bounds.
    *
-   * The caller of this method must have UniversalXPConnect
-   * privileges.
+   * The caller of this method must have chrome privileges.
    *
    * Calling this will always force a recomposite, so it should be
    * avoided if at all possible. Client code should do checks before
    * calling this so that duplicate sets are not made with the same
    * displayport.
    */
   void setDisplayPortForElement(in float aXPx, in float aYPx,
                                 in float aWidthPx, in float aHeightPx,
@@ -176,29 +173,28 @@ interface nsIDOMWindowUtils : nsISupport
    * scale.  For example, to scale a content |window| inside a
    * <browser> by a factor of 2.0
    *
    *   window.setDisplayport(x, y, oldW / 2.0, oldH / 2.0);
    *   window.setResolution(2.0, 2.0);
    *   // elsewhere
    *   browser.setViewportScale(2.0, 2.0);
    *
-   * The caller of this method must have UniversalXPConnect
-   * privileges.
+   * The caller of this method must have chrome privileges.
    */
   void setResolution(in float aXResolution, in float aYResolution);
 
   void getResolution(out float aXResolution, out float aYResolution);
 
   /**
    * Whether the next paint should be flagged as the first paint for a document.
    * This gives a way to track the next paint that occurs after the flag is
    * set. The flag gets cleared after the next paint.
    *
-   * Can only be accessed with UniversalXPConnect privileges.
+   * Can only be accessed with chrome privileges.
    */
   attribute boolean isFirstPaint;
 
   /**
    * Following modifiers are for sent*Event() except sendNative*Event().
    * NOTE: MODIFIER_ALT, MODIFIER_CONTROL, MODIFIER_SHIFT and MODIFIER_META
    *       are must be same values as nsIDOMNSEvent::*_MASK for backward
    *       compatibility.
@@ -225,18 +221,17 @@ interface nsIDOMWindowUtils : nsISupport
    * mousedown and mouseup in sequence.
    *
    * Normally at this level of events, the mouseover and mouseout events are
    * only fired when the window is entered or exited. For inter-element
    * mouseover and mouseout events, a movemove event fired on the new element
    * should be sufficient to generate the correct over and out events as well.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * The event is dispatched via the toplevel window, so it could go to any
    * window under the toplevel window, in some cases it could never reach this
    * window at all.
    *
    * @param aType event type
    * @param aX x offset in CSS pixels
    * @param aY y offset in CSS pixels
@@ -260,18 +255,17 @@ interface nsIDOMWindowUtils : nsISupport
                       [optional] in unsigned short aInputSourceArg);
 
   /** Synthesize a touch event. The event types supported are:
    *    touchstart, touchend, touchmove, and touchcancel
    *
    * Events are sent in coordinates offset by aX and aY from the window.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * The event is dispatched via the toplevel window, so it could go to any
    * window under the toplevel window, in some cases it could never reach this
    * window at all.
    *
    * @param aType event type
    * @param xs array of offsets in CSS pixels for each touch to be sent
    * @param ys array of offsets in CSS pixels for each touch to be sent
@@ -312,18 +306,17 @@ interface nsIDOMWindowUtils : nsISupport
                               [optional] in unsigned short aInputSourceArg);
 
   /** Synthesize a wheel event for a window. The event types supported is only
    *  wheel.
    *
    * Events are sent in coordinates offset by aX and aY from the window.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * @param aX                 x offset in CSS pixels
    * @param aY                 y offset in CSS pixels
    * @param aDeltaX            deltaX value.
    * @param aDeltaY            deltaY value.
    * @param aDeltaZ            deltaZ value.
    * @param aDeltaMode         deltaMode value which must be one of
    *                           nsIDOMWheelEvent::DOM_DELTA_*.
@@ -363,18 +356,17 @@ interface nsIDOMWindowUtils : nsISupport
 
   /**
    * Synthesize a key event to the window. The event types supported are:
    *   keydown, keyup, keypress
    *
    * Key events generally end up being sent to the focused node.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * @param aType event type
    * @param aKeyCode key code
    * @param aCharCode character code
    * @param aModifiers modifiers pressed, using constants defined as MODIFIER_*
    * @param aAdditionalFlags special flags for the key event, see KEY_FLAG_*.
    *
    * @return false if the event had preventDefault() called on it,
@@ -399,48 +391,45 @@ interface nsIDOMWindowUtils : nsISupport
                        in long aCharCode,
                        in long aModifiers,
                        [optional] in unsigned long aAdditionalFlags);
 
   /**
    * See nsIWidget::SynthesizeNativeKeyEvent
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * When you use this for tests, use the constants defined in NativeKeyCodes.js
    */
   void sendNativeKeyEvent(in long aNativeKeyboardLayout,
                           in long aNativeKeyCode,
                           in long aModifierFlags,
                           in AString aCharacters,
                           in AString aUnmodifiedCharacters);
 
   /**
    * See nsIWidget::SynthesizeNativeMouseEvent
    *
    * Will be called on the widget that contains aElement.
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    */
   void sendNativeMouseEvent(in long aScreenX,
                             in long aScreenY,
                             in long aNativeMessage,
                             in long aModifierFlags,
                             in nsIDOMElement aElement);
 
   /**
    * See nsIWidget::SynthesizeNativeMouseScrollEvent
    *
    * Will be called on the widget that contains aElement.
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * NOTE: The synthesized native event may be fired asynchronously.
    *
    * @param aNativeMessage
    *   On Windows:  WM_MOUSEWHEEL (0x020A), WM_MOUSEHWHEEL(0x020E),
    *                WM_VSCROLL (0x0115) or WM_HSCROLL (0x114).
    */
   void sendNativeMouseScrollEvent(in long aScreenX,
@@ -474,52 +463,49 @@ interface nsIDOMWindowUtils : nsISupport
    * instead of NULL.
    */
   const unsigned long MOUSESCROLL_WIN_SCROLL_LPARAM_NOT_NULL = 0x00010000;
 
   /**
    * See nsIWidget::ActivateNativeMenuItemAt
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    */
   void activateNativeMenuItemAt(in AString indexString);
 
   /**
    * See nsIWidget::ForceUpdateNativeMenuAt
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    */
   void forceUpdateNativeMenuAt(in AString indexString);
 
   /**
    * Focus the element aElement. The element should be in the same document
    * that the window is displaying. Pass null to blur the element, if any,
    * that currently has focus, and focus the document.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * @param aElement the element to focus
    *
    * Do not use this method. Just use element.focus if available or
    * nsIFocusManager::SetFocus instead.
    *
    */
   void focus(in nsIDOMElement aElement);
 
   /**
    * Force a garbage collection followed by a cycle collection.
    *
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges in non-debug builds. Available to all callers in debug builds.
+   * Will throw a DOM security error if called without chrome privileges in
+   * non-debug builds. Available to all callers in debug builds.
    *
    * @param aListener listener that receives information about the CC graph
    *                  (see @mozilla.org/cycle-collector-logger;1 for a logger
    *                   component)
    * @param aExtraForgetSkippableCalls indicates how many times
    *                                   nsCycleCollector_forgetSkippable will
    *                                   be called before running cycle collection.
    *                                   -1 prevents the default
@@ -527,18 +513,18 @@ interface nsIDOMWindowUtils : nsISupport
    *                                   which happens after garbage collection.
    */
   void garbageCollect([optional] in nsICycleCollectorListener aListener,
                       [optional] in long aExtraForgetSkippableCalls);
 
   /**
    * Force a cycle collection without garbage collection.
    *
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges in non-debug builds. Available to all callers in debug builds.
+   * Will throw a DOM security error if called without chrome privileges in
+   * non-debug builds. Available to all callers in debug builds.
    *
    * @param aListener listener that receives information about the CC graph
    *                  (see @mozilla.org/cycle-collector-logger;1 for a logger
    *                   component)
    * @param aExtraForgetSkippableCalls indicates how many times
    *                                   nsCycleCollector_forgetSkippable will
    *                                   be called before running cycle collection.
    *                                   -1 prevents the default
@@ -551,17 +537,17 @@ interface nsIDOMWindowUtils : nsISupport
   /** Synthesize a simple gesture event for a window. The event types
    *  supported are: MozSwipeGesture, MozMagnifyGestureStart,
    *  MozMagnifyGestureUpdate, MozMagnifyGesture, MozRotateGestureStart,
    *  MozRotateGestureUpdate, MozRotateGesture, MozPressTapGesture,
    *  MozTapGesture, and MozEdgeUIGesture.
    *
    * Cannot be accessed from unprivileged context (not
    * content-accessible) Will throw a DOM security error if called
-   * without UniversalXPConnect privileges.
+   * without chrome privileges.
    *
    * @param aType event type
    * @param aX x offset in CSS pixels
    * @param aY y offset in CSS pixels
    * @param aDirection direction, using constants defined in nsIDOMSimpleGestureEvent
    * @param aDelta  amount of magnification or rotation for magnify and rotation events
    * @param aModifiers modifiers pressed, using constants defined in nsIDOMNSEvent
    * @param aClickCount For tap gestures, the number of taps.
@@ -610,45 +596,44 @@ interface nsIDOMWindowUtils : nsISupport
                                in boolean aIgnoreRootScrollFrame,
                                in boolean aFlushLayout);
 
   /**
    * Compare the two canvases, returning the number of differing pixels and
    * the maximum difference in a channel.  This will throw an error if
    * the dimensions of the two canvases are different.
    *
-   * This method requires UniversalXPConnect privileges.
+   * This method requires chrome privileges.
    */
   uint32_t compareCanvases(in nsIDOMHTMLCanvasElement aCanvas1,
                            in nsIDOMHTMLCanvasElement aCanvas2,
                            out unsigned long aMaxDifference);
 
   /**
    * Returns true if a MozAfterPaint event has been queued but not yet
    * fired.
    */
   readonly attribute boolean isMozAfterPaintPending;
 
   /**
    * Suppresses/unsuppresses user initiated event handling in window's document
    * and subdocuments.
    *
-   * @throw NS_ERROR_DOM_SECURITY_ERR if called without UniversalXPConnect
-   *        privileges and NS_ERROR_FAILURE if window doesn't have a document.
+   * @throw NS_ERROR_DOM_SECURITY_ERR if called without chrome privileges and
+   *        NS_ERROR_FAILURE if window doesn't have a document.
    */
   void suppressEventHandling(in boolean aSuppress);
 
   void clearMozAfterPaintEvents();
 
   /**
    * Disable or enable non synthetic test mouse events on *all* windows.
    *
    * Cannot be accessed from unprivileged context (not content-accessible).
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * @param aDisable  If true, disable all non synthetic test mouse events
    *               on all windows.  Otherwise, enable them.
    */
   void disableNonTestMouseEvents(in boolean aDisable);
 
   /**
    * Returns the scroll position of the window's currently loaded document.
@@ -721,17 +706,17 @@ interface nsIDOMWindowUtils : nsISupport
 
   /**
    * Dispatches aEvent via the nsIPresShell object of the window's document.
    * The event is dispatched to aTarget, which should be an object
    * which implements nsIContent interface (#element, #text, etc).
    *
    * Cannot be accessed from unprivileged context (not
    * content-accessible) Will throw a DOM security error if called
-   * without UniversalXPConnect privileges.
+   * without chrome privileges.
    *
    * @note Event handlers won't get aEvent as parameter, but a similar event.
    *       Also, aEvent should not be reused.
    */
   boolean dispatchDOMEventViaPresShell(in nsIDOMNode aTarget,
                                        in nsIDOMEvent aEvent,
                                        in boolean aTrusted);
 
@@ -740,51 +725,48 @@ interface nsIDOMWindowUtils : nsISupport
    * wrapper) of aObj.
    */
   [implicit_jscontext] string getClassName(in jsval aObject);
 
   /**
    * Generate a content command event.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * @param aType Type of command content event to send.  Can be one of "cut",
    *        "copy", "paste", "delete", "undo", "redo", or "pasteTransferable".
    * @param aTransferable an instance of nsITransferable when aType is
    *        "pasteTransferable"
    */
   void sendContentCommandEvent(in AString aType,
                                [optional] in nsITransferable aTransferable);
 
   /**
    * Synthesize a composition event to the window.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * @param aType     The event type: "compositionstart", "compositionend" or
    *                  "compositionupdate".
    * @param aData     The data property value.  Note that this isn't applied
    *                  for compositionstart event because its value is the
    *                  selected text which is automatically computed.
    * @param aLocale   The locale property value.
    */
   void sendCompositionEvent(in AString aType,
                             in AString aData,
                             in AString aLocale);
 
   /**
    * Synthesize a text event to the window.
    *
    * Cannot be accessed from unprivileged context (not content-accessible)
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    * Currently, this method doesn't support 4 or more clauses composition
    * string.
    *
    * @param aCompositionString  composition string
    * @param a*ClauseLengh       the length of nth clause, set 0 when you
    *                            don't need second or third clause.
    * @param a*ClauseAttr        the attribute of nth clause, uese following
@@ -1243,28 +1225,27 @@ interface nsIDOMWindowUtils : nsISupport
    * otherwise.
    */
   readonly attribute boolean paintingSuppressed;
 
   /**
    * Returns an array of plugins on the page for opt-in activation.
    *
    * Cannot be accessed from unprivileged context (not content-accessible).
-   * Will throw a DOM security error if called without UniversalXPConnect
-   * privileges.
+   * Will throw a DOM security error if called without chrome privileges.
    *
    */
   [implicit_jscontext]
   readonly attribute jsval plugins;
 
   /**
    * Set the scrollport size for the purposes of clamping scroll positions for
    * the root scroll frame of this document to be (aWidth,aHeight) in CSS pixels.
    *
-   * The caller of this method must have UniversalXPConnect privileges.
+   * The caller of this method must have chrome privileges.
    */
   void setScrollPositionClampingScrollPortSize(in float aWidth, in float aHeight);
 
   /**
    * Prevent this window (and any child windows) from displaying any further
    * dialogs (e.g. window.alert()).
    */
   void preventFurtherDialogs();