nsIPercentBSizeObserver.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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 nsIPercentBSizeObserver_h___
  6. #define nsIPercentBSizeObserver_h___
  7. #include "nsQueryFrame.h"
  8. namespace mozilla {
  9. struct ReflowInput;
  10. } // namespace mozilla
  11. /**
  12. * This interface is supported by frames that need to provide computed bsize
  13. * values to children during reflow which would otherwise not happen. Currently
  14. * only table cells support this.
  15. */
  16. class nsIPercentBSizeObserver
  17. {
  18. public:
  19. NS_DECL_QUERYFRAME_TARGET(nsIPercentBSizeObserver)
  20. // Notify the observer that aReflowInput has no computed bsize,
  21. // but it has a percent bsize
  22. virtual void NotifyPercentBSize(const mozilla::ReflowInput& aReflowInput) = 0;
  23. // Ask the observer if it should observe aReflowInput.frame
  24. virtual bool NeedsToObserve(const mozilla::ReflowInput& aReflowInput) = 0;
  25. };
  26. #endif // nsIPercentBSizeObserver_h___