Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | #ifndef nsIReflowCallback_h___ |
michael@0 | 6 | #define nsIReflowCallback_h___ |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * Reflow callback interface. |
michael@0 | 10 | * These are not refcounted. Objects must be removed from the presshell |
michael@0 | 11 | * callback list before they die. |
michael@0 | 12 | * Protocol: objects will either get a ReflowFinished() call when a reflow |
michael@0 | 13 | * has finished or a ReflowCallbackCanceled() call if the shell is destroyed, |
michael@0 | 14 | * whichever happens first. If the object is explicitly removed from the shell |
michael@0 | 15 | * (using nsIPresShell::CancelReflowCallback()) before that occurs then neither |
michael@0 | 16 | * of the callback methods are called. |
michael@0 | 17 | */ |
michael@0 | 18 | class nsIReflowCallback { |
michael@0 | 19 | public: |
michael@0 | 20 | /** |
michael@0 | 21 | * The presshell calls this when reflow has finished. Return true if |
michael@0 | 22 | * you need a Flush_Layout to happen after this. |
michael@0 | 23 | */ |
michael@0 | 24 | virtual bool ReflowFinished() = 0; |
michael@0 | 25 | /** |
michael@0 | 26 | * The presshell calls this on outstanding callback requests in its |
michael@0 | 27 | * Destroy() method. The shell removes the request after calling |
michael@0 | 28 | * ReflowCallbackCanceled(). |
michael@0 | 29 | */ |
michael@0 | 30 | virtual void ReflowCallbackCanceled() = 0; |
michael@0 | 31 | }; |
michael@0 | 32 | |
michael@0 | 33 | #endif /* nsIReflowCallback_h___ */ |