-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset longhands of border-image to their initial value while parsing border shorthand #16522
Reset longhands of border-image to their initial value while parsing border shorthand #16522
Conversation
r? @heycam Set reviewer first, although stylo try is not done yet... |
@bors-servo delegate+ |
✌️ @chenpighead can now approve this pull request |
Hmmm... I'm a bit confused about the two test failures. @heycam, does that means we'd like to see
to be serialized to
? |
I guess we might need a special case to handle |
In general, CSS declarations are serialized using the shortest longhand possible that can be used to account for properties in the declaration. In this case, none of Although it looks like Gecko will serialize that to |
…parsing border shorthand. To do so, we need to declare the border-image longhands as part of border shorthand and always reset them. This could fix couple stylo test failures. See Gecko Bug 1357350 for the test update patches. Spec link: https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands Note that two unit tests have been fixed as well: 1. border_should_serialize_correctly To verify the correctness of serialization of 'border' shorthand, we need to reset 'border-image' as well. 2. same_longhands_should_serialize_correctly Due to the same reason as above, since the 'border-image' is not reset, the test expectation should be fixed.
f2486b6
to
4352581
Compare
@bors-servo try |
…=<try> Reset longhands of border-image to their initial value while parsing border shorthand To do so, we need to declare the border-image longhands as part of border shorthand and always reset them. Spec link: https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands <!-- Please describe your changes on the following line: --> --- <!-- 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 #15202 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16522) <!-- Reviewable:end -->
I've fixed the failures by patching the two failed unit tests.
@heycam, could you review the test fix? |
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev |
Those test changes look good to me, thanks! |
@bors-servo: r=heycam |
📌 Commit 4352581 has been approved by |
…=heycam Reset longhands of border-image to their initial value while parsing border shorthand To do so, we need to declare the border-image longhands as part of border shorthand and always reset them. Spec link: https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands <!-- Please describe your changes on the following line: --> --- <!-- 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 #15202 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16522) <!-- Reviewable:end -->
💔 Test failed - mac-rel-wpt1 |
@bors-servo: retry |
…=heycam Reset longhands of border-image to their initial value while parsing border shorthand To do so, we need to declare the border-image longhands as part of border shorthand and always reset them. Spec link: https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands <!-- Please describe your changes on the following line: --> --- <!-- 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 #15202 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16522) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
@bors-servo: retry |
⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-css, mac-dev-unit, mac-rel-wpt1, windows-msvc-dev are reusable. Rebuilding only linux-rel-wpt, mac-rel-css, mac-rel-wpt2... |
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev |
To do so, we need to declare the border-image longhands as part of border
shorthand and always reset them.
Spec link: https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is