mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Support Gecko and WebKit navigator compatibility modes
This will log a debug message when calls are made to the NavigatorIDMixin that make decisions based on the compatibility mode.
This commit is contained in:
parent
e713de115c
commit
1128375dff
Notes:
sideshowbarker
2024-07-17 07:35:03 +09:00
Author: https://github.com/jamierocks
Commit: 1128375dff
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/347
5 changed files with 105 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -53,10 +54,17 @@ namespace Web {
|
|||
# error Unknown OS
|
||||
#endif
|
||||
|
||||
enum class NavigatorCompatibilityMode {
|
||||
Chrome,
|
||||
Gecko,
|
||||
WebKit
|
||||
};
|
||||
|
||||
#define BROWSER_NAME "Ladybird"
|
||||
#define BROWSER_VERSION "1.0"
|
||||
|
||||
constexpr auto default_user_agent = "Mozilla/5.0 (" OS_STRING "; " CPU_STRING ") " BROWSER_NAME "/" BROWSER_VERSION ""sv;
|
||||
constexpr auto default_platform = OS_STRING " " CPU_STRING ""sv;
|
||||
constexpr auto default_navigator_compatibility_mode = NavigatorCompatibilityMode::Chrome;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue