Skip to content

Commit

Permalink
stylo: Update glue for recent changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
heycam committed Jan 9, 2017
1 parent 183c477 commit f24e454
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion components/style/build_gecko.rs
Expand Up @@ -244,7 +244,6 @@ mod bindings {
"NODE_.*",
"NS_FONT_.*",
"NS_STYLE_.*",
"NS_CORNER_.*",
"NS_RADIUS_.*",
"BORDER_COLOR_.*",
"BORDER_STYLE_.*"
Expand All @@ -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
Expand All @@ -279,6 +279,7 @@ mod bindings {
"gfxFontFeature",
"gfxFontVariation",
"GridNamedArea",
"HalfCorner",
"Image",
"ImageURL",
"nsAttrName",
Expand Down
11 changes: 6 additions & 5 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -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

Expand All @@ -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"])
%>

Expand Down
Expand Up @@ -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")}

Expand Down

0 comments on commit f24e454

Please sign in to comment.