-
-
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
Improve border images #21608
Improve border images #21608
Conversation
Heads up! This PR modifies the following files:
|
@bors-servo try=wpt |
WIP Improve border gradients and images <!-- 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: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (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/21608) <!-- Reviewable:end -->
☀️ Test successful - linux-rel-css, linux-rel-wpt |
@pyfisch Is this still WIP or is it waiting on review? |
It is still WIP because I have not written tests for the changes.
(This needs to test at least:
* Specifying a border-image-width has the same effect as a border-width.
* If the border-width is 0 there is still a border-image displayed.
* border-image-outset can be replaced by a bigger box.
)
Josh Matthews <notifications@github.com> schrieb am Di., 11. Sep. 2018,
01:29:
… @pyfisch <https://github.com/pyfisch> Is this still WIP or is it waiting
on review?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21608 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACpvWSKK87gqSEPLwfg2Qr_OHsLq2kgqks5uZvW8gaJpZM4WZmjB>
.
|
fc17b38
to
9a18f33
Compare
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#83. |
@bors-servo try=wpt @jdm this is ready for review. Added a test for the first two points. The third is covered already by border-image-outset-003. Note that I just removed the check border-width == 0 and early return. This could be considered to be a performance regression but I did not want to bother right now with writing a correct early return statement. |
@bors-servo try=wpt |
Improve border images Respect CSS border-image-width. Properly support gradients as a border-image-source. Add a new test and mark two more as passing. <!-- 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/21608) <!-- Reviewable:end -->
💔 Test failed - linux-rel-css |
9a18f33
to
ab34be1
Compare
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#83. |
Update. Mark two paint worklet tests as passing. #17860 was referenced by the tests. Property I deemed |
@bors-servo try=wpt |
Improve border images Respect CSS border-image-width. Properly support gradients as a border-image-source. Add a new test and mark two more as passing. <!-- 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/21608) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
@jdm This may interest you. |
Yep. Could you do another force push with no meaningful changes? I want to see if it will open a PR in the proper place now. |
35f354f
to
d60d564
Compare
No Taskcluster jobs started for this pull requestThe `allowPullRequests` configuration for this repository (in `.taskcluster.yml` on the
default branch) does not allow starting tasks for this pull request. |
Error syncing changes upstream. Logs saved in error-snapshot-1538117948500. |
Force pushed. |
Ok, force pushing again should work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great with or without the nit addressed.
let mut height = border_image_area.height.to_px() as u32; | ||
let source = match image { | ||
Image::Url(ref image_url) => { | ||
let image = image_url.url().and_then(|url| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Given you're doing ?
at the end you may as well:
let url = image_url.url()?;
let image = state.layout_context.get_webrender_image_for_url(
self.node,
url.clone(),
UsePlaceholder::No,
)?;
// ...
@bors-servo delegate+ |
✌️ @pyfisch can now approve this pull request |
Additionally if an image border can't be displayed show solid border. Introduce build_display_list_for_border_image to display border images.
d60d564
to
60d0c8c
Compare
Error syncing changes upstream. Logs saved in error-snapshot-1538166914642. |
@bors-servo r=emilio @jdm servo-wpt-sync failed again... |
📌 Commit 60d0c8c has been approved by |
Improve border images Respect CSS border-image-width. Properly support gradients as a border-image-source. Add a new test and mark two more as passing. <!-- 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/21608) <!-- Reviewable:end -->
☀️ Test successful - android, android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, status-taskcluster, windows-msvc-dev |
Error syncing changes upstream. Logs saved in error-snapshot-1538170094369. |
Ok. I know what went wrong, and I'll perform a manual sync. |
Respect CSS border-image-width. Properly support gradients as a border-image-source. Only emit a border item if the border-width is non-zero for simple borders but still emit one if the item is an image as paint worklet that are not drawn cause servo to hang and fail tests. Add a new test and mark 4 more as passing. Upstreamed from servo/servo#21608 [ci skip]
Additionally if an image border can't be displayed show solid border. Introduce build_display_list_for_border_image to display border images. Upstreamed from servo/servo#21608 [ci skip]
Respect CSS border-image-width.
Properly support gradients as a border-image-source.
Add a new test and mark two more as passing.
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)