summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleSheet.cpp
blob: bafec2d802403bcc8797919f00da8e59ecb76af4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
 * Copyright (c) 2021, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibWeb/CSS/StyleSheet.h>
#include <LibWeb/DOM/Element.h>

namespace Web::CSS {

void StyleSheet::set_owner_node(DOM::Element* element)
{
    if (element)
        m_owner_node = element->make_weak_ptr<DOM::Element>();
    else
        m_owner_node = nullptr;
}

}