1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:25:07 +00:00

LibHTML: Give Frame a (weak) back-pointer to the HtmlView

This will be the official path from DOM/layout code to the HtmlView
for now. Perhaps in the future we will have a fancier abstraction.
This commit is contained in:
Andreas Kling 2019-11-25 21:19:03 +01:00
parent 94bc46ee70
commit 8dc6f7cd4f
3 changed files with 12 additions and 4 deletions

View file

@ -22,7 +22,7 @@
HtmlView::HtmlView(GWidget* parent)
: GScrollableWidget(parent)
, m_main_frame(Frame::create())
, m_main_frame(Frame::create(*this))
{
main_frame().on_set_needs_display = [this](auto& content_rect) {
if (content_rect.is_empty()) {