Add root namespace 'endor' to all code under src/client #397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a root namespace
endorto all C++ code undersrc/clientto improve code organization, prevent namespace pollution, and align with the JSAR project's coding style guide (Google C++ Style Guide).Motivation
Currently, code under
src/clientuses various top-level namespaces (browser,dom,client_cssom, etc.) without a unified root namespace. This can lead to:Changes Made
1. Namespace Wrapper Addition (666 files)
All existing namespaces are now wrapped with an outer
endornamespace:Before:
After:
2. Fully Qualified Reference Updates (33 files)
All fully qualified namespace references have been updated to include the
endornamespace:Before:
After:
3. Files Intentionally Skipped (13 files)
Files without namespace declarations were correctly skipped:
macros.h)entry.cpp,main.cpp)Affected Namespaces
All the following namespaces are now nested under
endor:browser,dom,canvasclient_cssom(and sub-namespaces:rules,selectors,values)media_client,client_graphics,builtin_scene(and many sub-namespaces)client_xrclient_fetch,client_fileapi,client_frame,client_inspector,client_layout,client_networking,client_scroll,client_url,client_workersscript_bindings(and all sub-namespaces for V8 JavaScript bindings)scripting_base,loggingStatistics
Impact
✅ Positive
Testing & Verification
References
docs/contributing/coding_style_guides.mdWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
registry.npmmirror.comnpm ci(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #396
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.