1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:08:10 +00:00
serenity/Userland/Libraries/LibWeb/Layout
Tobias Christiansen 1496ad0605 LibWeb: Flexbox: Catch zero flex-basis and use width instead
A flex-basis of zero doesn't actually mean that the preferred size of
the particular Box is 0. It means that the Box should take the least
amount of space possible while still accomodating the content inside.

We catch and circumvent this now right when the flex-basis property gets
read for the FlexFormattingContext.

This isn't mentioned anywhere in the seemingly relevant portions of the
spec, however thanks to this answer https://stackoverflow.com/a/47579078
(which is not entirely correct about width either) lead to the behavior
that is wanted and used by other Browsers.
2021-10-01 20:16:58 +02:00
..
BlockBox.cpp LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock 2021-09-08 11:27:46 +02:00
BlockBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
BlockFormattingContext.cpp LibWeb: Ignore negative margins for calculating height in a BFC 2021-09-22 22:06:52 +02:00
BlockFormattingContext.h LibWeb: Add transform: translateY() support 2021-09-18 21:53:37 +02:00
Box.cpp LibWeb: Move border-painting code out of Box 2021-09-19 22:53:35 +02:00
Box.h LibWeb: Move background painting from Box to its own file 2021-09-19 22:53:35 +02:00
BoxModelMetrics.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoxModelMetrics.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BreakNode.cpp LibWeb: Let <br> elements have style 2021-09-24 15:01:49 +02:00
BreakNode.h LibWeb: Let <br> elements have style 2021-09-24 15:01:49 +02:00
ButtonBox.cpp LibWeb: Rename Web::Frame to Web::BrowsingContext 2021-05-30 12:39:53 +02:00
ButtonBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CanvasBox.cpp LibWeb: Paint bitmaps with rounded_int_rect(), not enclosing_int_rect() 2021-09-21 16:53:46 +02:00
CanvasBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CheckBox.cpp LibWeb: Rename Web::Frame to Web::BrowsingContext 2021-05-30 12:39:53 +02:00
CheckBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FlexFormattingContext.cpp LibWeb: Flexbox: Catch zero flex-basis and use width instead 2021-10-01 20:16:58 +02:00
FlexFormattingContext.h LibWeb: Implement "out-of-flow" property of Layout Box 2021-09-15 13:55:25 +02:00
FormattingContext.cpp LibWeb: Proritize FlexFormattingContext when display: flex is specified 2021-09-23 17:48:11 +02:00
FormattingContext.h LibWeb: Implement "out-of-flow" property of Layout Box 2021-09-15 13:55:25 +02:00
FrameBox.cpp LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock 2021-09-08 11:27:46 +02:00
FrameBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
ImageBox.cpp LibWeb: Paint bitmaps with rounded_int_rect(), not enclosing_int_rect() 2021-09-21 16:53:46 +02:00
ImageBox.h LibWeb: Rename frame_did_set_viewport_rect() => browsing_context_*() 2021-09-08 11:12:22 +02:00
InitialContainingBlock.cpp LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock 2021-09-08 11:27:46 +02:00
InitialContainingBlock.h LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock 2021-09-08 11:27:46 +02:00
InlineFormattingContext.cpp LibWeb: Don't assume the parent is BFC in the IFC 2021-09-23 17:48:11 +02:00
InlineFormattingContext.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
InlineNode.cpp LibWeb: Give InlineNodes borders :^) 2021-09-19 22:53:35 +02:00
InlineNode.h LibWeb: Give InlineNodes a background 2021-09-19 22:53:35 +02:00
Label.cpp LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock 2021-09-08 11:27:46 +02:00
Label.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LabelableNode.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LayoutPosition.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LayoutPosition.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LineBox.cpp LibWeb: Properly handle newlines at the end of LineBoxes 2021-08-29 01:43:09 +02:00
LineBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LineBoxFragment.cpp LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock 2021-09-08 11:27:46 +02:00
LineBoxFragment.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ListItemBox.cpp LibWeb: Make ListItemMarkerBox inherit style from ListItemBox 2021-09-24 15:01:49 +02:00
ListItemBox.h LibWeb: Add tightly-typed DOM node accessors for Layout::ListItemBox 2021-09-24 15:01:49 +02:00
ListItemMarkerBox.cpp LibWeb: Make ListItemMarkerBox inherit style from ListItemBox 2021-09-24 15:01:49 +02:00
ListItemMarkerBox.h LibWeb: Make ListItemMarkerBox inherit style from ListItemBox 2021-09-24 15:01:49 +02:00
Node.cpp LibWeb: Remove on-demand font resolution 2021-09-24 15:12:15 +02:00
Node.h LibWeb: Make Layout::Node::paint() pure virtual 2021-09-15 15:25:47 +02:00
RadioButton.cpp LibWeb: Rename Web::Frame to Web::BrowsingContext 2021-05-30 12:39:53 +02:00
RadioButton.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ReplacedBox.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ReplacedBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
SVGBox.cpp LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
SVGBox.h LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
SVGFormattingContext.cpp LibWeb: Implement very naive layout of <path> within <svg> 2021-09-18 01:39:59 +02:00
SVGFormattingContext.h LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
SVGGraphicsBox.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
SVGGraphicsBox.h LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
SVGPathBox.cpp LibWeb: Remove bogus offset when painting an SVG <path> box 2021-09-18 01:39:59 +02:00
SVGPathBox.h LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
SVGSVGBox.cpp LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
SVGSVGBox.h LibWeb: Add SVGFormattingContext to handle SVG box trees 2021-09-18 01:39:59 +02:00
TableBox.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableCellBox.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
TableCellBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableFormattingContext.cpp LibWeb: Rename Web::Frame to Web::BrowsingContext 2021-05-30 12:39:53 +02:00
TableFormattingContext.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableRowBox.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableRowBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableRowGroupBox.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableRowGroupBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TextNode.cpp LibWeb: Stop painting backgrounds for TextNodes 2021-09-19 22:53:35 +02:00
TextNode.h LibWeb: Make Layout::Node::paint() pure virtual 2021-09-15 15:25:47 +02:00
TreeBuilder.cpp LibWeb: Flexbox: Wrap inline Nodes if their parent is display: flex 2021-09-29 17:55:57 +02:00
TreeBuilder.h LibWeb: Ignore svg elements outside of <svg> when building layout tree 2021-08-05 20:17:08 +02:00