layout/tables/FixedTableLayoutStrategy.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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 // vim:cindent:ts=4:et:sw=4:
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 /*
     8  * Algorithms that determine column and table widths used for CSS2's
     9  * 'table-layout: fixed'.
    10  */
    12 #ifndef FixedTableLayoutStrategy_h_
    13 #define FixedTableLayoutStrategy_h_
    15 #include "mozilla/Attributes.h"
    16 #include "nsITableLayoutStrategy.h"
    18 class nsTableFrame;
    20 class FixedTableLayoutStrategy : public nsITableLayoutStrategy
    21 {
    22 public:
    23     FixedTableLayoutStrategy(nsTableFrame *aTableFrame);
    24     virtual ~FixedTableLayoutStrategy();
    26     // nsITableLayoutStrategy implementation
    27     virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
    28     virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
    29                                  bool aComputingSize) MOZ_OVERRIDE;
    30     virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
    31     virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;
    33 private:
    34     nsTableFrame *mTableFrame;
    35     nscoord mMinWidth;
    36     nscoord mLastCalcWidth;
    37 };
    39 #endif /* !defined(FixedTableLayoutStrategy_h_) */

mercurial