layout/base/nsIReflowCallback.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 nsIReflowCallback_h___
     6 #define nsIReflowCallback_h___
     8 /**
     9  * Reflow callback interface.
    10  * These are not refcounted. Objects must be removed from the presshell
    11  * callback list before they die.
    12  * Protocol: objects will either get a ReflowFinished() call when a reflow
    13  * has finished or a ReflowCallbackCanceled() call if the shell is destroyed,
    14  * whichever happens first. If the object is explicitly removed from the shell
    15  * (using nsIPresShell::CancelReflowCallback()) before that occurs then neither
    16  * of the callback methods are called.
    17  */
    18 class nsIReflowCallback {
    19 public:
    20   /**
    21    * The presshell calls this when reflow has finished. Return true if
    22    * you need a Flush_Layout to happen after this.
    23    */
    24   virtual bool ReflowFinished() = 0;
    25   /**
    26    * The presshell calls this on outstanding callback requests in its
    27    * Destroy() method. The shell removes the request after calling
    28    * ReflowCallbackCanceled().
    29    */
    30   virtual void ReflowCallbackCanceled() = 0;
    31 };
    33 #endif /* nsIReflowCallback_h___ */

mercurial