LibWeb: Move NavigatorCompatibilityMode enum to its own file

This makes it less painful to edit UserAgent.h (due to recompiles).
This commit is contained in:
Andreas Kling 2026-01-16 16:19:33 +01:00 committed by Andreas Kling
parent d821508775
commit 7e7ef058a6
4 changed files with 20 additions and 7 deletions

View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2026, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace Web {
enum class NavigatorCompatibilityMode {
Chrome,
Gecko,
WebKit
};
}

View file

@ -23,6 +23,7 @@
#include <LibWeb/Loader/LoadRequest.h>
#include <LibWeb/Loader/ProxyMappings.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Loader/UserAgent.h>
#include <LibWeb/Page/Page.h>
#include <LibWeb/Platform/EventLoopPlugin.h>
#include <LibWeb/Platform/Timer.h>

View file

@ -17,7 +17,7 @@
#include <LibRequests/RequestTimingInfo.h>
#include <LibURL/URL.h>
#include <LibWeb/Forward.h>
#include <LibWeb/Loader/UserAgent.h>
#include <LibWeb/Loader/NavigatorCompatibilityMode.h>
namespace Web {

View file

@ -9,6 +9,7 @@
#include <AK/Platform.h>
#include <AK/StringView.h>
#include <LibWeb/Loader/NavigatorCompatibilityMode.h>
namespace Web {
@ -58,12 +59,6 @@ namespace Web {
# error Unknown OS
#endif
enum class NavigatorCompatibilityMode {
Chrome,
Gecko,
WebKit
};
#define BROWSER_NAME "Ladybird"
#define BROWSER_VERSION "1.0"