Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse enum BorderWidth as SpecifiedValue #13908
Conversation
highfive
commented
Oct 24, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @glennw (or someone else) soon. |
highfive
commented
Oct 24, 2016
|
Heads up! This PR modifies the following files:
|
|
This change only adds keyword support to the specified value. The type of computed value remains as Also I'm not sure about the test coverage of the serialization of keyword values. Anyway, this is my first servo patch so I feel I'd better post my patch to get feedback as soon as it compiles :) Review status: 0 of 6 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
|
This looks pretty good to me!
That's fine, it doesn't need to be a symmetrical operation. The The only requisite is that About serialization, we might have WPT tests in place, or otherwise we have a few files with tests around (see, for example, #13886). I'll trigger a try run so you don't have to do work that is already done by someone else. @bors-servo: try |
Use enum BorderWidth as SpecifiedValue Use enum BorderWidth instead of a tuple-like struct to store the specified value. BorderWidth is needed to be used in both longhand and shorthand border width properties, so I put it in `specified` module. Fixed #13869. --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [x] These changes fix #13869 (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/13908) <!-- Reviewable:end -->
| #[inline] | ||
| fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { | ||
| match *self { | ||
| BorderWidth::Thin => Length::from_px(1.).to_computed_value(context), |
This comment has been minimized.
This comment has been minimized.
Manishearth
Oct 24, 2016
Member
We should perhaps leave a comment here linking to both the spec and the gecko constants for this
|
|
r? @emilio |
|
|
|
@bors-servo retry try |
Use enum BorderWidth as SpecifiedValue Use enum BorderWidth instead of a tuple-like struct to store the specified value. BorderWidth is needed to be used in both longhand and shorthand border width properties, so I put it in `specified` module. Fixed #13869. --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [x] These changes fix #13869 (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/13908) <!-- Reviewable:end -->
|
|
ce2ff3e
to
3f59a0b
|
@emilio @Manishearth: Thank you for the review and clarify the invariant of @bors-servo retry try Review status: 0 of 6 files reviewed at latest revision, 1 unresolved discussion. components/style/values/specified/mod.rs, line 1360 at r1 (raw file):
|
|
@bors-servo retry try |
|
@bors-servo: try @aethanyc: homu only listens to a group of people that have try access (see servo/saltfs). Feel free to make a PR adding yourself to the try list if you want :) Edit: see servo/saltfs@ba6ee27 for example. It seems there are no tests passing due to this change, could you write one? Thanks! |
|
@bors-servo retry try |
Use enum BorderWidth as SpecifiedValue Use enum BorderWidth instead of a tuple-like struct to store the specified value. BorderWidth is needed to be used in both longhand and shorthand border width properties, so I put it in `specified` module. Fixed #13869. --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [x] These changes fix #13869 (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/13908) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
Use enum BorderWidth as SpecifiedValue Use enum BorderWidth instead of a tuple-like struct to store the specified value. BorderWidth is needed to be used in both longhand and shorthand border width properties, so I put it in `specified` module. Fixed #13869. --- <!-- 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 #13869 (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/13908) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Use enum BorderWidth as SpecifiedValue Use enum BorderWidth instead of a tuple-like struct to store the specified value. BorderWidth is needed to be used in both longhand and shorthand border width properties, so I put it in `specified` module. Fixed #13869. --- <!-- 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 #13869 (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/13908) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Use enum BorderWidth as SpecifiedValue Use enum BorderWidth instead of a tuple-like struct to store the specified value. BorderWidth is needed to be used in both longhand and shorthand border width properties, so I put it in `specified` module. Fixed #13869. --- <!-- 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 #13869 (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/13908) <!-- Reviewable:end -->
|
|
aethanyc commentedOct 24, 2016
•
edited
Use enum BorderWidth instead of a tuple-like struct to store the specified
value. BorderWidth is needed to be used in both longhand and shorthand
border width properties, so I put it in
specifiedmodule.Fixed #13869.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is