ladybird/Libraries/LibWeb/Layout
InvalidUsernameException 9d7689ecd8 LibWeb: Do not stomp over content size of SVGs
When displaying SVGs inside a navigable directly, we want to display
them in the size specified by their width and height attributes instead
of stretching them to the viewport as layout normally would.

However, when doing so, we need to actually check that the SVG we are
laying out is indeed directly inside the navigable. Otherwise we just
blindly overwrite whatever content sizes have been calculated by layout
code for e.g. SVG elements inlined somewhere in an HTML document.

Due to the way this was written originally, the bug was not very
noticable. The code overwrote the content width/height with the computed
width/height, which was often still correct in the sense that those two
had the same value. However, content size may also be the result of
{min,max}-{width,height} constraints, which can make it differ from the
computed values.

This bug was likely a regression introduced in
f5e01192cc.
2025-09-24 11:25:43 +01:00
..
AudioBox.cpp LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
AudioBox.h
AvailableSpace.cpp
AvailableSpace.h
BlockContainer.cpp LibWeb: Verify type before casting PaintableBox to PaintableWithLines 2025-07-13 03:01:59 +02:00
BlockContainer.h
BlockFormattingContext.cpp LibWeb: Remove Font::width() overloads for UTF-8 2025-09-21 13:22:38 +02:00
BlockFormattingContext.h LibWeb: Fix incorrect margin collapsing behavior [BFC] 2025-09-08 14:09:06 +02:00
Box.cpp
Box.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BreakNode.cpp
BreakNode.h Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
CanvasBox.cpp
CanvasBox.h LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
CheckBox.cpp
CheckBox.h
FieldSetBox.cpp
FieldSetBox.h
FlexFormattingContext.cpp LibWeb: Make LengthBox hold LengthPercentageOrAuto 2025-09-04 13:31:24 +01:00
FlexFormattingContext.h
FormAssociatedLabelableNode.h LibWeb: Replace usages of dynamic_cast with as and as_if 2025-08-22 20:26:09 +02:00
FormattingContext.cpp LibWeb: Propagate border-box dimensions when getting max content width 2025-09-10 11:41:30 +02:00
FormattingContext.h LibWeb: Honor "should treat as auto" cases in aspect-ratio decisions 2025-08-05 21:33:41 +02:00
GridFormattingContext.cpp LibWeb: Make LengthBox hold LengthPercentageOrAuto 2025-09-04 13:31:24 +01:00
GridFormattingContext.h LibWeb: Make LengthBox hold LengthPercentageOrAuto 2025-09-04 13:31:24 +01:00
ImageBox.cpp LibWeb: Remove Font::width() overloads for UTF-8 2025-09-21 13:22:38 +02:00
ImageBox.h LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
ImageProvider.cpp LibWeb: Use intrinsic size for current_image_bitmap 2025-08-30 15:49:11 +02:00
ImageProvider.h LibWeb: Use intrinsic size for current_image_bitmap 2025-08-30 15:49:11 +02:00
InlineFormattingContext.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
InlineFormattingContext.h
InlineLevelIterator.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
InlineLevelIterator.h LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
InlineNode.cpp
InlineNode.h LibWeb: Add fast_is<T> optimization for Layout::InlineNode 2025-09-22 15:00:50 +02:00
Label.cpp
Label.h Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
LabelableNode.cpp
LabelableNode.h LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
LayoutState.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
LayoutState.h LibWeb: Simplify UsedValues::static_position() 2025-08-28 13:45:37 +02:00
LegendBox.cpp
LegendBox.h
LineBox.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
LineBox.h
LineBoxFragment.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
LineBoxFragment.h LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
LineBuilder.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
LineBuilder.h LibWeb: Explicitly update LineBuilder's last line at end of IFC run 2025-08-28 13:45:37 +02:00
ListItemBox.cpp
ListItemBox.h
ListItemMarkerBox.cpp AK+LibWeb/CSS: Add lower-greek counter style 2025-07-21 15:18:17 +01:00
ListItemMarkerBox.h LibWeb: Improve graphical list item marker positioning 2025-07-17 09:35:09 +01:00
NavigableContainerViewport.cpp
NavigableContainerViewport.h LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
Node.cpp LibWeb: Store font-weight in ComputedProperties in computed form 2025-09-19 10:06:33 +01:00
Node.h LibWeb: Add fast_is<T> optimization for Layout::InlineNode 2025-09-22 15:00:50 +02:00
RadioButton.cpp
RadioButton.h
ReplacedBox.cpp LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
ReplacedBox.h LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
SVGBox.cpp
SVGBox.h
SVGClipBox.cpp
SVGClipBox.h
SVGForeignObjectBox.cpp
SVGForeignObjectBox.h LibWeb: Make SVG foreignObject establish a new stacking context 2025-07-09 14:36:08 +02:00
SVGFormattingContext.cpp LibWeb: Do not stomp over content size of SVGs 2025-09-24 11:25:43 +01:00
SVGFormattingContext.h
SVGGeometryBox.cpp
SVGGeometryBox.h
SVGGraphicsBox.cpp
SVGGraphicsBox.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
SVGImageBox.cpp
SVGImageBox.h
SVGMaskBox.cpp
SVGMaskBox.h
SVGSVGBox.cpp
SVGSVGBox.h LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
SVGTextBox.cpp
SVGTextBox.h
SVGTextPathBox.cpp
SVGTextPathBox.h
TableFormattingContext.cpp LibWeb: Make LengthBox hold LengthPercentageOrAuto 2025-09-04 13:31:24 +01:00
TableFormattingContext.h Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
TableGrid.cpp LibWeb/Layout: Support visibility:collapse on table-row elements 2025-08-11 11:07:47 +01:00
TableGrid.h LibWeb/Layout: Support visibility:collapse on table-row elements 2025-08-11 11:07:47 +01:00
TableWrapper.cpp
TableWrapper.h
TextNode.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
TextNode.h LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
TreeBuilder.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
TreeBuilder.h
VideoBox.cpp LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
VideoBox.h
Viewport.cpp LibWeb: Port rendered text to UTF-16 2025-07-25 18:16:22 +02:00
Viewport.h Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00