editor/idl/nsIHTMLObjectResizer.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     7 #include "domstubs.idl"
     9 interface nsIHTMLObjectResizeListener;
    11 [scriptable, uuid(8b396020-69d3-451f-80c1-1a96a7da25a9)]
    13 interface nsIHTMLObjectResizer : nsISupports
    14 {
    15 %{C++
    16   typedef short EResizerLocation;
    17 %}
    18   const short eTopLeft = 0;
    19   const short eTop = 1;
    20   const short eTopRight = 2;
    21   const short eLeft = 3;
    22   const short eRight = 4;
    23   const short eBottomLeft = 5;
    24   const short eBottom = 6;
    25   const short eBottomRight = 7;
    27   /**
    28    * the element currently displaying resizers
    29    */
    30   readonly attribute nsIDOMElement resizedObject;
    32   /**
    33    * a boolean indicating if object resizing is enabled in the editor
    34    */
    35   attribute boolean objectResizingEnabled;
    37   /**
    38    * Shows active resizers around an element's frame
    39    * @param aResizedElement [IN] a DOM Element
    40    */
    41   void showResizers(in nsIDOMElement aResizedElement);
    43   /**
    44    * Hide resizers if they are visible
    45    */
    46   void hideResizers();
    48   /**
    49    * Refresh visible resizers
    50    */
    51   void refreshResizers();
    53   /**
    54    * event callback when a mouse button is pressed
    55    * @param aX      [IN] horizontal position of the pointer
    56    * @param aY      [IN] vertical position of the pointer
    57    * @param aTarget [IN] the element triggering the event
    58    * @param aMouseEvent [IN] the event
    59    */
    60   void mouseDown(in long aX, in long aY,
    61                  in nsIDOMElement aTarget, in nsIDOMEvent aMouseEvent);
    63   /**
    64    * event callback when a mouse button is released
    65    * @param aX      [IN] horizontal position of the pointer
    66    * @param aY      [IN] vertical position of the pointer
    67    * @param aTarget [IN] the element triggering the event
    68    */
    69   void mouseUp(in long aX, in long aY,
    70                in nsIDOMElement aTarget);
    72   /**
    73    * event callback when the mouse pointer is moved
    74    * @param aMouseEvent [IN] the event
    75    */
    76   void mouseMove(in nsIDOMEvent aMouseEvent);
    78   /* Event Listeners */
    80   /**
    81    * Creates a resize listener that can be used to get notifications
    82    * that the user started to resize an object or finalized such an operation
    83    * @param aListener [IN] an instance of nsIHTMLObjectResizeListener
    84    */
    85   void addObjectResizeEventListener(in nsIHTMLObjectResizeListener aListener);
    87   /**
    88    * Deletes a resize listener
    89    * @param aListener [IN] an instance of nsIHTMLObjectResizeListener
    90    */
    91   void removeObjectResizeEventListener(in nsIHTMLObjectResizeListener aListener);
    92 };

mercurial