LibHTML: Implement the <blink> element

Just in time for Serenity's 1st birthday, here is the <blink> element!

This patch adds a bunch of different mechanisms to enable partial
repaints of the layout tree (LayoutNode::set_needs_display()))
It also adds LayoutNode::is_visible(), which can be toggled to prevent
a LayoutNode from rendering anything (it still takes up space though.)
This commit is contained in:
Andreas Kling 2019-10-09 21:25:29 +02:00
parent 33043941f9
commit fdbad6284c
Notes: sideshowbarker 2024-07-19 11:44:38 +09:00
16 changed files with 140 additions and 0 deletions

View file

@ -17,6 +17,12 @@ HtmlView::HtmlView(GWidget* parent)
: GScrollableWidget(parent)
, m_main_frame(Frame::create())
{
main_frame().on_set_needs_display = [this](auto& content_rect) {
Rect adjusted_rect = content_rect;
adjusted_rect.set_location(to_widget_position(content_rect.location()));
update(adjusted_rect);
};
set_frame_shape(FrameShape::Container);
set_frame_shadow(FrameShadow::Sunken);
set_frame_thickness(2);