LayoutBlock.cpp 601 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include <LibHTML/DOM/Element.h>
  2. #include <LibHTML/Layout/LayoutBlock.h>
  3. LayoutBlock::LayoutBlock(const Node* node, const StyledNode* styled_node)
  4. : LayoutNode(node, styled_node)
  5. {
  6. }
  7. LayoutBlock::~LayoutBlock()
  8. {
  9. }
  10. LayoutNode& LayoutBlock::inline_wrapper()
  11. {
  12. if (!last_child() || !last_child()->is_block()) {
  13. append_child(adopt(*new LayoutBlock(nullptr, nullptr)));
  14. }
  15. return *last_child();
  16. }
  17. void LayoutBlock::layout()
  18. {
  19. compute_width();
  20. LayoutNode::layout();
  21. compute_height();
  22. }
  23. void LayoutBlock::compute_width()
  24. {
  25. }
  26. void LayoutBlock::compute_height()
  27. {
  28. }