Auto merge of #14743 - heycam:bindings-update-13, r=emilio

stylo: update bindings

Bindings update corresponding to https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=94459122fed6b6fbfa5c73c6b1eed0e75d09e357/.

r? @emilio

<!-- 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/14743)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-12-26 19:25:32 -08:00 committed by GitHub
commit 87acac1ea0
6 changed files with 1286 additions and 1284 deletions

View file

@ -333,7 +333,7 @@ mod bindings {
"StyleBasicShape", "StyleBasicShape",
"StyleBasicShapeType", "StyleBasicShapeType",
"StyleClipPath", "StyleClipPath",
"StyleClipPathGeometryBox", "StyleGeometryBox",
"StyleTransition", "StyleTransition",
"mozilla::UniquePtr", "mozilla::UniquePtr",
"mozilla::DefaultDelete", "mozilla::DefaultDelete",

View file

@ -326,7 +326,7 @@ pub mod basic_shape {
use gecko_bindings::structs; use gecko_bindings::structs;
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleFillRule}; use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleFillRule};
use gecko_bindings::structs::{nsStyleCoord, nsStyleCorners}; use gecko_bindings::structs::{nsStyleCoord, nsStyleCorners};
use gecko_bindings::structs::StyleClipPathGeometryBox; use gecko_bindings::structs::StyleGeometryBox;
use gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue}; use gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
use std::borrow::Borrow; use std::borrow::Borrow;
use values::computed::{BorderRadiusSize, LengthOrPercentage}; use values::computed::{BorderRadiusSize, LengthOrPercentage};
@ -465,9 +465,9 @@ pub mod basic_shape {
} }
} }
impl From<GeometryBox> for StyleClipPathGeometryBox { impl From<GeometryBox> for StyleGeometryBox {
fn from(reference: GeometryBox) -> Self { fn from(reference: GeometryBox) -> Self {
use gecko_bindings::structs::StyleClipPathGeometryBox::*; use gecko_bindings::structs::StyleGeometryBox::*;
match reference { match reference {
GeometryBox::ShapeBox(ShapeBox::Content) => Content, GeometryBox::ShapeBox(ShapeBox::Content) => Content,
GeometryBox::ShapeBox(ShapeBox::Padding) => Padding, GeometryBox::ShapeBox(ShapeBox::Padding) => Padding,
@ -483,11 +483,10 @@ pub mod basic_shape {
// Will panic on NoBox // Will panic on NoBox
// Ideally these would be implemented on Option<T>, // Ideally these would be implemented on Option<T>,
// but coherence doesn't like that and TryFrom isn't stable // but coherence doesn't like that and TryFrom isn't stable
impl From<StyleClipPathGeometryBox> for GeometryBox { impl From<StyleGeometryBox> for GeometryBox {
fn from(reference: StyleClipPathGeometryBox) -> Self { fn from(reference: StyleGeometryBox) -> Self {
use gecko_bindings::structs::StyleClipPathGeometryBox::*; use gecko_bindings::structs::StyleGeometryBox::*;
match reference { match reference {
NoBox => panic!("Shouldn't convert NoBox to GeometryBox"),
Content => GeometryBox::ShapeBox(ShapeBox::Content), Content => GeometryBox::ShapeBox(ShapeBox::Content),
Padding => GeometryBox::ShapeBox(ShapeBox::Padding), Padding => GeometryBox::ShapeBox(ShapeBox::Padding),
Border => GeometryBox::ShapeBox(ShapeBox::Border), Border => GeometryBox::ShapeBox(ShapeBox::Border),
@ -495,6 +494,7 @@ pub mod basic_shape {
Fill => GeometryBox::Fill, Fill => GeometryBox::Fill,
Stroke => GeometryBox::Stroke, Stroke => GeometryBox::Stroke,
View => GeometryBox::View, View => GeometryBox::View,
other => panic!("Unexpected StyleGeometryBox::{:?} while converting to GeometryBox", other),
} }
} }
} }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1062,10 +1062,10 @@ fn static_assert() {
"table-header-group table-footer-group table-row table-column-group " + "table-header-group table-footer-group table-row table-column-group " +
"table-column table-cell table-caption list-item flex none " + "table-column table-cell table-caption list-item flex none " +
"inline-flex grid inline-grid ruby ruby-base ruby-base-container " + "inline-flex grid inline-grid ruby ruby-base ruby-base-container " +
"ruby-text ruby-text-container contents -webkit-box -webkit-inline-box " + "ruby-text ruby-text-container contents flow-root -webkit-box " +
"-moz-box -moz-inline-box -moz-grid -moz-inline-grid -moz-grid-group " + "-webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid " +
"-moz-grid-line -moz-stack -moz-inline-stack -moz-deck -moz-popup " + "-moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck " +
"-moz-groupbox", "-moz-popup -moz-groupbox",
gecko_enum_prefix="StyleDisplay", gecko_enum_prefix="StyleDisplay",
gecko_strip_moz_prefix=False) %> gecko_strip_moz_prefix=False) %>
@ -1401,22 +1401,24 @@ fn static_assert() {
</%self:simple_image_array_property> </%self:simple_image_array_property>
<%self:simple_image_array_property name="clip" shorthand="${shorthand}" field_name="mClip"> <%self:simple_image_array_property name="clip" shorthand="${shorthand}" field_name="mClip">
use gecko_bindings::structs::StyleGeometryBox;
use properties::longhands::${shorthand}_clip::single_value::computed_value::T; use properties::longhands::${shorthand}_clip::single_value::computed_value::T;
match servo { match servo {
T::border_box => structs::NS_STYLE_IMAGELAYER_CLIP_BORDER as u8, T::border_box => StyleGeometryBox::Border,
T::padding_box => structs::NS_STYLE_IMAGELAYER_CLIP_PADDING as u8, T::padding_box => StyleGeometryBox::Padding,
T::content_box => structs::NS_STYLE_IMAGELAYER_CLIP_CONTENT as u8, T::content_box => StyleGeometryBox::Content,
} }
</%self:simple_image_array_property> </%self:simple_image_array_property>
<%self:simple_image_array_property name="origin" shorthand="${shorthand}" field_name="mOrigin"> <%self:simple_image_array_property name="origin" shorthand="${shorthand}" field_name="mOrigin">
use gecko_bindings::structs::StyleGeometryBox;
use properties::longhands::${shorthand}_origin::single_value::computed_value::T; use properties::longhands::${shorthand}_origin::single_value::computed_value::T;
match servo { match servo {
T::border_box => structs::NS_STYLE_IMAGELAYER_ORIGIN_BORDER as u8, T::border_box => StyleGeometryBox::Border,
T::padding_box => structs::NS_STYLE_IMAGELAYER_ORIGIN_PADDING as u8, T::padding_box => StyleGeometryBox::Padding,
T::content_box => structs::NS_STYLE_IMAGELAYER_ORIGIN_CONTENT as u8, T::content_box => StyleGeometryBox::Content,
} }
</%self:simple_image_array_property> </%self:simple_image_array_property>
@ -2236,7 +2238,7 @@ clip-path
</%self:simple_image_array_property> </%self:simple_image_array_property>
pub fn set_clip_path(&mut self, v: longhands::clip_path::computed_value::T) { pub fn set_clip_path(&mut self, v: longhands::clip_path::computed_value::T) {
use gecko_bindings::bindings::{Gecko_NewBasicShape, Gecko_DestroyClipPath}; use gecko_bindings::bindings::{Gecko_NewBasicShape, Gecko_DestroyClipPath};
use gecko_bindings::structs::StyleClipPathGeometryBox; use gecko_bindings::structs::StyleGeometryBox;
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType}; use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType};
use gecko_bindings::structs::{StyleClipPath, StyleFillRule}; use gecko_bindings::structs::{StyleClipPath, StyleFillRule};
use gecko::conversions::basic_shape::set_corners_from_radius; use gecko::conversions::basic_shape::set_corners_from_radius;
@ -2257,7 +2259,7 @@ clip-path
} }
ShapeSource::Shape(servo_shape, maybe_box) => { ShapeSource::Shape(servo_shape, maybe_box) => {
clip_path.mReferenceBox = maybe_box.map(Into::into) clip_path.mReferenceBox = maybe_box.map(Into::into)
.unwrap_or(StyleClipPathGeometryBox::NoBox); .unwrap_or(StyleGeometryBox::NoBox);
clip_path.mType = StyleShapeSourceType::Shape; clip_path.mType = StyleShapeSourceType::Shape;
fn init_shape(clip_path: &mut StyleClipPath, ty: StyleBasicShapeType) -> &mut StyleBasicShape { fn init_shape(clip_path: &mut StyleClipPath, ty: StyleBasicShapeType) -> &mut StyleBasicShape {
@ -2342,7 +2344,7 @@ clip-path
pub fn clone_clip_path(&self) -> longhands::clip_path::computed_value::T { pub fn clone_clip_path(&self) -> longhands::clip_path::computed_value::T {
use gecko_bindings::structs::StyleShapeSourceType; use gecko_bindings::structs::StyleShapeSourceType;
use gecko_bindings::structs::StyleClipPathGeometryBox; use gecko_bindings::structs::StyleGeometryBox;
use values::computed::basic_shape::*; use values::computed::basic_shape::*;
let ref clip_path = self.gecko.mClipPath; let ref clip_path = self.gecko.mClipPath;
@ -2356,7 +2358,7 @@ clip-path
Default::default() Default::default()
} }
StyleShapeSourceType::Shape => { StyleShapeSourceType::Shape => {
let reference = if let StyleClipPathGeometryBox::NoBox = clip_path.mReferenceBox { let reference = if let StyleGeometryBox::NoBox = clip_path.mReferenceBox {
None None
} else { } else {
Some(clip_path.mReferenceBox.into()) Some(clip_path.mReferenceBox.into())

View file

@ -22,10 +22,10 @@
""".split() """.split()
if product == "gecko": if product == "gecko":
values += """inline-flex grid inline-grid ruby ruby-base ruby-base-container values += """inline-flex grid inline-grid ruby ruby-base ruby-base-container
ruby-text ruby-text-container contents -webkit-box -webkit-inline-box ruby-text ruby-text-container contents flow-root -webkit-box
-moz-box -moz-inline-box -moz-grid -moz-inline-grid -moz-grid-group -webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid
-moz-grid-line -moz-stack -moz-inline-stack -moz-deck -moz-popup -moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck
-moz-groupbox""".split() -moz-popup -moz-groupbox""".split()
%> %>
pub use self::computed_value::T as SpecifiedValue; pub use self::computed_value::T as SpecifiedValue;
use values::computed::ComputedValueAsSpecified; use values::computed::ComputedValueAsSpecified;