mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-07 19:52:55 +00:00
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:
parent
33043941f9
commit
fdbad6284c
Notes:
sideshowbarker
2024-07-19 11:44:38 +09:00
Author: https://github.com/awesomekling
Commit: fdbad6284c
16 changed files with 140 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue