HTMLHtmlElement.cpp 667 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/HTML/HTMLHtmlElement.h>
  7. namespace Web::HTML {
  8. HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, QualifiedName qualified_name)
  9. : HTMLElement(document, move(qualified_name))
  10. {
  11. }
  12. HTMLHtmlElement::~HTMLHtmlElement()
  13. {
  14. }
  15. bool HTMLHtmlElement::should_use_body_background_properties() const
  16. {
  17. auto background_color = layout_node()->computed_values().background_color();
  18. const auto* background_image = layout_node()->background_image();
  19. return (background_color == Color::Transparent) && !background_image;
  20. }
  21. }