dom/events/MouseScrollEvent.h

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 #ifndef mozilla_dom_MouseScrollEvent_h_
     7 #define mozilla_dom_MouseScrollEvent_h_
     9 #include "nsIDOMMouseScrollEvent.h"
    10 #include "mozilla/dom/MouseEvent.h"
    11 #include "mozilla/dom/MouseScrollEventBinding.h"
    13 namespace mozilla {
    14 namespace dom {
    16 class MouseScrollEvent : public MouseEvent,
    17                          public nsIDOMMouseScrollEvent
    18 {
    19 public:
    20   MouseScrollEvent(EventTarget* aOwner,
    21                    nsPresContext* aPresContext,
    22                    WidgetMouseScrollEvent* aEvent);
    24   NS_DECL_ISUPPORTS_INHERITED
    26   // nsIDOMMouseScrollEvent Interface
    27   NS_DECL_NSIDOMMOUSESCROLLEVENT
    29   // Forward to base class
    30   NS_FORWARD_TO_MOUSEEVENT
    32   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
    33   {
    34     return MouseScrollEventBinding::Wrap(aCx, this);
    35   }
    37   int32_t Axis();
    39   void InitMouseScrollEvent(const nsAString& aType, bool aCanBubble,
    40                             bool aCancelable, nsIDOMWindow* aView,
    41                             int32_t aDetail, int32_t aScreenX, int32_t aScreenY,
    42                             int32_t aClientX, int32_t aClientY,
    43                             bool aCtrlKey, bool aAltKey, bool aShiftKey,
    44                             bool aMetaKey, uint16_t aButton,
    45                             nsIDOMEventTarget* aRelatedTarget, int32_t aAxis,
    46                             ErrorResult& aRv)
    47   {
    48     aRv = InitMouseScrollEvent(aType, aCanBubble, aCancelable, aView,
    49                                aDetail, aScreenX, aScreenY, aClientX, aClientY,
    50                                aCtrlKey, aAltKey, aShiftKey, aMetaKey, aButton,
    51                                aRelatedTarget, aAxis);
    52   }
    53 };
    55 } // namespace dom
    56 } // namespace mozilla
    58 #endif // mozilla_dom_MouseScrollEvent_h_

mercurial