JJianliang Wang[Feature] Support Compose weight fill and layout modifiers
| Files | Last commit | Last update |
|---|---|---|
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
[Optimize] Refactor `lepus::Dictionary` This commit brings several functional improvements and performance optimizations to the base library. 1. Optimized `boost::unordered_flat_map` to understand the `IsTriviallyRelocatable` type trait, significantly improving data movement performance during buffer expansion. 2. Added the `base::HybridMap` template type, which dynamically switches the underlying container type based on the amount of data and supports externally defined data movement and iterator protocols. 3. Based on the aforementioned improvements to basic capabilities and previous `base::Vector` improvements, `lepus::Dictionary` has been refactored. `base::HybridMap` has been used instead of the original `std::unordered_map`, significantly improving performance. 4. Extensive unit tests have been added. SkipChecks: macro issue:m-6481490102 | 1 year ago | |
[Feature] Preserve root causes in native Lynx errors Add an optional root cause field to the C++ LynxError model and forward it through the page and background runtime error bridges on Android, iOS, and Harmony. Reuse the existing Android and iOS error properties and add Harmony accessors with JSON cache invalidation. Empty root causes remain omitted from serialized errors, while legacy Harmony custom info remains supported. Add Android and Harmony regression coverage for root cause getters, serialization, empty values, and cache updates. Regenerate Harmony API metadata for the added accessors and callback parameter. TEST: Android LynxErrorTest (8 host tests); Darwin production bridge bodies (4 host cases); Harmony LynxErrorTest (3 host tests); coding-style; android-check-style; git diff --check. Device suites were not run. | 12 days ago | |
[BugFix] Skip JS memory tracking without a message loop - Check for an existing thread-local MessageLoop before accessing its task runner. - Leave the scope inactive on external threads without a message loop. - Restore the allocation slot only when tracking was activated. AutoLand: release/4.4 | 27 days ago | |
initial commit | 1 year ago | |
[Feature][Logging] Observe actions through recording macros Centralize observation logs in RECORD and pass LogContext after the action at every entry point. Keep the original arguments and record ID for the optional Recorder, evaluating shared arguments only once. Propagate runtime context to scripts and native module callbacks. Observation remains available without Recorder and follows the existing OBSERVE threshold. Log action metadata without serializing or writing payloads. Cover lazy arguments, optional conditions and enclosing-function returns. TEST: Recorder-enabled and recorder-disabled syntax checks pass for core and desktop call sites and macro tests. All 75 record_unittest_exec tests pass. AutoSubmit: True SkipChecks: macro | 1 month ago | |
[Feature] Add cross-platform process PSS query to LynxBase - Add a public GetProcessPssBytes API backed by platform process memory metrics on Android, Apple, Harmony, Linux, and Windows. - Reuse Android process memory statistics and add lightweight Linux procfs parsing with required platform link dependencies. - Add a shared unit test that requires a positive process memory result. TEST: macOS ProcessMemoryInfoTest.ReturnsPositivePss; Android and iOS base_core builds; Harmony aarch64 compile and link; Linux x86_64 compile SkipChecks:macro | 1 month ago | |
[Refactor] Move Android process memory query to LynxBase - Add a LynxBase Java and JNI API for collecting process memory statistics independently of trace build settings. - Keep trace-specific filtering and byte conversion in the Android trace delegate. TEST: Android Perfetto and no-trace Release native builds; targeted Java compilation; JNI generation; git diff --check | 1 month ago | |
[Feature] Add DevTools CDP Network domain | 1 month ago | |
[Feature][Runtime] Support pausing timed tasks - Defer due timeouts and intervals while a task manager is paused. - Resume deferred work in due order while preserving interval scheduling and cancellation. - Make task managers non-copyable and non-movable because deferred tasks own unique controllers. AutoSubmit: True | 13 days ago | |
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
[Feature][Element] Add Compose modifier layout frames - Add stable Compose handles and native ModifierElement frames for ordered layout operations. - Validate a complete layout plan before replacing the physical mount-root topology. - Cover detached ownership and supported content element kinds. TEST: tools/env.sh ninja -C out/Default obj/lynx/core/renderer/dom/fiber/fiber.modifier_element.o obj/lynx/core/renderer/dom/fiber/dom_testset.modifier_element_unittest.o AutoSubmit: true | 2 months ago | |
initial commit | 1 year ago | |
[Optimize] Further optimize sizeof FiberElement by wrapping member variables in `auto_create_optional<>` Optimize member variables of FiberElement to reduce struct size by approximately 500 bytes. From statistics results, some member variables are seldomly used but defined in `Element` and `FiberElement`, especially container types. Wrap them by `auto_create_optional<>` will significantly reduce struct size and memory footprint of elements. issue: m-6383995029 | 1 year ago | |
initial commit | 1 year ago | |
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
[Infra] Export lynx base symbols on the Windows side. When building Windows artifacts, it is also necessary to export the relevant public APIs to solve the issue of symbol not found during compilation. AutoSubmit:true AutoLand:release/3.5 SkipChecks:macro | 1 year ago | |
[Optimize] Share base buffers across file I/O and heap snapshots Move buffer types and file I/O into base so scripts, bytecode caches and heap snapshots share the same ownership and persistence contract. Replace FileUtils with owned buffer reads and byte-based writes, and remove the separate HeapSnapshot interface while preserving QuickJS snapshot cleanup and cached C-string lengths. TEST: 9 Buffer file-I/O tests and 19 bytecode metadata tests passed; C-string ownership, cached-length and JSI alias smoke checks passed. Affected base, cache, snapshot and shell sources compiled. Full runtime test linking remains blocked by missing QuickJS heap-profiler symbols and a local V8/libc++ ABI mismatch. SkipChecks:macro | 5 days ago | |
[Optimize] Share base buffers across file I/O and heap snapshots Move buffer types and file I/O into base so scripts, bytecode caches and heap snapshots share the same ownership and persistence contract. Replace FileUtils with owned buffer reads and byte-based writes, and remove the separate HeapSnapshot interface while preserving QuickJS snapshot cleanup and cached C-string lengths. TEST: 9 Buffer file-I/O tests and 19 bytecode metadata tests passed; C-string ownership, cached-length and JSI alias smoke checks passed. Affected base, cache, snapshot and shell sources compiled. Full runtime test linking remains blocked by missing QuickJS heap-profiler symbols and a local V8/libc++ ABI mismatch. SkipChecks:macro | 5 days ago | |
[Optimize] BundledOptionals data transfer using add-on type traits Optimize data transfer using `IsTriviallyRelocatable` type trait. | 10 months ago | |
[Optimize] Introduce `BundledOptionals` class to base library `BundledOptionals` is a template type that dynamically manages multiple optional fields. These fields are dynamically allocated on the same block of memory and moved as fields are added or deleted. Its template parameters and interface are similar to `std::variant`, but `std::variant` only allows one type to be stored at a time. | 10 months ago | |
[Optimize][Infra]Add missing standard-library headers. Summary: Missing standard-library headers cause “symbol not declared” errors under certain toolchains. Change: Provide an automated tool named check_include_and_fix.py to detect and fix such omissions, and commit the resulting header additions. issue:m-6789688543 AutoSubmit:true | 11 months ago | |
[Optimize] The thread message loop in the base library The code implementation of the thread message loop and scheduler in the base library has room for optimization. The main issue lies in the redundant logical checks in the methods related to the GetNextTaskToRun interface call, and some system interface calls for waking up threads can be simplified. | 8 months ago | |
initial commit | 1 year ago | |
initial commit | 1 year ago | |
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
initial commit | 1 year ago | |
initial commit | 1 year ago | |
[Infra]Add missing standard-library headers. Summary: Missing standard-library headers cause “symbol not declared” errors under certain toolchains. issue:m-6789688543 AutoSubmit:true SkipChecks:macro | 11 months ago | |
[Optimize][Infra]Add missing standard-library headers. Summary: Missing standard-library headers cause “symbol not declared” errors under certain toolchains. Change: Provide an automated tool named check_include_and_fix.py to detect and fix such omissions, and commit the resulting header additions. issue:m-6789688543 AutoSubmit:true | 11 months ago | |
[Optimize] Unify the interface name of the map containers in the base library The base library provides several custom map implementations, and some function signatures differ. This commit standardizes some interface definitions; for example, `foreach` is now uniformly changed to `for_each`. The constructor no longer provides the `reserve` capability. | 11 months ago | |
[Infra][Optimize] Fix code building issues. 1. Add missing header files. issue:m-6789688543 AutoSubmit:true AutoSubmit:true | 10 months ago | |
[BugFix] Fix LLDB script for LinkedHashMap Previously a field of LinkedHashMap is renamed, and here we fix the LLDB script. issue: m-5165107323 | 1 year ago | |
initial commit | 1 year ago | |
[Doc] Clarify LynxActor dispatch hook semantics - Document that ActLite skips actor before and after hooks and should only be used when the task does not depend on tracing, reporting, or engine painting flushes. - Add shell actor dispatch guidance for choosing between Act and ActLite based on callee side effects. | 1 month ago | |
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
initial commit | 1 year ago | |
[Optimize] Extend MemoryPressureCallback to general NotificationCallback The original MemoryPressureCallback has been expanded into NotificationCallback and placed in the base. It also supports multiple event callbacks, using tag and data as parameters. | 5 months ago | |
initial commit | 1 year ago | |
initial commit | 1 year ago | |
initial commit | 1 year ago | |
[Optimize] Refactor `lepus::Dictionary` This commit brings several functional improvements and performance optimizations to the base library. 1. Optimized `boost::unordered_flat_map` to understand the `IsTriviallyRelocatable` type trait, significantly improving data movement performance during buffer expansion. 2. Added the `base::HybridMap` template type, which dynamically switches the underlying container type based on the amount of data and supports externally defined data movement and iterator protocols. 3. Based on the aforementioned improvements to basic capabilities and previous `base::Vector` improvements, `lepus::Dictionary` has been refactored. `base::HybridMap` has been used instead of the original `std::unordered_map`, significantly improving performance. 4. Extensive unit tests have been added. SkipChecks: macro issue:m-6481490102 | 1 year ago | |
initial commit | 1 year ago | |
[Feature] Support Compose weight fill and layout modifiers Carry weight fill through Compose Modifier operation 13 and preserve it on the physical mount root across CSS recomputation and topology changes. Let weighted children measure below their allocation without redistributing unused space. Map Dp offset operation 14 to CSS relative positioning on the child carrier inside each Modifier boundary. Preserve signed offsets, device-pixel rounding, RTL, sibling slots and drawing order without a dedicated placement callback. Map size range operation 15 to existing CSS min/max sizes at ordered boundaries. Support wrapContentWidth, wrapContentHeight and wrapContentSize through existing intrinsic size and alignment styles, including unbounded child measurement, physical-pixel alignment and interactions with size, fill and padding. Keep these paths in Modifier elements and Compose Box layout, preserving ordinary CSS behavior. Retain base containers, integer validation, numeric formatting and optional weight-fill state from the existing implementation. Cancel the interval test before releasing its stack state, bound the flex_optional test initializer-list reads, and reset ErrorStorage before use to isolate test order. Include utility directly for std::pair. Share rounded-pixel CSS formatting for offset and size-range bounds through base FormatString, preserving max_digits10 precision and existing pixel rounding, clamping and density conversion. TEST: ModifierElement 300 and full DOM 4495 passed; DOM retains 36 skipped and 18 disabled cases. All custom-layout styling-pipeline cases passed. TEST: Layout 544, Starlight 78, CSS 781 and CSS parser 226 passed; CSS retains one disabled case. Repository formatting and source keyword review passed. TEST: macOS base_unittests_exec: 653 passed in each of three shuffled ASan runs, with stack-use-after-return detection enabled. | 3 days ago | |
[BugFix] Fix memory leak of `base::Vector` of erase method For `TriviallyRelocatable` types, the erase method must destruct the items firstly and then move memory buffer. issue: m-6987341550 | 7 months ago | |
initial commit | 1 year ago | |
initial commit | 1 year ago | |
[Optimize] LLDB script for vector debug The script for vector debug should handle case that input value is a pointer to the container. | 7 months ago | |
initial commit | 1 year ago | |
initial commit | 1 year ago |