mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
LibWeb: Remove ancient HTML_DEBUG debug logging
This commit is contained in:
parent
6a569bbdd7
commit
10b534849d
6 changed files with 1 additions and 29 deletions
|
@ -159,17 +159,11 @@ void StyleProperties::load_font() const
|
||||||
if (file_name.is_null())
|
if (file_name.is_null())
|
||||||
continue;
|
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()));
|
m_font = Gfx::Font::load_from_file(String::format("/res/fonts/%s", file_name.characters()));
|
||||||
FontCache::the().set({ font_name, font_weight }, *m_font);
|
FontCache::the().set({ font_name, font_weight }, *m_font);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HTML_DEBUG
|
|
||||||
dbg() << "Failed to find a font for family " << font_family << " weight " << font_weight;
|
|
||||||
#endif
|
|
||||||
if (font_weight == "bold")
|
if (font_weight == "bold")
|
||||||
m_font = Gfx::Font::default_bold_font();
|
m_font = Gfx::Font::default_bold_font();
|
||||||
else
|
else
|
||||||
|
|
|
@ -100,13 +100,6 @@ Vector<MatchingRule> StyleResolver::collect_matching_rules(const DOM::Element& e
|
||||||
++style_sheet_index;
|
++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;
|
return matching_rules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,4 @@ void dump_sheet(const CSS::StyleSheet&);
|
||||||
void dump_rule(const CSS::StyleRule&);
|
void dump_rule(const CSS::StyleRule&);
|
||||||
void dump_selector(const CSS::Selector&);
|
void dump_selector(const CSS::Selector&);
|
||||||
|
|
||||||
#undef HTML_DEBUG
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,11 +249,6 @@ void InProcessWebView::layout_and_sync_size()
|
||||||
}
|
}
|
||||||
|
|
||||||
page().main_frame().set_viewport_rect(viewport_rect_in_content_coordinates());
|
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)
|
void InProcessWebView::resize_event(GUI::ResizeEvent& event)
|
||||||
|
|
|
@ -450,10 +450,6 @@ void LayoutBlock::compute_width()
|
||||||
total_px += value.to_px(*this);
|
total_px += value.to_px(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HTML_DEBUG
|
|
||||||
dbg() << "Total: " << total_px;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!is_replaced() && !is_inline()) {
|
if (!is_replaced() && !is_inline()) {
|
||||||
// 10.3.3 Block-level, non-replaced elements in normal flow
|
// 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.
|
// 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.
|
||||||
|
|
|
@ -250,12 +250,8 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
|
||||||
if (node->is_text())
|
if (node->is_text())
|
||||||
is_hovering_text = true;
|
is_hovering_text = true;
|
||||||
hovered_link_element = node->enclosing_link_element();
|
hovered_link_element = node->enclosing_link_element();
|
||||||
if (hovered_link_element) {
|
if (hovered_link_element)
|
||||||
#ifdef HTML_DEBUG
|
|
||||||
dbg() << "InProcessWebView: hovering over a link to " << hovered_link_element->href();
|
|
||||||
#endif
|
|
||||||
is_hovering_link = true;
|
is_hovering_link = true;
|
||||||
}
|
|
||||||
auto offset = compute_mouse_event_offset(position, *result.layout_node);
|
auto offset = compute_mouse_event_offset(position, *result.layout_node);
|
||||||
node->dispatch_event(UIEvents::MouseEvent::create("mousemove", offset.x(), offset.y()));
|
node->dispatch_event(UIEvents::MouseEvent::create("mousemove", offset.x(), offset.y()));
|
||||||
if (!layout_root())
|
if (!layout_root())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue