1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-13 13:52:06 +00:00
serenity/Libraries/LibWeb/Layout
Andreas Kling e73ad78ba6 LibWeb: Add support for "display: inline-block"
This display type is implemented using a LayoutBlock that is_inline().
Basically it behaves like a block internally, and its children are laid
out in the normal block layout fashion. Externally however, it behaves
like an atomic inline-level box.

Layout of inline-block boxes happens in three stages:

1. The outer dimensions of the block are computed during the recursive
   normal layout pass. We skip positioning, but lay out children.

2. Later on, during line layout in the *containing block*, the inline
   block now contributes a linebox fragment. When linebox fragments are
   positioned, we learn the final position of the inline block. That's
   when we set the inline block's position.

3. We re-layout the inline block's children once again. This is done to
   make sure they end up in the right position. The layout tree doesn't
   use relative offsets, so after we position the inline block in (2),
   its children will not have its positions updated. Relayout moves
   all children of inline blocks to the right place.

This is a rather naive approach but it does get the basic behavior into
place so we can iterate on it. :^)
2020-05-05 16:18:28 +02:00
..
BoxModelMetrics.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
BoxModelMetrics.h LibWeb: CSS: Add "position: absolute" with top and left 2020-03-23 20:17:29 +01:00
LayoutBlock.cpp LibWeb: Add support for "display: inline-block" 2020-05-05 16:18:28 +02:00
LayoutBlock.h LibWeb: Add support for "display: inline-block" 2020-05-05 16:18:28 +02:00
LayoutBox.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutBox.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutBreak.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutBreak.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutCanvas.cpp LibWeb: Limit the maximum size of <canvas> bitmap buffers 2020-04-15 12:29:21 +02:00
LayoutCanvas.h LibWeb: Add <canvas> element and start fleshing out CRC2D 2020-03-19 19:07:56 +01:00
LayoutDocument.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutDocument.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutImage.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutImage.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutInline.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutInline.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutListItem.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutListItem.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutListItemMarker.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutListItemMarker.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutNode.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutNode.h LibWeb: Add support for "display: inline-block" 2020-05-05 16:18:28 +02:00
LayoutPosition.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutReplaced.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutReplaced.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTable.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTable.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTableCell.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTableCell.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTableRow.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTableRow.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutText.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutText.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutTreeBuilder.cpp LibWeb: Don't assert when trying to rebuild a single-node layout tree 2020-05-04 22:34:14 +02:00
LayoutTreeBuilder.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutWidget.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LayoutWidget.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LineBox.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LineBox.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LineBoxFragment.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
LineBoxFragment.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00