cssom: support parsing background-image and render as a grad effect#117
Merged
cssom: support parsing background-image and render as a grad effect#117
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces CSS image parsing support for background-image properties with gradient rendering capabilities. The implementation adds proper CSS tokenization for image values and provides a gradient effect placeholder in the renderer.
- Implements CSS image parser with support for url(), src(), image-set() and gradient functions
- Adds comprehensive test coverage for CSS value tokenization and image parsing
- Integrates background-image support into the computed style system with Skia gradient rendering
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/client/css_image_parser_tests.cpp | Comprehensive test suite for CSS tokenizer and image parser functionality |
| src/client/cssom/values/specified/image.hpp | Enhanced image value class with parsing and serialization capabilities |
| src/client/cssom/values/specified/image.cpp | Implementation of image parsing, CSS serialization and computed value conversion |
| src/client/cssom/values/generics/image.hpp | Extended generic gradient classes with radial gradient support |
| src/client/cssom/values/computed/image.hpp | Computed image value definitions |
| src/client/cssom/parsers/css_value_tokenizer.hpp | CSS value tokenizer for parsing image syntax |
| src/client/cssom/parsers/css_value_tokenizer.cpp | Complete CSS tokenizer implementation |
| src/client/cssom/parsers/css_image_parser.hpp | CSS image parser interface |
| src/client/cssom/parsers/css_image_parser.cpp | Full CSS image parsing implementation |
| src/client/cssom/computed_style.hpp | Added background-image property support |
| src/client/builtin_scene/web_content_renderer.cpp | Integrated gradient rendering with Skia |
| cmake/TransmuteClient.cmake | Restructured build system to support library linking |
Comments suppressed due to low confidence (1)
tests/client/css_image_parser_tests.cpp:201
- These placeholder tests don't verify the actual parsing behavior. Replace with meaningful assertions that check if the parsed image has the correct type and properties.
REQUIRE(true); // Placeholder - actual implementation would check image.isUrl() etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.