layout/xul/nsSplitterFrame.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 //
     7 // nsSplitterFrame
     8 //
    10 #ifndef nsSplitterFrame_h__
    11 #define nsSplitterFrame_h__
    14 #include "mozilla/Attributes.h"
    15 #include "nsBoxFrame.h"
    17 class nsSplitterFrameInner;
    19 nsIFrame* NS_NewSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    21 class nsSplitterFrame : public nsBoxFrame
    22 {
    23 public:
    24   NS_DECL_FRAMEARENA_HELPERS
    26   nsSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    27   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
    29 #ifdef DEBUG_FRAME_DUMP
    30   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
    31     return MakeFrameName(NS_LITERAL_STRING("SplitterFrame"), aResult);
    32   }
    33 #endif
    35   // nsIFrame overrides
    36   virtual nsresult AttributeChanged(int32_t aNameSpaceID,
    37                                     nsIAtom* aAttribute,
    38                                     int32_t aModType) MOZ_OVERRIDE;
    40   virtual void Init(nsIContent*      aContent,
    41                     nsIFrame*        aParent,
    42                     nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    44   virtual nsresult GetCursor(const nsPoint&    aPoint,
    45                              nsIFrame::Cursor& aCursor) MOZ_OVERRIDE;
    47   NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
    49   NS_IMETHOD HandlePress(nsPresContext* aPresContext,
    50                          mozilla::WidgetGUIEvent* aEvent,
    51                          nsEventStatus* aEventStatus) MOZ_OVERRIDE;
    53   NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
    54                                  mozilla::WidgetGUIEvent* aEvent,
    55                                  nsEventStatus* aEventStatus,
    56                                  bool aControlHeld) MOZ_OVERRIDE;
    58   NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
    59                         mozilla::WidgetGUIEvent* aEvent,
    60                         nsEventStatus* aEventStatus) MOZ_OVERRIDE;
    62   NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
    63                            mozilla::WidgetGUIEvent* aEvent,
    64                            nsEventStatus* aEventStatus) MOZ_OVERRIDE;
    66   virtual nsresult HandleEvent(nsPresContext* aPresContext,
    67                                mozilla::WidgetGUIEvent* aEvent,
    68                                nsEventStatus* aEventStatus) MOZ_OVERRIDE;
    70   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
    71                                 const nsRect&           aDirtyRect,
    72                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
    74   virtual void GetInitialOrientation(bool& aIsHorizontal) MOZ_OVERRIDE; 
    76 private:
    78   friend class nsSplitterFrameInner;
    79   nsSplitterFrameInner* mInner;
    81 }; // class nsSplitterFrame
    83 #endif

mercurial