diff --git a/AK/Debug.h.in b/AK/Debug.h.in index e34fb6c0fb..894e5354a2 100644 --- a/AK/Debug.h.in +++ b/AK/Debug.h.in @@ -250,6 +250,10 @@ #cmakedefine01 LEXER_DEBUG #endif +#ifndef LIBWEB_CSS_DEBUG +#cmakedefine01 LIBWEB_CSS_DEBUG +#endif + #ifndef LINE_EDITOR_DEBUG #cmakedefine01 LINE_EDITOR_DEBUG #endif diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake index 4ff054c51c..82f9422364 100644 --- a/Meta/CMake/all_the_debug_macros.cmake +++ b/Meta/CMake/all_the_debug_macros.cmake @@ -100,6 +100,7 @@ set(KEYBOARD_SHORTCUTS_DEBUG ON) set(KMALLOC_DEBUG ON) set(LANGUAGE_SERVER_DEBUG ON) set(LEXER_DEBUG ON) +set(LIBWEB_CSS_DEBUG ON) set(LINE_EDITOR_DEBUG ON) set(LOCAL_SOCKET_DEBUG ON) set(LOCK_DEBUG ON) diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp index 0562f0e44e..c03aa2b259 100644 --- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp @@ -1,10 +1,11 @@ /* - * Copyright (c) 2021, Andreas Kling + * Copyright (c) 2021-2022, Andreas Kling * Copyright (c) 2021, Tobias Christiansen * * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -698,10 +699,10 @@ RefPtr ResolvedCSSStyleDeclaration::style_value_for_property(Layout: case CSS::PropertyID::Invalid: return IdentifierStyleValue::create(CSS::ValueID::Invalid); case CSS::PropertyID::Custom: - dbgln("Computed style for custom properties was requested (?)"); + dbgln_if(LIBWEB_CSS_DEBUG, "Computed style for custom properties was requested (?)"); return {}; default: - dbgln("FIXME: Computed style for the '{}' property was requested", string_from_property_id(property_id)); + dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Computed style for the '{}' property was requested", string_from_property_id(property_id)); return {}; } }