mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
![]() `BlockFormattingContext::compute_width()` stores the left and right margins in the layout state at the very end of the function. However, before doing so, it calls `FormattingContext::calculate_inner_width()` which ends up calling `FormattingContext::calculate_stretch_fit_width()` if the current box has `width: fit-content`. Due to this, `calculate_stretch_fit_width()` would always see the margins from the layout state as zero and therefore not take them into account. Subsequently, the calculated width ended up being wrong. Saving margins on the layout state earlier, before calling `calculate_inner_width()`, makes sure that the width is calculated correctly. |
||
---|---|---|
.. | ||
AK | ||
ClangPlugins | ||
LibCompress | ||
LibCore | ||
LibCrypto | ||
LibDiff | ||
LibDNS | ||
LibGC | ||
LibGfx | ||
LibJS | ||
LibMedia | ||
LibRegex | ||
LibTest | ||
LibTextCodec | ||
LibThreading | ||
LibTLS | ||
LibUnicode | ||
LibURL | ||
LibWasm | ||
LibWeb | ||
LibWebView | ||
LibXML | ||
Resources | ||
CMakeLists.txt |