Lack of a public method in servo/stylo::LengthPercentage converting to a certain percentage with given basis
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox125 | --- | fixed |
People
(Reporter: rushliu, Assigned: rushliu)
Details
Attachments
(2 files)
Steps to reproduce:
Developing a native renderer with servo/stylo as css engine.
Actual results:
Lack of a public method in servo/stylo::LengthPercentage converting to a certain percentage with given basis.
Expected results:
The crate lacks the method mentioned above.
Added a new public method resolve_percentage
to the LengthPercentage
struct in the length_percentage.rs
file. This method takes a Length
type argument named basis
and returns an Option<Percentage>
.
The purpose of this method is to resolve the current LengthPercentage
instance to a percentage based on the given basis
. This is particularly useful when integrating Stylo with other renderers, as it allows for the conversion of LengthPercentage
to a ratio.
This addition enhances the LengthPercentage
struct's functionality, making it more versatile for different rendering contexts.
Updated•3 months ago
|
Comment 3•3 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c95b92fa6d2 Added a new public method `resolve_percentage` to the `LengthPercentage` struct in the `length_percentage.rs` file. r=emilio
Comment 6•3 months ago
|
||
bugherder |
Description
•