summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Page/EventHandler.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-22 14:46:36 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-22 14:46:36 +0100
commitf358f2255fec7228b7ddf510936a2b7a150e509e (patch)
tree3880618b67facc7b935df3434d423151f3e5b0e6 /Libraries/LibWeb/Page/EventHandler.cpp
parent85859544fa306db03c791df8e56897f3c3089420 (diff)
downloadserenity-f358f2255fec7228b7ddf510936a2b7a150e509e.zip
LibWeb: Rename LayoutNode::node() => LayoutNode::dom_node()
Diffstat (limited to 'Libraries/LibWeb/Page/EventHandler.cpp')
-rw-r--r--Libraries/LibWeb/Page/EventHandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Libraries/LibWeb/Page/EventHandler.cpp b/Libraries/LibWeb/Page/EventHandler.cpp
index 30bda6c150..3d0e4ed85f 100644
--- a/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Libraries/LibWeb/Page/EventHandler.cpp
@@ -95,8 +95,8 @@ bool EventHandler::handle_mouseup(const Gfx::IntPoint& position, unsigned button
result = layout_root()->hit_test(position, HitTestType::Exact);
}
- if (result.layout_node && result.layout_node->node()) {
- RefPtr<DOM::Node> node = result.layout_node->node();
+ if (result.layout_node && result.layout_node->dom_node()) {
+ RefPtr<DOM::Node> node = result.layout_node->dom_node();
if (is<HTML::HTMLIFrameElement>(*node)) {
if (auto* subframe = downcast<HTML::HTMLIFrameElement>(*node).content_frame())
return subframe->event_handler().handle_mouseup(position.translated(compute_mouse_event_offset({}, *result.layout_node)), button, modifiers);
@@ -130,7 +130,7 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt
if (!result.layout_node)
return false;
- RefPtr<DOM::Node> node = result.layout_node->node();
+ RefPtr<DOM::Node> node = result.layout_node->dom_node();
document->set_hovered_node(node);
if (result.layout_node->wants_mouse_events()) {
@@ -194,7 +194,7 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt
} else {
if (button == GUI::MouseButton::Left) {
auto result = layout_root()->hit_test(position, HitTestType::TextCursor);
- if (result.layout_node && result.layout_node->node()) {
+ if (result.layout_node && result.layout_node->dom_node()) {
m_frame.set_cursor_position(DOM::Position(*node, result.index_in_node));
layout_root()->set_selection({ { result.layout_node, result.index_in_node }, {} });
dump_selection("MouseDown");
@@ -228,7 +228,7 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
if (result.layout_node) {
if (result.layout_node->wants_mouse_events()) {
- document.set_hovered_node(result.layout_node->node());
+ document.set_hovered_node(result.layout_node->dom_node());
result.layout_node->handle_mousemove({}, position, buttons, modifiers);
// FIXME: It feels a bit aggressive to always update the cursor like this.
if (auto* page = m_frame.page())
@@ -236,7 +236,7 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
return true;
}
- RefPtr<DOM::Node> node = result.layout_node->node();
+ RefPtr<DOM::Node> node = result.layout_node->dom_node();
if (node && is<HTML::HTMLIFrameElement>(*node)) {
if (auto* subframe = downcast<HTML::HTMLIFrameElement>(*node).content_frame())
@@ -259,7 +259,7 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
}
if (m_in_mouse_selection) {
auto hit = layout_root()->hit_test(position, HitTestType::TextCursor);
- if (hit.layout_node && hit.layout_node->node()) {
+ if (hit.layout_node && hit.layout_node->dom_node()) {
layout_root()->set_selection_end({ hit.layout_node, hit.index_in_node });
}
dump_selection("MouseMove");