aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/table.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-02-10 08:33:19 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-02-12 02:28:00 +0100
commitc2819365f05fc5d16cc8abedc5aa2171338330ad (patch)
tree6cefba97c941d6e4ce99bd5a5aca8380b47c639d /components/layout/table.rs
parent7ed6b9d3ce81ff562344cd9f683be224080de9c7 (diff)
downloadservo-c2819365f05fc5d16cc8abedc5aa2171338330ad.tar.gz
servo-c2819365f05fc5d16cc8abedc5aa2171338330ad.zip
style: Rename MozLength to Size, and MaxLength to MaxSize.
MozLength is not a very descriptive name. If we're going to use it in both Gecko and Servo we may as well name it something more accurate. I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence of box-sizing. I don't have better ideas than `Size`, given that. [1]: https://drafts.csswg.org/css2/visudet.html#propdef-width [2]: https://drafts.csswg.org/css2/box.html#content-width Differential Revision: https://phabricator.services.mozilla.com/D19280
Diffstat (limited to 'components/layout/table.rs')
-rw-r--r--components/layout/table.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/table.rs b/components/layout/table.rs
index 7aa8f2a89d4..9f6219f0980 100644
--- a/components/layout/table.rs
+++ b/components/layout/table.rs
@@ -33,7 +33,7 @@ use style::logical_geometry::LogicalSize;
use style::properties::style_structs::Background;
use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage;
-use style::values::computed::NonNegativeLengthPercentageOrAuto;
+use style::values::computed::Size;
use style::values::CSSFloat;
#[allow(unsafe_code)]
@@ -301,14 +301,14 @@ impl Flow for TableFlow {
self.column_intrinsic_inline_sizes
.push(ColumnIntrinsicInlineSize {
minimum_length: match *specified_inline_size {
- NonNegativeLengthPercentageOrAuto::Auto => Au(0),
- NonNegativeLengthPercentageOrAuto::LengthPercentage(ref lp) => {
+ Size::Auto => Au(0),
+ Size::LengthPercentage(ref lp) => {
lp.maybe_to_used_value(None).unwrap_or(Au(0))
},
},
percentage: match *specified_inline_size {
- NonNegativeLengthPercentageOrAuto::Auto => 0.0,
- NonNegativeLengthPercentageOrAuto::LengthPercentage(ref lp) => {
+ Size::Auto => 0.0,
+ Size::LengthPercentage(ref lp) => {
lp.0.as_percentage().map_or(0.0, |p| p.0)
},
},