Tue, 06 Jan 2015 21:39:09 +0100
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.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef mozilla_dom_MouseScrollEvent_h_ |
michael@0 | 7 | #define mozilla_dom_MouseScrollEvent_h_ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsIDOMMouseScrollEvent.h" |
michael@0 | 10 | #include "mozilla/dom/MouseEvent.h" |
michael@0 | 11 | #include "mozilla/dom/MouseScrollEventBinding.h" |
michael@0 | 12 | |
michael@0 | 13 | namespace mozilla { |
michael@0 | 14 | namespace dom { |
michael@0 | 15 | |
michael@0 | 16 | class MouseScrollEvent : public MouseEvent, |
michael@0 | 17 | public nsIDOMMouseScrollEvent |
michael@0 | 18 | { |
michael@0 | 19 | public: |
michael@0 | 20 | MouseScrollEvent(EventTarget* aOwner, |
michael@0 | 21 | nsPresContext* aPresContext, |
michael@0 | 22 | WidgetMouseScrollEvent* aEvent); |
michael@0 | 23 | |
michael@0 | 24 | NS_DECL_ISUPPORTS_INHERITED |
michael@0 | 25 | |
michael@0 | 26 | // nsIDOMMouseScrollEvent Interface |
michael@0 | 27 | NS_DECL_NSIDOMMOUSESCROLLEVENT |
michael@0 | 28 | |
michael@0 | 29 | // Forward to base class |
michael@0 | 30 | NS_FORWARD_TO_MOUSEEVENT |
michael@0 | 31 | |
michael@0 | 32 | virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE |
michael@0 | 33 | { |
michael@0 | 34 | return MouseScrollEventBinding::Wrap(aCx, this); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | int32_t Axis(); |
michael@0 | 38 | |
michael@0 | 39 | void InitMouseScrollEvent(const nsAString& aType, bool aCanBubble, |
michael@0 | 40 | bool aCancelable, nsIDOMWindow* aView, |
michael@0 | 41 | int32_t aDetail, int32_t aScreenX, int32_t aScreenY, |
michael@0 | 42 | int32_t aClientX, int32_t aClientY, |
michael@0 | 43 | bool aCtrlKey, bool aAltKey, bool aShiftKey, |
michael@0 | 44 | bool aMetaKey, uint16_t aButton, |
michael@0 | 45 | nsIDOMEventTarget* aRelatedTarget, int32_t aAxis, |
michael@0 | 46 | ErrorResult& aRv) |
michael@0 | 47 | { |
michael@0 | 48 | aRv = InitMouseScrollEvent(aType, aCanBubble, aCancelable, aView, |
michael@0 | 49 | aDetail, aScreenX, aScreenY, aClientX, aClientY, |
michael@0 | 50 | aCtrlKey, aAltKey, aShiftKey, aMetaKey, aButton, |
michael@0 | 51 | aRelatedTarget, aAxis); |
michael@0 | 52 | } |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | } // namespace dom |
michael@0 | 56 | } // namespace mozilla |
michael@0 | 57 | |
michael@0 | 58 | #endif // mozilla_dom_MouseScrollEvent_h_ |