summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-29 18:10:39 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-29 18:10:39 +0200
commitc9bab8b8703c967318ef781c47e8978b86d20290 (patch)
tree21f899a492a0eeb86e679677374ab7165ccbbecb /Libraries/LibHTML
parent17c06d7c9a612bf8250604eaead31f3a3584d34d (diff)
downloadserenity-c9bab8b8703c967318ef781c47e8978b86d20290.zip
LibHTML: Reduce debug spam in HtmlView mouse event handlers
Diffstat (limited to 'Libraries/LibHTML')
-rw-r--r--Libraries/LibHTML/HtmlView.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibHTML/HtmlView.cpp b/Libraries/LibHTML/HtmlView.cpp
index 98e1cf98be..1f5c96bdc6 100644
--- a/Libraries/LibHTML/HtmlView.cpp
+++ b/Libraries/LibHTML/HtmlView.cpp
@@ -93,12 +93,14 @@ void HtmlView::mousemove_event(GMouseEvent& event)
auto* node = result.layout_node->node();
hovered_node_changed = node != m_document->hovered_node();
m_document->set_hovered_node(const_cast<Node*>(node));
+#ifdef HTML_DEBUG
if (node) {
dbg() << "HtmlView: mousemove: " << node->tag_name() << "{" << node << "}";
if (auto* link = node->enclosing_link_element()) {
dbg() << "HtmlView: hovering over a link to " << link->href();
}
}
+#endif
}
if (hovered_node_changed) {
update();
@@ -125,7 +127,9 @@ void HtmlView::mousedown_event(GMouseEvent& event)
hovered_node_changed = node != m_document->hovered_node();
m_document->set_hovered_node(const_cast<Node*>(node));
if (node) {
+#ifdef HTML_DEBUG
dbg() << "HtmlView: mousedown: " << node->tag_name() << "{" << node << "}";
+#endif
if (auto* link = node->enclosing_link_element()) {
dbg() << "HtmlView: clicking on a link to " << link->href();
if (on_link_click)