Skip to content

Conversation

@CGQAQ
Copy link
Contributor

@CGQAQ CGQAQ commented Dec 20, 2025

This pull request introduces several improvements and updates across the codebase, primarily focusing on enhancing the CSS engine, improving build and logging configuration, and strengthening testing and code quality. The most significant changes include a major expansion of the CSS core, a new flexible logging system, and improved build/test documentation and reliability.

Key changes:

CSS Engine Enhancements

  • Add & fix the parser in the bridge to mimic what Blink does(don't include property value part, and we don't expand shorthand into longhands as well)
  • Add & fix the ruleset in the bridge to mimic what Blink does
  • Add & fix the style resolver in the bridge to mimic what Blink does
  • Add & fix the style cascador in the bridge to mimic what Blink does
  • Add blinks invalidation set for faster yet conservative invalidations
  • Finally, send the style as inline styles to the Dart side for later processing

Build System & Logging Improvements

  • Introduced a flexible logging configuration in bridge/CMakeLists.txt, allowing per-category logging via environment variables or CMake options, and providing a master switch for all logging.
  • Improved build reliability by ensuring changes to bridge_sources.json5 trigger CMake reconfiguration, preventing linker errors from missing sources.

String encoding

  • Fix more string encoding handling bugs
  • More use of Latin1String, UTF16String, and UTF8String for owned string type alias for better readability
  • More use of Latin1StringView, UTF16StringView, and UTF8StringView for owned string type alias for better readability

Miscellaneous

  • Updated .gitignore to exclude additional build artifacts and preview tools, improving repository cleanliness.
  • Added foundation/metrics_registry.cc for some metrics

These changes collectively improve the flexibility, reliability, and maintainability of both the CSS engine and the overall build/test workflow.

@vercel
Copy link

vercel bot commented Dec 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
use-case Ready Ready Preview, Comment Dec 21, 2025 2:42pm

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

135 files out of 242 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/blink-integration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CGQAQ
Copy link
Contributor Author

CGQAQ commented Dec 20, 2025

@coderabbitai summary

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

✅ Actions performed

Summary regeneration triggered.

@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from 5bb8820 to dc828bb Compare December 20, 2025 07:26
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from 8fc141d to 5fc475b Compare December 20, 2025 08:54
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from 823881f to f3a8999 Compare December 20, 2025 11:52
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from e272b08 to 18625ed Compare December 21, 2025 09:56
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from 18625ed to d8002a4 Compare December 21, 2025 09:59
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from d8002a4 to fb0303b Compare December 21, 2025 10:02
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from fb0303b to 96ffe61 Compare December 21, 2025 10:05
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch from 96ffe61 to e2bd366 Compare December 21, 2025 10:06
CGQAQ and others added 20 commits December 21, 2025 20:21
This commit fixes error:
FAILED: CMakeFiles/webf_core.dir/core/page.cc.obj

expected unqualified-id

   57 |         WEBF_LOG(ERROR) << message << std::endl;
…and unify GC tracing logic

- Migrated all `TraceAfterDispatch` methods to `Trace` with consistent overrides.
- Updated `GCVisitor` logic for tracing relevant members across CSS and DOM objects.
- Replaced `Member<>` with `std::shared_ptr<>` in several classes to modernize memory management.
- Improved code clarity by removing unnecessary comments and redundant tracing implementations.
- Corrected computed results for `monospace` and various other font-family scenarios.
- Fixed case sensitivity issues in expected values for consistency.
this fixes:
integration_tests/specs/css/css-position/fixed.ts
  - should work with top and left offset when appended after window scrolled
  - should work with right and bottom offset when appended after window scrolled
fixed:
integration_tests/specs/css/css-box/overflow.ts
  - scrollable area computed by max height children
- Removed handling of `StyleAttr` updates for inactive documents.
- Added checks for document activity during inline style updates to prevent unnecessary commands.

Fixed:
integration_tests/specs/css/css-inline/bidirectional-text.ts
  - should handle inline element box model in RTL
The snapshot was using the fallback font because @font-face was being registered under a lowercased family name (google sans), while the element style uses Google Sans—and Flutter font family
  names are case-sensitive, so they didn’t match.
Fixed by preserving the original font-family casing when bridging @font-face rules to Dart in core/css/style_engine.cc:433 (also the other registration paths in the same file).

- Updated `font-family` values to retain original casing for accurate style resolution on the Dart side.
- Removed unnecessary `LowerASCII` transformation to maintain consistency with other property handling.

fixed:
integration_tests/specs/css/css-fonts/font-face.ts
  - support loading font through font-face
- Added logic to recalculate declared-value styles to address style recalc lag during `UICommand` flush.
- Prevents missing `kSetStyle` commands in snapshot tests.
@CGQAQ CGQAQ force-pushed the feat/blink-integration branch 2 times, most recently from b732a50 to e9764bf Compare December 21, 2025 12:22
@CGQAQ CGQAQ requested a review from andycall December 21, 2025 13:25
@andycall andycall merged commit b97665a into main Dec 21, 2025
10 of 13 checks passed
@andycall andycall deleted the feat/blink-integration branch December 21, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants