stylo: Update glue for recent changes.

This commit is contained in:
Cameron McCormack 2017-01-09 11:11:55 +08:00
parent 183c4772e7
commit f24e4543fe
3 changed files with 9 additions and 6 deletions

View file

@ -244,7 +244,6 @@ mod bindings {
"NODE_.*",
"NS_FONT_.*",
"NS_STYLE_.*",
"NS_CORNER_.*",
"NS_RADIUS_.*",
"BORDER_COLOR_.*",
"BORDER_STYLE_.*"
@ -256,6 +255,7 @@ mod bindings {
"mozilla::ConsumeStyleBehavior",
"mozilla::CSSPseudoClassType",
"mozilla::css::SheetParsingMode",
"mozilla::HalfCorner",
"mozilla::TraversalRootBehavior",
"mozilla::DisplayItemClip", // Needed because bindgen generates
// specialization tests for this even
@ -279,6 +279,7 @@ mod bindings {
"gfxFontFeature",
"gfxFontVariation",
"GridNamedArea",
"HalfCorner",
"Image",
"ImageURL",
"nsAttrName",

View file

@ -596,10 +596,10 @@ class Side(object):
self.index = index
class Corner(object):
def __init__(self, name, index):
self.x_name = "NS_CORNER_" + name + "_X"
self.y_name = "NS_CORNER_" + name + "_Y"
self.ident = name.lower()
def __init__(self, vert, horiz, index):
self.x_name = "HalfCorner::eCorner" + vert + horiz + "X"
self.y_name = "HalfCorner::eCorner" + vert + horiz + "Y"
self.ident = (vert + "_" + horiz).lower()
self.x_index = 2 * index
self.y_index = 2 * index + 1
@ -610,7 +610,8 @@ class GridLine(object):
self.gecko = "m" + to_camel_case(self.ident)
SIDES = [Side("Top", 0), Side("Right", 1), Side("Bottom", 2), Side("Left", 3)]
CORNERS = [Corner("TOP_LEFT", 0), Corner("TOP_RIGHT", 1), Corner("BOTTOM_RIGHT", 2), Corner("BOTTOM_LEFT", 3)]
CORNERS = [Corner("Top", "Left", 0), Corner("Top", "Right", 1),
Corner("Bottom", "Right", 2), Corner("Bottom", "Left", 3)]
GRID_LINES = map(GridLine, ["row-start", "row-end", "column-start", "column-end"])
%>

View file

@ -155,6 +155,7 @@ ${helpers.single_keyword("text-transform",
spec="https://drafts.csswg.org/css-text/#propdef-text-transform")}
${helpers.single_keyword("hyphens", "none manual auto",
gecko_enum_prefix="StyleHyphens",
products="gecko", animatable=False,
spec="https://drafts.csswg.org/css-text/#propdef-hyphens")}