style: Implement overflow-wrap: anywhere.

Per https://github.com/w3c/csswg-drafts/issues/2682

Differential Revision: https://phabricator.services.mozilla.com/D11328
This commit is contained in:
Emilio Cobos Álvarez 2018-11-08 22:39:34 +00:00
parent 087ac72f73
commit fa764fc8e9
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 36 additions and 7 deletions

View file

@ -324,6 +324,7 @@ class Longhand(object):
"Opacity",
"OutlineStyle",
"OverflowClipBox",
"OverflowWrap",
"OverscrollBehavior",
"Percentage",
"Resize",

View file

@ -1419,6 +1419,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
"NonNegativeNumber": impl_simple,
"Number": impl_simple,
"Opacity": impl_simple,
"OverflowWrap": impl_simple,
"Perspective": impl_style_coord,
"Position": impl_position,
"RGBAColor": impl_rgba_color,

View file

@ -61,15 +61,16 @@ ${helpers.predefined_type(
servo_restyle_damage = "reflow",
)}
// Also known as "word-wrap" (which is more popular because of IE), but this is the preferred
// name per CSS-TEXT 6.2.
${helpers.single_keyword(
// Also known as "word-wrap" (which is more popular because of IE), but this is
// the preferred name per CSS-TEXT 6.2.
${helpers.predefined_type(
"overflow-wrap",
"normal break-word",
gecko_constant_prefix="NS_STYLE_OVERFLOWWRAP",
"OverflowWrap",
"computed::OverflowWrap::Normal",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
alias="word-wrap",
needs_context=False,
servo_restyle_damage="rebuild_and_reflow",
)}