Everywhere: Hoist the Libraries folder to the top-level

This commit is contained in:
Timothy Flynn 2024-11-09 12:25:08 -05:00 committed by Andreas Kling
parent 950e819ee7
commit 93712b24bf
Notes: github-actions[bot] 2024-11-10 11:51:52 +00:00
4547 changed files with 104 additions and 113 deletions

View file

@ -46,7 +46,7 @@ Checks: >
-readability-uppercase-literal-suffix,
-readability-use-anyofallof,
WarningsAsErrors: ''
HeaderFilterRegex: 'AK|Userland|Tests'
HeaderFilterRegex: 'AK|Libraries|Services|Tests|Utilities'
FormatStyle: none
CheckOptions:
- key: bugprone-dangling-handle.HandleClasses

24
.github/CODEOWNERS vendored
View file

@ -1,16 +1,16 @@
/Lagom/Tools/CodeGenerators/LibWeb @AtkinsSJ
/Userland/Libraries/LibCrypto @alimpfard
/Userland/Libraries/LibHTTP @alimpfard
/Userland/Libraries/LibJS/Runtime/Intl @trflynn89
/Userland/Libraries/LibRegex @alimpfard
/Userland/Libraries/LibTLS @alimpfard
/Userland/Libraries/LibTimeZone @trflynn89
/Userland/Libraries/LibUnicode @trflynn89
/Userland/Libraries/LibWasm @alimpfard
/Userland/Libraries/LibWeb/CSS @AtkinsSJ
/Userland/Libraries/LibWeb/WebAssembly @alimpfard
/Userland/Libraries/LibWeb/WebDriver @trflynn89
/Userland/Libraries/LibXML @alimpfard
/Libraries/LibCrypto @alimpfard
/Libraries/LibHTTP @alimpfard
/Libraries/LibJS/Runtime/Intl @trflynn89
/Libraries/LibRegex @alimpfard
/Libraries/LibTLS @alimpfard
/Libraries/LibTimeZone @trflynn89
/Libraries/LibUnicode @trflynn89
/Libraries/LibWasm @alimpfard
/Libraries/LibWeb/CSS @AtkinsSJ
/Libraries/LibWeb/WebAssembly @alimpfard
/Libraries/LibWeb/WebDriver @trflynn89
/Libraries/LibXML @alimpfard
/Services/RequestServer @alimpfard
/Services/WebDriver @trflynn89
/Utilities/wasm.cpp @alimpfard

View file

