Frame.cpp 471 B

12345678910111213141516171819202122232425262728293031
  1. #include <LibHTML/DOM/Document.h>
  2. #include <LibHTML/Frame.h>
  3. Frame::Frame()
  4. {
  5. }
  6. Frame::~Frame()
  7. {
  8. }
  9. void Frame::set_document(Document* document)
  10. {
  11. if (m_document == document)
  12. return;
  13. if (m_document)
  14. m_document->detach_from_frame({}, *this);
  15. m_document = document;
  16. if (m_document)
  17. m_document->attach_to_frame({}, *this);
  18. }
  19. void Frame::set_size(const Size& size)
  20. {
  21. if (m_size == size)
  22. return;
  23. m_size = size;
  24. }