mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +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
16 changed files with 140 additions and 0 deletions
|
@ -1,8 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
#include <LibDraw/Size.h>
|
||||
#include <LibHTML/TreeNode.h>
|
||||
|
||||
|
@ -23,6 +25,9 @@ public:
|
|||
const Size& size() const { return m_size; }
|
||||
void set_size(const Size&);
|
||||
|
||||
void set_needs_display(const Rect&);
|
||||
Function<void(const Rect&)> on_set_needs_display;
|
||||
|
||||
private:
|
||||
Frame();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue