Repository navigation
Implement support for (most of) border-image. - #895
Conversation
|
r? @kvark cc @jrmuizel This will also need a version number bump once all comments are addressed, before it can be landed. The corresponding Servo patch is here if you want to do some testing with it: https://github.com/glennw/servo/tree/border-image |
|
I had a quick look at this and it looks good to me. |
| BorderDetails::Image(ref border) => { | ||
| // Calculate the modified rect as specific by border-image-outset | ||
| let origin = LayerPoint::new(rect.origin.x - border.outset.left, | ||
| rect.origin.x - border.outset.top); |
There was a problem hiding this comment.
was this meant to be rect.origin.y - border.outset.top?
| repeat_vertical: RepeatMode) -> ImageBorderSegment { | ||
| let tile_spacing = LayerSize::zero(); | ||
|
|
||
| let image_size = LayerSize::new(sub_rect.uv1.x - sub_rect.uv0.x, |
There was a problem hiding this comment.
does it handle uv1 < uv0 case correctly?
Add support for borders that use: * border-image-source (images only, not gradients yet). * border-image-slice * border-image-repeat (repeat + stretch only, for now). * border-image-outset The major part of the work is supporting sub-rects when drawing images. The rest of the work is simply generating image primitives from the border-image display item description.
|
@kvark Thanks! Fixed those issues and rebased. With the corresponding Servo PR, this adds 13 new test passes and no new failures. |
|
@bors-servo r=kvark |
|
📌 Commit 8ea8410 has been approved by |
Implement support for (most of) border-image. Add support for borders that use: * border-image-source (images only, not gradients yet). * border-image-slice * border-image-repeat (repeat + stretch only, for now). * border-image-outset The major part of the work is supporting sub-rects when drawing images. The rest of the work is simply generating image primitives from the border-image display item description. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/895) <!-- Reviewable:end -->
|
@bors-servo r+ |
|
📌 Commit 403b44b has been approved by |
Implement support for (most of) border-image. Add support for borders that use: * border-image-source (images only, not gradients yet). * border-image-slice * border-image-repeat (repeat + stretch only, for now). * border-image-outset The major part of the work is supporting sub-rects when drawing images. The rest of the work is simply generating image primitives from the border-image display item description. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/895) <!-- Reviewable:end -->
|
@bors-servo r=kvark (Fixed a tidy error). |
|
📌 Commit 7b377ac has been approved by |
Implement support for (most of) border-image. Add support for borders that use: * border-image-source (images only, not gradients yet). * border-image-slice * border-image-repeat (repeat + stretch only, for now). * border-image-outset The major part of the work is supporting sub-rects when drawing images. The rest of the work is simply generating image primitives from the border-image display item description. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/895) <!-- Reviewable:end -->
|
☀️ Test successful - status-travis |
Add support for borders that use:
The major part of the work is supporting sub-rects when drawing images.
The rest of the work is simply generating image primitives from the
border-image display item description.
This change is