layout/xul/nsBoxObject.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
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/. */
     5 #ifndef nsBoxObject_h_
     6 #define nsBoxObject_h_
     8 #include "mozilla/Attributes.h"
     9 #include "nsCOMPtr.h"
    10 #include "nsIBoxObject.h"
    11 #include "nsPIBoxObject.h"
    12 #include "nsPoint.h"
    13 #include "nsAutoPtr.h"
    14 #include "nsHashKeys.h"
    15 #include "nsInterfaceHashtable.h"
    16 #include "nsCycleCollectionParticipant.h"
    18 class nsIFrame;
    19 class nsIDocShell;
    20 struct nsIntRect;
    21 class nsIPresShell;
    23 class nsBoxObject : public nsPIBoxObject
    24 {
    25   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    26   NS_DECL_CYCLE_COLLECTION_CLASS(nsBoxObject)
    27   NS_DECL_NSIBOXOBJECT
    29 public:
    30   nsBoxObject();
    31   virtual ~nsBoxObject();
    33   // nsPIBoxObject
    34   virtual nsresult Init(nsIContent* aContent) MOZ_OVERRIDE;
    35   virtual void Clear() MOZ_OVERRIDE;
    36   virtual void ClearCachedValues() MOZ_OVERRIDE;
    38   nsIFrame* GetFrame(bool aFlushLayout);
    39   nsIPresShell* GetPresShell(bool aFlushLayout);
    40   nsresult GetOffsetRect(nsIntRect& aRect);
    41   nsresult GetScreenPosition(nsIntPoint& aPoint);
    43   // Given a parent frame and a child frame, find the frame whose
    44   // next sibling is the given child frame and return its element
    45   static nsresult GetPreviousSibling(nsIFrame* aParentFrame, nsIFrame* aFrame,
    46                                      nsIDOMElement** aResult);
    48 protected:
    50   nsAutoPtr<nsInterfaceHashtable<nsStringHashKey,nsISupports> > mPropertyTable; //[OWNER]
    52   nsIContent* mContent; // [WEAK]
    53 };
    55 #endif

mercurial