зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #14743 - stylo: update bindings (from heycam:bindings-update-13); r=emilio
Bindings update corresponding to https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=94459122fed6b6fbfa5c73c6b1eed0e75d09e357/. r? @emilio Source-Repo: https://github.com/servo/servo Source-Revision: 87acac1ea01ade095be66435eea9b33f68d28b0b
This commit is contained in:
Родитель
61cae9bbf7
Коммит
cfd016aebe
|
@ -333,7 +333,7 @@ mod bindings {
|
|||
"StyleBasicShape",
|
||||
"StyleBasicShapeType",
|
||||
"StyleClipPath",
|
||||
"StyleClipPathGeometryBox",
|
||||
"StyleGeometryBox",
|
||||
"StyleTransition",
|
||||
"mozilla::UniquePtr",
|
||||
"mozilla::DefaultDelete",
|
||||
|
|
|
@ -326,7 +326,7 @@ pub mod basic_shape {
|
|||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleFillRule};
|
||||
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 std::borrow::Borrow;
|
||||
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 {
|
||||
use gecko_bindings::structs::StyleClipPathGeometryBox::*;
|
||||
use gecko_bindings::structs::StyleGeometryBox::*;
|
||||
match reference {
|
||||
GeometryBox::ShapeBox(ShapeBox::Content) => Content,
|
||||
GeometryBox::ShapeBox(ShapeBox::Padding) => Padding,
|
||||
|
@ -483,11 +483,10 @@ pub mod basic_shape {
|
|||
// Will panic on NoBox
|
||||
// Ideally these would be implemented on Option<T>,
|
||||
// but coherence doesn't like that and TryFrom isn't stable
|
||||
impl From<StyleClipPathGeometryBox> for GeometryBox {
|
||||
fn from(reference: StyleClipPathGeometryBox) -> Self {
|
||||
use gecko_bindings::structs::StyleClipPathGeometryBox::*;
|
||||
impl From<StyleGeometryBox> for GeometryBox {
|
||||
fn from(reference: StyleGeometryBox) -> Self {
|
||||
use gecko_bindings::structs::StyleGeometryBox::*;
|
||||
match reference {
|
||||
NoBox => panic!("Shouldn't convert NoBox to GeometryBox"),
|
||||
Content => GeometryBox::ShapeBox(ShapeBox::Content),
|
||||
Padding => GeometryBox::ShapeBox(ShapeBox::Padding),
|
||||
Border => GeometryBox::ShapeBox(ShapeBox::Border),
|
||||
|
@ -495,6 +494,7 @@ pub mod basic_shape {
|
|||
Fill => GeometryBox::Fill,
|
||||
Stroke => GeometryBox::Stroke,
|
||||
View => GeometryBox::View,
|
||||
other => panic!("Unexpected StyleGeometryBox::{:?} while converting to GeometryBox", other),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1062,10 +1062,10 @@ fn static_assert() {
|
|||
"table-header-group table-footer-group table-row table-column-group " +
|
||||
"table-column table-cell table-caption list-item flex none " +
|
||||
"inline-flex grid inline-grid ruby ruby-base ruby-base-container " +
|
||||
"ruby-text ruby-text-container contents -webkit-box -webkit-inline-box " +
|
||||
"-moz-box -moz-inline-box -moz-grid -moz-inline-grid -moz-grid-group " +
|
||||
"-moz-grid-line -moz-stack -moz-inline-stack -moz-deck -moz-popup " +
|
||||
"-moz-groupbox",
|
||||
"ruby-text ruby-text-container contents flow-root -webkit-box " +
|
||||
"-webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid " +
|
||||
"-moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck " +
|
||||
"-moz-popup -moz-groupbox",
|
||||
gecko_enum_prefix="StyleDisplay",
|
||||
gecko_strip_moz_prefix=False) %>
|
||||
|
||||
|
@ -1401,22 +1401,24 @@ fn static_assert() {
|
|||
</%self:simple_image_array_property>
|
||||
|
||||
<%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;
|
||||
|
||||
match servo {
|
||||
T::border_box => structs::NS_STYLE_IMAGELAYER_CLIP_BORDER as u8,
|
||||
T::padding_box => structs::NS_STYLE_IMAGELAYER_CLIP_PADDING as u8,
|
||||
T::content_box => structs::NS_STYLE_IMAGELAYER_CLIP_CONTENT as u8,
|
||||
T::border_box => StyleGeometryBox::Border,
|
||||
T::padding_box => StyleGeometryBox::Padding,
|
||||
T::content_box => StyleGeometryBox::Content,
|
||||
}
|
||||
</%self:simple_image_array_property>
|
||||
|
||||
<%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;
|
||||
|
||||
match servo {
|
||||
T::border_box => structs::NS_STYLE_IMAGELAYER_ORIGIN_BORDER as u8,
|
||||
T::padding_box => structs::NS_STYLE_IMAGELAYER_ORIGIN_PADDING as u8,
|
||||
T::content_box => structs::NS_STYLE_IMAGELAYER_ORIGIN_CONTENT as u8,
|
||||
T::border_box => StyleGeometryBox::Border,
|
||||
T::padding_box => StyleGeometryBox::Padding,
|
||||
T::content_box => StyleGeometryBox::Content,
|
||||
}
|
||||
</%self:simple_image_array_property>
|
||||
|
||||
|
@ -2236,7 +2238,7 @@ clip-path
|
|||
</%self:simple_image_array_property>
|
||||
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::structs::StyleClipPathGeometryBox;
|
||||
use gecko_bindings::structs::StyleGeometryBox;
|
||||
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType};
|
||||
use gecko_bindings::structs::{StyleClipPath, StyleFillRule};
|
||||
use gecko::conversions::basic_shape::set_corners_from_radius;
|
||||
|
@ -2257,7 +2259,7 @@ clip-path
|
|||
}
|
||||
ShapeSource::Shape(servo_shape, maybe_box) => {
|
||||
clip_path.mReferenceBox = maybe_box.map(Into::into)
|
||||
.unwrap_or(StyleClipPathGeometryBox::NoBox);
|
||||
.unwrap_or(StyleGeometryBox::NoBox);
|
||||
clip_path.mType = StyleShapeSourceType::Shape;
|
||||
|
||||
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 {
|
||||
use gecko_bindings::structs::StyleShapeSourceType;
|
||||
use gecko_bindings::structs::StyleClipPathGeometryBox;
|
||||
use gecko_bindings::structs::StyleGeometryBox;
|
||||
use values::computed::basic_shape::*;
|
||||
let ref clip_path = self.gecko.mClipPath;
|
||||
|
||||
|
@ -2356,7 +2358,7 @@ clip-path
|
|||
Default::default()
|
||||
}
|
||||
StyleShapeSourceType::Shape => {
|
||||
let reference = if let StyleClipPathGeometryBox::NoBox = clip_path.mReferenceBox {
|
||||
let reference = if let StyleGeometryBox::NoBox = clip_path.mReferenceBox {
|
||||
None
|
||||
} else {
|
||||
Some(clip_path.mReferenceBox.into())
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
""".split()
|
||||
if product == "gecko":
|
||||
values += """inline-flex grid inline-grid ruby ruby-base ruby-base-container
|
||||
ruby-text ruby-text-container contents -webkit-box -webkit-inline-box
|
||||
-moz-box -moz-inline-box -moz-grid -moz-inline-grid -moz-grid-group
|
||||
-moz-grid-line -moz-stack -moz-inline-stack -moz-deck -moz-popup
|
||||
-moz-groupbox""".split()
|
||||
ruby-text ruby-text-container contents flow-root -webkit-box
|
||||
-webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid
|
||||
-moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck
|
||||
-moz-popup -moz-groupbox""".split()
|
||||
%>
|
||||
pub use self::computed_value::T as SpecifiedValue;
|
||||
use values::computed::ComputedValueAsSpecified;
|
||||
|
|
Загрузка…
Ссылка в новой задаче