layout/inspector/nsFontFace.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 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef __nsFontFace_h__
     6 #define __nsFontFace_h__
     8 #include "nsIDOMFontFace.h"
     9 #include "nsAutoPtr.h"
    11 class gfxFontEntry;
    12 class gfxFontGroup;
    13 class nsCSSFontFaceRule;
    15 class nsFontFace : public nsIDOMFontFace
    16 {
    17 public:
    18   NS_DECL_ISUPPORTS
    19   NS_DECL_NSIDOMFONTFACE
    21   nsFontFace(gfxFontEntry*      aFontEntry,
    22              gfxFontGroup*      aFontGroup,
    23              uint8_t            aMatchInfo);
    24   virtual ~nsFontFace();
    26   gfxFontEntry* GetFontEntry() const { return mFontEntry.get(); }
    28   void AddMatchType(uint8_t aMatchType) {
    29     mMatchType |= aMatchType;
    30   }
    32 protected:
    33   nsRefPtr<gfxFontEntry> mFontEntry;
    34   nsRefPtr<gfxFontGroup> mFontGroup;
    35   uint8_t mMatchType;
    36 };
    38 #endif // __nsFontFace_h__

mercurial