Skip to content
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

Support border-image #879

Closed
jrmuizel opened this issue Feb 14, 2017 · 8 comments
Closed

Support border-image #879

jrmuizel opened this issue Feb 14, 2017 · 8 comments

Comments

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Feb 14, 2017

We need this for rendering Gecko's chrome. We should first come up with an idea of what the interface needs to be.

See also servo/servo#13003

@jrmuizel jrmuizel mentioned this issue Feb 14, 2017
20 of 24 tasks complete
@glennw
Copy link
Member

@glennw glennw commented Feb 14, 2017

@jrmuizel Do you already have something in mind for the interface to this?

@jrmuizel
Copy link
Contributor Author

@jrmuizel jrmuizel commented Feb 14, 2017

I do not.

@glennw
Copy link
Member

@glennw glennw commented Feb 15, 2017

I've had a brief look at the specification. It seems like we could modify the existing BorderDisplayItem from:

pub struct BorderDisplayItem {
    pub left: BorderSide,
    pub right: BorderSide,
    pub top: BorderSide,
    pub bottom: BorderSide,
    pub radius: BorderRadius,
}

to something like:

pub struct NormalBorder {     // What should this be called?
    pub left: BorderSide,
    pub right: BorderSide,
    pub top: BorderSide,
    pub bottom: BorderSide,
    pub radius: BorderRadius,
}

pub struct ImageBorder {
    pub image_key: ImageKey,
    // image slice, repeat params etc
    // border widths
}

pub enum BorderDisplayItem {
    Normal(NormalBorder),
    Image(ImageBorder),
}

Does that seem reasonable?

@glennw
Copy link
Member

@glennw glennw commented Feb 15, 2017

We'd also extend the ImageBorder to be able to specify a gradient or an image key - by extracting the parts of GradientDisplayItem into a standalone Gradient struct.

@mephisto41
Copy link
Contributor

@mephisto41 mephisto41 commented Feb 20, 2017

Anyone working on this? Can I take this? Thanks.

@jrmuizel
Copy link
Contributor Author

@jrmuizel jrmuizel commented Feb 20, 2017

@glennw has it largely implemented here: #895
You can coordinate with him to do the unimplemented bits or start hooking it up to Gecko

@mephisto41
Copy link
Contributor

@mephisto41 mephisto41 commented Feb 20, 2017

Great! Didn't notice it. I'll hook it up to gecko. Thanks for the info.

@glennw
Copy link
Member

@glennw glennw commented Feb 28, 2017

This has landed now.

@glennw glennw closed this Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.