2020-01-18 05:38:21 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2020-07-26 10:08:16 -03:00
|
|
|
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
2019-09-29 11:24:57 -03:00
|
|
|
|
2020-07-28 13:20:36 -03:00
|
|
|
namespace Web::HTML {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2021-02-07 07:20:15 -03:00
|
|
|
HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, QualifiedName qualified_name)
|
|
|
|
|
: HTMLElement(document, move(qualified_name))
|
2019-09-29 11:24:57 -03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HTMLHtmlElement::~HTMLHtmlElement()
|
|
|
|
|
{
|
|
|
|
|
}
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2021-05-13 10:39:30 -03:00
|
|
|
bool HTMLHtmlElement::should_use_body_background_properties() const
|
|
|
|
|
{
|
|
|
|
|
auto background_color = layout_node()->computed_values().background_color();
|
|
|
|
|
const auto* background_image = layout_node()->background_image();
|
|
|
|
|
|
|
|
|
|
return (background_color == Color::Transparent) && !background_image;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-07 06:27:02 -03:00
|
|
|
}
|