Coverage Report

Created: 2026-06-07 07:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp
Line
Count
Source
1
/*
2
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <LibWeb/Bindings/HTMLHtmlElementPrototype.h>
8
#include <LibWeb/Bindings/Intrinsics.h>
9
#include <LibWeb/HTML/HTMLHtmlElement.h>
10
#include <LibWeb/Layout/Node.h>
11
12
namespace Web::HTML {
13
14
JS_DEFINE_ALLOCATOR(HTMLHtmlElement);
15
16
HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, DOM::QualifiedName qualified_name)
17
0
    : HTMLElement(document, move(qualified_name))
18
0
{
19
0
}
20
21
0
HTMLHtmlElement::~HTMLHtmlElement() = default;
22
23
void HTMLHtmlElement::initialize(JS::Realm& realm)
24
0
{
25
0
    Base::initialize(realm);
26
0
    WEB_SET_PROTOTYPE_FOR_INTERFACE(HTMLHtmlElement);
27
0
}
28
29
bool HTMLHtmlElement::should_use_body_background_properties() const
30
0
{
31
0
    auto background_color = layout_node()->computed_values().background_color();
32
0
    auto const& background_layers = layout_node()->background_layers();
33
34
0
    for (auto& layer : background_layers) {
35
0
        if (layer.background_image)
36
0
            return false;
37
0
    }
38
39
0
    return (background_color == Color::Transparent);
40
0
}
41
42
}