@ -115,7 +115,7 @@ jobs:
- name: Run test-wasm
working-directory: libjs-test262
run: |
Build/bin/test-wasm --per-file Build/Lagom/Userland/Libraries/LibWasm/Tests > ../libjs-data/wasm/per-file-master.json || true
Build/bin/test-wasm --per-file Build/Lagom/Libraries/LibWasm/Tests > ../libjs-data/wasm/per-file-master.json || true
jq -nc -f /dev/stdin <<-EOF --slurpfile previous ../libjs-data/wasm/results.json --slurpfile details ../libjs-data/wasm/per-file-master.json > wasm-new-results.json
\$details[0] as \$details | \$previous[0] + [{
"commit_timestamp": $(git -C .. log -1 --format=%ct),

4
.gitignore vendored
View file

@ -40,8 +40,8 @@ local.properties
# We can't build from cmd.exe anyway
gradlew.bat
Userland/Libraries/LibWasm/Tests/Fixtures/SpecTests
Userland/Libraries/LibWasm/Tests/Spec
Libraries/LibWasm/Tests/Fixtures/SpecTests
Libraries/LibWasm/Tests/Spec
Tests/LibWeb/WPT/wpt
Tests/LibWeb/WPT/metadata

View file

@ -1,12 +1,12 @@
Userland/Libraries/LibJS/Tests/invalid-lhs-in-assignment.js
Userland/Libraries/LibJS/Tests/unicode-identifier-escape.js
Userland/Libraries/LibJS/Tests/modules/failing.mjs
Libraries/LibJS/Tests/invalid-lhs-in-assignment.js
Libraries/LibJS/Tests/unicode-identifier-escape.js
Libraries/LibJS/Tests/modules/failing.mjs
# FIXME: Remove once prettier is updated to support using declarations.
Userland/Libraries/LibJS/Tests/builtins/DisposableStack/DisposableStack.prototype.@@dispose.js
Userland/Libraries/LibJS/Tests/modules/top-level-dispose.mjs
Userland/Libraries/LibJS/Tests/using-declaration.js
Userland/Libraries/LibJS/Tests/using-for-loops.js
Libraries/LibJS/Tests/builtins/DisposableStack/DisposableStack.prototype.@@dispose.js
Libraries/LibJS/Tests/modules/top-level-dispose.mjs
Libraries/LibJS/Tests/using-declaration.js
Libraries/LibJS/Tests/using-for-loops.js
Tests/LibWeb/Ref/input/wpt-import
Tests/LibWeb/Text/input/wpt-import

View file

@ -73,7 +73,7 @@ Nobody is perfect, and sometimes we mess things up. That said, here are some goo
* Wrap your commit messages at 72 characters.
* The first line of the commit message is the subject line, and must have the format "Category: Brief description of what's being changed". The category should be the name of a library, application, service, utility, etc.
* Examples: `LibMedia`, `WebContent`, `CI`, `AK`, `RequestServer`, `js`
* Don't use a category like "`Userland`" or "`Utilities`", except for generic changes that affect a large portion of code within these directories.
* Don't use a category like "`Libraries`" or "`Utilities`", except for generic changes that affect a large portion of code within these directories.
* Don't use specific component names, e.g. C++ class names, as the category either - mention them in the summary instead. E.g. `LibGUI: Brief description of what's being changed in FooWidget` rather than `FooWidget: Brief description of what's being changed`
* Several categories may be combined with `+`, e.g. `LibJS+LibWeb+Browser: ...`
* Write the commit message subject line in the imperative mood ("Foo: Change the way dates work", not "Foo: Changed the way dates work").

View file

@ -23,9 +23,9 @@ interface CSSRule {
};
```
3. Add a `libweb_js_bindings(HTML/HTMLDetailsElement)` call to [`LibWeb/idl_files.cmake`](../Userland/Libraries/LibWeb/idl_files.cmake)
3. Add a `libweb_js_bindings(HTML/HTMLDetailsElement)` call to [`LibWeb/idl_files.cmake`](../Libraries/LibWeb/idl_files.cmake)
4. Forward declare the generated class in [`LibWeb/Forward.h`](../Userland/Libraries/LibWeb/Forward.h):
4. Forward declare the generated class in [`LibWeb/Forward.h`](../Libraries/LibWeb/Forward.h):
- `HTMLDetailsElement` in its namespace.
5. If your type isn't an Event or Element, you will need to add it to [`is_platform_object()`](../Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp)

View file

@ -1,8 +1,8 @@
# CSS Generated Files
We generate a significant amount of CSS-related code, taking in one or more .json files in
[`Userland/Libraries/LibWeb/CSS`](../Userland/Libraries/LibWeb/CSS) and producing C++ code from them, located in
`Build/<build-preset>/Lagom/Userland/Libraries/LibWeb/CSS/`.
[`Libraries/LibWeb/CSS`](../Libraries/LibWeb/CSS) and producing C++ code from them, located in
`Build/<build-preset>/Lagom/Libraries/LibWeb/CSS/`.
It's likely that you'll need to work with these if you add or modify a CSS property or its values.
The generators are found in [`Meta/Lagom/Tools/CodeGenerators/LibWeb`](../Meta/Lagom/Tools/CodeGenerators/LibWeb).
@ -173,7 +173,7 @@ Parameter definitions have the following properties:
| Field | Description |
|------------|----------------------------------------------|
| `type` | String. Accepted type for the parameter. |
| `type` | String. Accepted type for the parameter. |
| `required` | Boolean. Whether this parameter is required. |
The generated code provides:

View file

@ -18,9 +18,9 @@ these files navigate to the `Project` tool window, right-click the `Build` folde
## Include headers and source files for code insight
To get proper code insight mark the folders `AK` and `Userland` by right-clicking on them and selecting `Mark Directory as | Project Sources and Headers`.
To get proper code insight mark the folders `AK` and `Libraries` by right-clicking on them and selecting `Mark Directory as | Project Sources and Headers`.
A symptom of this not being configured correctly is CLion giving a warning for every single file:
A symptom of this not being configured correctly is CLion giving a warning for every single file:
> The file does not belong to any project target, code insight features might not work properly.
## Code Generation Settings
@ -46,7 +46,7 @@ CMake could not locate one.
This error typically arises when CLion is not configured to use the correct build directory.
**Solution**: Ensure that CLion's build directory is set to the correct build directory for the selected profile.
**Solution**: Ensure that CLion's build directory is set to the correct build directory for the selected profile.
Navigate to `Settings -> Build, Execution, Deployment -> CMake` and in your selected profile, set the `Build directory` according to the profile:
- Default -> "`Build/ladybird`"
- Debug -> "`Build/ladybird-debug`"

View file

@ -22,12 +22,10 @@ First, make sure you have a working toolchain and can build and run Ladybird. Go
* Edit the `ladybird.includes` file to list the following lines:
```
./
Userland/
Userland/Libraries/
Libraries/
Services/
Build/release/
Build/release/Userland/
Build/release/Userland/Libraries/
Build/release/Libraries/
Build/release/Services/
AK/
```

View file

@ -59,11 +59,9 @@ following ``c_cpp_properties.json`` to circumvent some errors. Even with the con
"includePath": [
"${workspaceFolder}",
"${workspaceFolder}/Build/release/",
"${workspaceFolder}/Build/release/Userland",
"${workspaceFolder}/Build/release/Userland/Libraries",
"${workspaceFolder}/Build/release/Libraries",
"${workspaceFolder}/Build/release/Services",
"${workspaceFolder}/Userland",
"${workspaceFolder}/Userland/Libraries",
"${workspaceFolder}/Libraries",
"${workspaceFolder}/Services"
],
"defines": [
@ -82,11 +80,9 @@ following ``c_cpp_properties.json`` to circumvent some errors. Even with the con
"path": [
"${workspaceFolder}",
"${workspaceFolder}/Build/release/",
"${workspaceFolder}/Build/release/Userland",
"${workspaceFolder}/Build/release/Userland/Libraries",
"${workspaceFolder}/Build/release/Libraries",
"${workspaceFolder}/Build/release/Services",
"${workspaceFolder}/Userland",
"${workspaceFolder}/Userland/Libraries",
"${workspaceFolder}/Libraries",
"${workspaceFolder}/Services"
],
"limitSymbolsToIncludedHeaders": true,

View file

@ -50,7 +50,7 @@ Heres a short timeline:
> _I'd like to have rich text, and we might as well use HTML for that. :^)_
LibHTML eventually became [LibWeb](https://github.com/LadybirdBrowser/ladybird/tree/master/Userland/Libraries/LibWeb) — which in turn eventually grew into being the core part of the browser engine and browser to which, on 4 July 2022, [the name _Ladybird_ was given](https://www.youtube.com/watch?v=X38MTKHt3_I&t=29s).
LibHTML eventually became [LibWeb](https://github.com/LadybirdBrowser/ladybird/tree/master/Libraries/LibWeb) — which in turn eventually grew into being the core part of the browser engine and browser to which, on 4 July 2022, [the name _Ladybird_ was given](https://www.youtube.com/watch?v=X38MTKHt3_I&t=29s).
- 2022 July: Renamed _Ladybird_ by Andreas in [“Let's make a Linux GUI for the SerenityOS browser”](https://youtu.be/X38MTKHt3_I) live-coding video.
- 2022 Sept: Spun off from SerenityOS to separate project: [“A new cross-platform browser project”](https://awesomekling.substack.com/p/ladybird-a-new-cross-platform-browser-project) announcement.

View file

@ -78,7 +78,7 @@ We separate CSS rules by their cascade origin. The two origins we're concerned w
The cascade origin determines the processing order for rules. The "user-agent" style is the least important, so it gets processed first. Then author style is added on top of that.
Note: the user-agent style is a built-in CSS style sheet that lives in the LibWeb source code [here](https://github.com/LadybirdBrowser/ladybird/blob/master/Userland/Libraries/LibWeb/CSS/Default.css).
Note: the user-agent style is a built-in CSS style sheet that lives in the LibWeb source code [here](https://github.com/LadybirdBrowser/ladybird/blob/master/Libraries/LibWeb/CSS/Default.css).
The end product of style computation is a fully populated StyleProperties object. It has a CSSStyleValue for each CSS::PropertyID. In spec parlance, these are the *computed* values. (Note that these are not the same as you get from `getComputedStyle()`, that API returns the *resolved* values.)

View file

@ -6,11 +6,11 @@
#include "WebViewImplementationNative.h"
#include "JNIHelpers.h"
#include <LibGfx/Bitmap.h>
#include <LibGfx/DeprecatedPainter.h>
#include <LibWeb/Crypto/Crypto.h>
#include <LibWebView/ViewImplementation.h>
#include <LibWebView/WebContentClient.h>
#include <Userland/Libraries/LibGfx/Bitmap.h>
#include <Userland/Libraries/LibGfx/DeprecatedPainter.h>
#include <Userland/Libraries/LibWeb/Crypto/Crypto.h>
#include <Userland/Libraries/LibWebView/ViewImplementation.h>
#include <android/bitmap.h>
#include <jni.h>

View file

@ -6,7 +6,7 @@
#pragma once
#include <Userland/Libraries/LibWebView/ViewImplementation.h>
#include <LibWebView/ViewImplementation.h>
#include <android/bitmap.h>
#include <jni.h>

View file

@ -13,7 +13,7 @@ module Ladybird [system] {
}
explicit module WebViewApplication {
header "../../Userland/Libraries/LibWebView/Application.h"
header "../../Libraries/LibWebView/Application.h"
export *
}
}

View file

@ -94,7 +94,7 @@ set(LADYBIRD_LIBS AK LibCore LibFileSystem LibGfx LibImageDecoderClient LibIPC L
target_link_libraries(${LADYBIRD_TARGET} PRIVATE ${LADYBIRD_LIBS})
target_include_directories(${LADYBIRD_TARGET} ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(${LADYBIRD_TARGET} ${LADYBIRD_SOURCE_DIR}/Userland/)
target_include_directories(${LADYBIRD_TARGET} ${LADYBIRD_SOURCE_DIR})
target_include_directories(${LADYBIRD_TARGET} ${LADYBIRD_SOURCE_DIR}/Services/)
function(set_helper_process_properties)

View file

@ -9,7 +9,7 @@ set(SOURCES
add_executable(headless-browser ${SOURCES})
target_include_directories(headless-browser PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(headless-browser PRIVATE ${LADYBIRD_SOURCE_DIR}/Userland/)
target_include_directories(headless-browser PRIVATE ${LADYBIRD_SOURCE_DIR})
target_link_libraries(headless-browser PRIVATE ${LADYBIRD_LIBS} LibDiff)
if (BUILD_TESTING)

View file

@ -8,9 +8,9 @@ set(LAGOM_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/Lagom")
# FIXME: Setting target_include_directories on Lagom libraries might make this unnecessary?
include_directories(${LADYBIRD_SOURCE_DIR})
include_directories(${LADYBIRD_SOURCE_DIR}/Services)
include_directories(${LADYBIRD_SOURCE_DIR}/Userland/Libraries)
include_directories(${LADYBIRD_SOURCE_DIR}/Libraries)
include_directories(${LAGOM_BINARY_DIR})
include_directories(${LAGOM_BINARY_DIR}/Services)
include_directories(${LAGOM_BINARY_DIR}/Userland/Libraries)
include_directories(${LAGOM_BINARY_DIR}/Libraries)
add_subdirectory("${LAGOM_SOURCE_DIR}" "${LAGOM_BINARY_DIR}")

Some files were not shown because too many files have changed in this diff Show more