Commit graph

10 commits

Author SHA1 Message Date
Andreas Kling
d477039abc LibWeb: Rename Layout::LayoutTreeBuilder => Layout::TreeBuilder 2020-11-25 21:27:18 +01:00
Andreas Kling
5aeab9878e LibWeb: Rename LayoutNode classes and move them into Layout namespace
Bring the names of various boxes closer to spec language. This should
hopefully make things easier to understand and hack on. :^)

Some notable changes:

- LayoutNode -> Layout::Node
- LayoutBox -> Layout::Box
- LayoutBlock -> Layout::BlockBox
- LayoutReplaced -> Layout::ReplacedBox
- LayoutDocument -> Layout::InitialContainingBlockBox
- LayoutText -> Layout::TextNode
- LayoutInline -> Layout::InlineNode

Note that this is not strictly a "box tree" as we also hang inline/text
nodes in the same tree, and they don't generate boxes. (Instead, they
contribute line box fragments to their containing block!)
2020-11-22 15:56:27 +01:00
Andreas Kling
1f008c95b6 LibWeb: Move CSS classes into the Web::CSS namespace 2020-07-26 20:05:15 +02:00
Andreas Kling
11ff9d0f17 LibWeb: Move DOM classes into the Web::DOM namespace
LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
2020-07-26 20:05:15 +02:00
Andreas Kling
71556e39a4 LibWeb: Switch to using AK::is and AK::downcast 2020-07-26 17:51:00 +02:00
Andreas Kling
5e83a97fa2 LibWeb: Rename LayoutNode::style() => specified_style()
Let's make way for a slightly-more-cooked style() that will eventually
replace the raw specified_style() for layout and paint purposes.
2020-06-24 13:54:31 +02:00
Andreas Kling
5e9d1b2165 LibWeb: Whine in debug log instead of asserting on partial layout FIXME
We don't support incremental relayout of subtrees (only single nodes)
but let's not crash the browser just because this happens. We can keep
the browser up and just complain in the debug log instead.
2020-06-06 22:15:17 +02:00
Andreas Kling
e5ec05bd3a LibWeb: Correctly determine whether a block has only inline children
There's more to life than inline-vs-block, so we have to take all the
non-block non-inline display types into account when computing whether
a block should say children_are_inline() == true.
2020-05-30 18:26:44 +02:00
Andreas Kling
d3de2b7de5 LibWeb: Don't assert when trying to rebuild a single-node layout tree
This merely postpones dealing with partial layout tree rebuilds for a
while longer.
2020-05-04 22:34:14 +02:00
Andreas Kling
830a57c6b2 LibWeb: Rename directory LibHTML => LibWeb
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
2020-03-07 10:32:51 +01:00
Renamed from Libraries/LibHTML/Layout/LayoutTreeBuilder.cpp (Browse further)