mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Implement the flow-relative border-radius properties.
Bug: 1520684 Reviewed-by: emilio
This commit is contained in:
parent
beb4ad91af
commit
c40839a24f
1 changed files with 15 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||||
<% from data import Keyword, Method, PHYSICAL_SIDES, ALL_SIDES, maybe_moz_logical_alias %>
|
<% from data import Keyword, Method, ALL_CORNERS, PHYSICAL_SIDES, ALL_SIDES, maybe_moz_logical_alias %>
|
||||||
|
|
||||||
<% data.new_style_struct("Border", inherited=False,
|
<% data.new_style_struct("Border", inherited=False,
|
||||||
additional_methods=[Method("border_" + side + "_has_nonzero_width",
|
additional_methods=[Method("border_" + side + "_has_nonzero_width",
|
||||||
|
@ -70,17 +70,27 @@ ${helpers.gecko_keyword_conversion(
|
||||||
)}
|
)}
|
||||||
|
|
||||||
// FIXME(#4126): when gfx supports painting it, make this Size2D<LengthPercentage>
|
// FIXME(#4126): when gfx supports painting it, make this Size2D<LengthPercentage>
|
||||||
% for corner in ["top-left", "top-right", "bottom-right", "bottom-left"]:
|
% for corner in ALL_CORNERS:
|
||||||
|
<%
|
||||||
|
corner_name = corner[0]
|
||||||
|
is_logical = corner[1]
|
||||||
|
if is_logical:
|
||||||
|
prefixes = None
|
||||||
|
else:
|
||||||
|
prefixes = "webkit"
|
||||||
|
%>
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
"border-" + corner + "-radius",
|
"border-%s-radius" % corner_name,
|
||||||
"BorderCornerRadius",
|
"BorderCornerRadius",
|
||||||
"computed::BorderCornerRadius::zero()",
|
"computed::BorderCornerRadius::zero()",
|
||||||
"parse",
|
"parse",
|
||||||
extra_prefixes="webkit",
|
extra_prefixes=prefixes,
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#border-%s-radius" % corner,
|
spec=maybe_logical_spec(corner, "radius"),
|
||||||
boxed=True,
|
boxed=True,
|
||||||
flags="APPLIES_TO_FIRST_LETTER",
|
flags="APPLIES_TO_FIRST_LETTER",
|
||||||
animation_value_type="BorderCornerRadius",
|
animation_value_type="BorderCornerRadius",
|
||||||
|
logical_group="border-radius",
|
||||||
|
logical=is_logical,
|
||||||
)}
|
)}
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue