ladybird/Libraries/LibHTML
Andreas Kling 4814253589 LibHTML: Introduce LayoutBox and LayoutNodeWithStyleAndBoxModelMetrics
To streamline the layout tree and remove irrelevant data from classes
that don't need it, this patch adds two new LayoutNode subclasses.

LayoutNodeWithStyleAndBoxModelMetrics should be inherited by any layout
node that cares about box model metrics (margin, border, and padding.)
LayoutBox should be inherited by any layout node that can have a rect.

This makes LayoutText significantly smaller (from 140 to 40 bytes) and
clarifies a lot of things about the layout tree.

I'm also adding next_sibling() and previous_sibling() overloads to
LayoutBlock that return a LayoutBlock*. This is okay since blocks only
ever have block siblings.

Do also note that the semantics of is<T> slightly change in this patch:
is<T>(nullptr) now returns true, to facilitate allowing to<T>(nullptr).
2019-10-15 16:48:38 +02:00
..
CSS LibHTML: Implement basic partial style invalidation 2019-10-14 18:33:23 +02:00
DOM LibHTML: Introduce LayoutBox and LayoutNodeWithStyleAndBoxModelMetrics 2019-10-15 16:48:38 +02:00
Layout LibHTML: Introduce LayoutBox and LayoutNodeWithStyleAndBoxModelMetrics 2019-10-15 16:48:38 +02:00
Parser LibHTML: Parse the :link and :hover CSS pseudo-classes 2019-10-14 17:31:52 +02:00
Scripts Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
Dump.cpp LibHTML: Introduce LayoutBox and LayoutNodeWithStyleAndBoxModelMetrics 2019-10-15 16:48:38 +02:00
Dump.h LibHTML: Hide debugging output unless HTML_DEBUG is defined 2019-09-28 18:29:42 +02:00
Frame.cpp LibHTML: Implement the <blink> element 2019-10-09 21:25:29 +02:00
Frame.h LibHTML: Implement the <blink> element 2019-10-09 21:25:29 +02:00
HtmlView.cpp LibHTML: Rename Document's invalidate_{style,layout}() to update_foo() 2019-10-14 17:57:06 +02:00
HtmlView.h LibHTML: Move layout root from HtmlView to Document 2019-10-13 12:43:31 +02:00
install.sh LibHTML: Add install.sh 2019-09-28 18:29:42 +02:00
Makefile Userland+LibHTML: Add the html command 2019-09-28 18:29:42 +02:00
Makefile.host AK: Remove empty files JsonArray.cpp and JsonObject.cpp 2019-10-01 11:24:54 +02:00
Makefile.shared LibHTML: Introduce LayoutBox and LayoutNodeWithStyleAndBoxModelMetrics 2019-10-15 16:48:38 +02:00
RenderingContext.h LibHTML+Browser: Add debug option to draw borders around line boxes 2019-10-12 15:02:53 +02:00
ResourceLoader.cpp LibHTML+Browser: Show the number of pending resource loads 2019-10-10 22:07:08 +02:00
ResourceLoader.h LibHTML+Browser: Show the number of pending resource loads 2019-10-10 22:07:08 +02:00
TreeNode.h LibHTML: Add Comment and CharacterData nodes and improve HTML parsing 2019-10-12 23:34:05 +02:00