Improve properties.mako.rs file structure, take 2

This is a new attempt of #10586, after Simon Sapin's great cleanups in #10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
This commit is contained in:
Per Lundberg 2016-04-21 00:06:25 +03:00
parent a6fc440125
commit d0489f1160
10 changed files with 358 additions and 305 deletions

View file

@ -0,0 +1,12 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
<%page args="data, helpers" />
<% data.new_style_struct("Margin", inherited=False, gecko_ffi_name="nsStyleMargin") %>
% for side in ["top", "right", "bottom", "left"]:
${helpers.predefined_type("margin-" + side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Length(Au(0))")}
% endfor