FixedTableLayoutStrategy.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. // vim:cindent:ts=2:et:sw=2:
  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/. */
  6. /*
  7. * Algorithms that determine column and table isizes used for CSS2's
  8. * 'table-layout: fixed'.
  9. */
  10. #ifndef FixedTableLayoutStrategy_h_
  11. #define FixedTableLayoutStrategy_h_
  12. #include "mozilla/Attributes.h"
  13. #include "nsITableLayoutStrategy.h"
  14. class nsTableFrame;
  15. class FixedTableLayoutStrategy : public nsITableLayoutStrategy
  16. {
  17. public:
  18. explicit FixedTableLayoutStrategy(nsTableFrame *aTableFrame);
  19. virtual ~FixedTableLayoutStrategy();
  20. // nsITableLayoutStrategy implementation
  21. virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
  22. virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
  23. bool aComputingSize) override;
  24. virtual void MarkIntrinsicISizesDirty() override;
  25. virtual void ComputeColumnISizes(const ReflowInput& aReflowInput)
  26. override;
  27. private:
  28. nsTableFrame *mTableFrame;
  29. nscoord mMinISize;
  30. nscoord mLastCalcISize;
  31. };
  32. #endif /* !defined(FixedTableLayoutStrategy_h_) */