summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSRule.cpp10
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.cpp5
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.cpp5
3 files changed, 4 insertions, 16 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSRule.cpp
index aeeec6b7fb..bd1b94493a 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSRule.cpp
@@ -25,18 +25,12 @@ void CSSRule::set_css_text(StringView)
void CSSRule::set_parent_rule(CSSRule* parent_rule)
{
- if (parent_rule)
- m_parent_rule = parent_rule->make_weak_ptr();
- else
- m_parent_rule = nullptr;
+ m_parent_rule = parent_rule;
}
void CSSRule::set_parent_style_sheet(CSSStyleSheet* parent_style_sheet)
{
- if (parent_style_sheet)
- m_parent_style_sheet = parent_style_sheet->make_weak_ptr();
- else
- m_parent_style_sheet = nullptr;
+ m_parent_style_sheet = parent_style_sheet;
}
}
diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp
index d697b57e39..7e68facfd5 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Node.cpp
@@ -792,10 +792,7 @@ void Node::removed_last_ref()
void Node::set_layout_node(Badge<Layout::Node>, Layout::Node* layout_node) const
{
- if (layout_node)
- m_layout_node = layout_node->make_weak_ptr();
- else
- m_layout_node = nullptr;
+ m_layout_node = layout_node;
}
EventTarget* Node::get_parent(Event const&)
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
index e153ecb6fa..56acbbf398 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
@@ -752,10 +752,7 @@ bool EventHandler::handle_keyup(KeyCode key, unsigned modifiers, u32 code_point)
void EventHandler::set_mouse_event_tracking_layout_node(Layout::Node* layout_node)
{
- if (layout_node)
- m_mouse_event_tracking_layout_node = layout_node->make_weak_ptr();
- else
- m_mouse_event_tracking_layout_node = nullptr;
+ m_mouse_event_tracking_layout_node = layout_node;
}
}