content/base/public/mozFlushType.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/. */
     5 #ifndef mozFlushType_h___
     6 #define mozFlushType_h___
     8 /**
     9  * This is the enum used by nsIDocument::FlushPendingNotifications to
    10  * decide what to flush.
    11  *
    12  * Please note that if you change these values, you should sync it with the
    13  * flushTypeNames array inside PresShell::FlushPendingNotifications.
    14  */
    15 enum mozFlushType {
    16   Flush_None             = 0, /* Actually don't flush anything */
    17   Flush_Content          = 1, /* flush the content model construction */
    18   Flush_ContentAndNotify = 2, /* As above, plus flush the frame model
    19                                  construction and other nsIMutationObserver
    20                                  notifications. */
    21   Flush_Style            = 3, /* As above, plus flush style reresolution */
    22   Flush_Frames           = Flush_Style,
    23   Flush_InterruptibleLayout = 4, /* As above, plus flush reflow,
    24                                     but allow it to be interrupted (so
    25                                     an incomplete layout may result) */
    26   Flush_Layout           = 5, /* As above, but layout must run to
    27                                  completion */
    28   Flush_Display          = 6  /* As above, plus flush painting */
    29 };
    31 namespace mozilla {
    33 struct ChangesToFlush {
    34   ChangesToFlush(mozFlushType aFlushType, bool aFlushAnimations)
    35     : mFlushType(aFlushType)
    36     , mFlushAnimations(aFlushAnimations)
    37   {}
    39   mozFlushType mFlushType;
    40   bool mFlushAnimations;
    41 };
    43 }
    44 #endif /* mozFlushType_h___ */

mercurial