| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
BorderRadius now parses itself reusing Rect<T>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A specified position is now a struct made of two values of different types,
the first one being PositionComponent<X>, and the second one PositionComponent<Y>.
A position component is represented by the new enum PositionComponent<Side>,
with the three values Center, Length(LengthOrPercentage), and
Side(Side, Option<LengthOrPercentage>).
Side keywords are represented by the X and Y enums, which don't include a value
for the center keyword anymore. They are accompanied by the Side trait, which
allows us to determine whether a side keyword is "left" or "top".
This refactor simplified the parsing and serialisation code and exposed bugs in it,
where it would reject valid <position> values followed by arbitrary tokens,
and where it would fail to prefer "left" to "right" when serialising positions
in basic shapes.
|
|
|
|
|
|
|
| |
To simplify adding additional data to `ParserContext`, this moves test usages to
a few shared locations, instead of being spread across many tests.
MozReview-Commit-ID: 1OahV797eq
|
|
|
|
|
|
|
| |
Absorb `rule_type` into the `ParserContext` so that it's easier to pass down to
deeper levels of the parser.
MozReview-Commit-ID: DjBNytLxGKX
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reject negative border radius
Replacerd Parse in parse_one_set_of_border_values with parse_non_negative and added tests for it
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X ] `./mach build -d` does not report any errors
- [ X] `./mach test-tidy` does not report any errors
- [X ] These changes fix #15345 (github issue number if applicable).
<!-- Either: -->
- [X ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15869)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|