BoxModelMetrics.h 519 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibGfx/Size.h>
  8. namespace Web::Layout {
  9. struct PixelBox {
  10. float top { 0 };
  11. float right { 0 };
  12. float bottom { 0 };
  13. float left { 0 };
  14. };
  15. struct BoxModelMetrics {
  16. public:
  17. PixelBox margin;
  18. PixelBox padding;
  19. PixelBox border;
  20. PixelBox offset;
  21. PixelBox margin_box() const;
  22. PixelBox padding_box() const;
  23. PixelBox border_box() const;
  24. };
  25. }