LibWeb: Remove ancient HTML_DEBUG debug logging

This commit is contained in:
Andreas Kling 2020-11-19 22:21:16 +01:00
parent 6a569bbdd7
commit 10b534849d
Notes: sideshowbarker 2024-07-19 01:20:38 +09:00
6 changed files with 1 additions and 29 deletions

View File

@ -159,17 +159,11 @@ void StyleProperties::load_font() const
if (file_name.is_null())
continue;
#ifdef HTML_DEBUG
dbg() << "Found font " << file_name << " for family " << font_family << " weight " << font_weight;
#endif
m_font = Gfx::Font::load_from_file(String::format("/res/fonts/%s", file_name.characters()));
FontCache::the().set({ font_name, font_weight }, *m_font);
return;
}
#ifdef HTML_DEBUG
dbg() << "Failed to find a font for family " << font_family << " weight " << font_weight;
#endif
if (font_weight == "bold")
m_font = Gfx::Font::default_bold_font();
else

View File

@ -100,13 +100,6 @@ Vector<MatchingRule> StyleResolver::collect_matching_rules(const DOM::Element& e
++style_sheet_index;
});
#ifdef HTML_DEBUG
dbgprintf("Rules matching Element{%p}\n", &element);
for (auto& rule : matching_rules) {
dump_rule(rule);
}
#endif
return matching_rules;
}

View File

@ -36,6 +36,4 @@ void dump_sheet(const CSS::StyleSheet&);
void dump_rule(const CSS::StyleRule&);
void dump_selector(const CSS::Selector&);
#undef HTML_DEBUG
}

View File

@ -249,11 +249,6 @@ void InProcessWebView::layout_and_sync_size()
}
page().main_frame().set_viewport_rect(viewport_rect_in_content_coordinates());
#ifdef HTML_DEBUG
dbgprintf("\033[33;1mLayout tree after layout:\033[0m\n");
::dump_tree(*layout_root());
#endif
}
void InProcessWebView::resize_event(GUI::ResizeEvent& event)

View File

@ -450,10 +450,6 @@ void LayoutBlock::compute_width()
total_px += value.to_px(*this);
}
#ifdef HTML_DEBUG
dbg() << "Total: " << total_px;
#endif
if (!is_replaced() && !is_inline()) {
// 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.

View File

@ -250,12 +250,8 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
if (node->is_text())
is_hovering_text = true;
hovered_link_element = node->enclosing_link_element();
if (hovered_link_element) {
#ifdef HTML_DEBUG
dbg() << "InProcessWebView: hovering over a link to " << hovered_link_element->href();
#endif
if (hovered_link_element)
is_hovering_link = true;
}
auto offset = compute_mouse_event_offset(position, *result.layout_node);
node->dispatch_event(UIEvents::MouseEvent::create("mousemove", offset.x(), offset.y()));
if (!layout_root())