style: Implement flow-relative values for resize property.

Differential Revision: https://phabricator.services.mozilla.com/D2908
This commit is contained in:
Xidorn Quan 2018-08-08 23:40:06 +00:00 committed by Emilio Cobos Álvarez
parent 5299ce31aa
commit c77ecd6984
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 87 additions and 9 deletions

View file

@ -325,6 +325,7 @@ class Longhand(object):
"OverflowClipBox",
"OverscrollBehavior",
"Percentage",
"Resize",
"SVGOpacity",
"SVGPaintOrder",
"ScrollSnapType",

View file

@ -3106,6 +3106,9 @@ fn static_assert() {
) %>
${impl_keyword('clear', 'mBreakType', clear_keyword)}
<% resize_keyword = Keyword("resize", "None Both Horizontal Vertical") %>
${impl_keyword('resize', 'mResize', resize_keyword)}
<% overflow_x = data.longhands_by_name["overflow-x"] %>
pub fn set_overflow_y(&mut self, v: longhands::overflow_y::computed_value::T) {
use properties::longhands::overflow_x::computed_value::T as BaseType;

View file

@ -422,17 +422,21 @@ ${helpers.single_keyword("page-break-inside",
// CSS Basic User Interface Module Level 3
// http://dev.w3.org/csswg/css-ui
// FIXME support logical values `block` and `inline` (https://drafts.csswg.org/css-logical-props/#resize)
//
// This is APPLIES_TO_PLACEHOLDER so we can override, in the UA sheet, the
// 'resize' property we'd inherit from textarea otherwise. Basically, just
// makes the UA rules easier to write.
${helpers.single_keyword("resize",
"none both horizontal vertical",
products="gecko",
spec="https://drafts.csswg.org/css-ui/#propdef-resize",
flags="APPLIES_TO_PLACEHOLDER",
animation_value_type="discrete")}
${helpers.predefined_type(
"resize",
"Resize",
"computed::Resize::None",
products="gecko",
animation_value_type="discrete",
needs_context=False,
gecko_ffi_name="mResize",
flags="APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-ui/#propdef-resize",
)}
${helpers.predefined_type(
"perspective",