Auto merge of #13450 - Wafflespeanut:border_spacing, r=Manishearth

Make use of Servo's border-spacing in Stylo

<!-- 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

<!-- Either: -->
- [x] These changes have been tested manually

![screenshot](https://cloud.githubusercontent.com/assets/6691262/18867760/1fa46376-84c3-11e6-8e63-9fce042f5bb0.png)

r? @Manishearth

<!-- 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/13450)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-30 00:25:08 -05:00 committed by GitHub
commit 76092c437c
2 changed files with 17 additions and 1 deletions

View file

@ -1442,6 +1442,22 @@ fn static_assert() {
</%self:impl_trait>
<%self:impl_trait style_struct_name="InheritedTable"
skip_longhands="border-spacing">
pub fn set_border_spacing(&mut self, v: longhands::border_spacing::computed_value::T) {
self.gecko.mBorderSpacingCol = v.horizontal.0;
self.gecko.mBorderSpacingRow = v.vertical.0;
}
pub fn copy_border_spacing_from(&mut self, other: &Self) {
self.gecko.mBorderSpacingCol = other.gecko.mBorderSpacingCol;
self.gecko.mBorderSpacingRow = other.gecko.mBorderSpacingRow;
}
</%self:impl_trait>
<%self:impl_trait style_struct_name="InheritedText"
skip_longhands="text-align text-shadow line-height word-spacing">

View file

@ -16,7 +16,7 @@ ${helpers.single_keyword("caption-side", "top bottom",
extra_gecko_values="right left top-outside bottom-outside",
animatable=False)}
<%helpers:longhand name="border-spacing" products="servo" animatable="False">
<%helpers:longhand name="border-spacing" animatable="False">
use app_units::Au;
use values::LocalToCss;
use values::HasViewportPercentage;