mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +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
|
@ -16,6 +16,7 @@
|
|||
#include <LibProtocol/Request.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Loader/Resource.h>
|
||||
#include <LibWeb/Loader/UserAgent.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web {
|
||||
|
@ -99,6 +100,9 @@ public:
|
|||
String const& platform() const { return m_platform; }
|
||||
void set_platform(String platform) { m_platform = move(platform); }
|
||||
|
||||
NavigatorCompatibilityMode navigator_compatibility_mode() { return m_navigator_compatibility_mode; }
|
||||
void set_navigator_compatibility_mode(NavigatorCompatibilityMode mode) { m_navigator_compatibility_mode = mode; }
|
||||
|
||||
bool enable_do_not_track() const { return m_enable_do_not_track; }
|
||||
void set_enable_do_not_track(bool enable) { m_enable_do_not_track = enable; }
|
||||
|
||||
|
@ -119,6 +123,7 @@ private:
|
|||
NonnullRefPtr<ResourceLoaderConnector> m_connector;
|
||||
String m_user_agent;
|
||||
String m_platform;
|
||||
NavigatorCompatibilityMode m_navigator_compatibility_mode;
|
||||
bool m_enable_do_not_track { false };
|
||||
Optional<JS::GCPtr<Page>> m_page {};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue