summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Layout
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibHTML/Layout')
-rw-r--r--Libraries/LibHTML/Layout/LayoutBlock.cpp4
-rw-r--r--Libraries/LibHTML/Layout/LayoutText.cpp4
2 files changed, 8 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.
diff --git a/Libraries/LibHTML/Layout/LayoutText.cpp b/Libraries/LibHTML/Layout/LayoutText.cpp
index 5d4aa1a367..f0d4b5ff5f 100644
--- a/Libraries/LibHTML/Layout/LayoutText.cpp
+++ b/Libraries/LibHTML/Layout/LayoutText.cpp
@@ -60,7 +60,11 @@ void LayoutText::load_font()
dbg() << "My text is " << node().data();
ASSERT_NOT_REACHED();
}
+
+#ifdef HTML_DEBUG
dbg() << "Found font " << file_name << " for family " << font_family << " weight " << font_weight;
+#endif
+
m_font = Font::load_from_file(String::format("/res/fonts/%s", file_name.characters()));
}