From 10b534849dcb07fbaa600e5c5b58ca784ced7737 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 19 Nov 2020 22:21:16 +0100 Subject: [PATCH] LibWeb: Remove ancient HTML_DEBUG debug logging --- Libraries/LibWeb/CSS/StyleProperties.cpp | 6 ------ Libraries/LibWeb/CSS/StyleResolver.cpp | 7 ------- Libraries/LibWeb/Dump.h | 2 -- Libraries/LibWeb/InProcessWebView.cpp | 5 ----- Libraries/LibWeb/Layout/LayoutBlock.cpp | 4 ---- Libraries/LibWeb/Page/EventHandler.cpp | 6 +----- 6 files changed, 1 insertion(+), 29 deletions(-) diff --git a/Libraries/LibWeb/CSS/StyleProperties.cpp b/Libraries/LibWeb/CSS/StyleProperties.cpp index 3198e5c87fa..c0b40984b37 100644 --- a/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -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 diff --git a/Libraries/LibWeb/CSS/StyleResolver.cpp b/Libraries/LibWeb/CSS/StyleResolver.cpp index 96627a6cc40..accc16032f5 100644 --- a/Libraries/LibWeb/CSS/StyleResolver.cpp +++ b/Libraries/LibWeb/CSS/StyleResolver.cpp @@ -100,13 +100,6 @@ Vector 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; } diff --git a/Libraries/LibWeb/Dump.h b/Libraries/LibWeb/Dump.h index 5f7512371c8..6bb15948377 100644 --- a/Libraries/LibWeb/Dump.h +++ b/Libraries/LibWeb/Dump.h @@ -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 - } diff --git a/Libraries/LibWeb/InProcessWebView.cpp b/Libraries/LibWeb/InProcessWebView.cpp index 15dd3eb1557..2580f80b4e2 100644 --- a/Libraries/LibWeb/InProcessWebView.cpp +++ b/Libraries/LibWeb/InProcessWebView.cpp @@ -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) diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp index 073bc242671..d0acaa4e896 100644 --- a/Libraries/LibWeb/Layout/LayoutBlock.cpp +++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp @@ -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. diff --git a/Libraries/LibWeb/Page/EventHandler.cpp b/Libraries/LibWeb/Page/EventHandler.cpp index ad10e0b77d5..30bda6c150f 100644 --- a/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Libraries/LibWeb/Page/EventHandler.cpp @@ -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())