mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +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
|
@ -38,3 +38,15 @@ private:
|
|||
|
||||
Vector<LineBox> m_line_boxes;
|
||||
};
|
||||
|
||||
template<typename Callback>
|
||||
void LayoutNode::for_each_fragment_of_this(Callback callback)
|
||||
{
|
||||
auto& block = *containing_block();
|
||||
for (auto& line_box : block.line_boxes()) {
|
||||
for (auto& fragment : line_box.fragments()) {
|
||||
if (callback(fragment) == IterationDecision::Break)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue