diff options
Diffstat (limited to 'Libraries/LibHTML/Layout/LayoutBlock.cpp')
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutBlock.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibHTML/Layout/LayoutBlock.cpp b/Libraries/LibHTML/Layout/LayoutBlock.cpp index b0a9ff8ed5..5ca7a76381 100644 --- a/Libraries/LibHTML/Layout/LayoutBlock.cpp +++ b/Libraries/LibHTML/Layout/LayoutBlock.cpp @@ -48,15 +48,19 @@ void LayoutBlock::compute_width() auto padding_left = style_properties.length_or_fallback("padding-left", zero_value); auto padding_right = style_properties.length_or_fallback("padding-right", zero_value); +#ifdef HTML_DEBUG dbg() << " Left: " << margin_left << "+" << border_left << "+" << padding_left; dbg() << "Right: " << margin_right << "+" << border_right << "+" << padding_right; +#endif int total_px = 0; for (auto& value : { margin_left, border_left, padding_left, width, padding_right, border_right, margin_right }) { total_px += value.to_px(); } +#ifdef HTML_DEBUG dbg() << "Total: " << total_px; +#endif // 10.3.3 Block-level, non-replaced elements in normal flow // If 'width' is not 'auto' and 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' (plus any of 'margin-left' or 'margin-right' that are not 'auto') is larger than the width of the containing block, then any 'auto' values for 'margin-left' or 'margin-right' are, for the following rules, treated as zero. |