style: Sprinkle some comments.

This commit is contained in:
Emilio Cobos Álvarez 2018-02-07 03:11:14 +01:00
parent 32c409d5aa
commit ed2ba30261
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 11 additions and 2 deletions

View file

@ -164,7 +164,8 @@ ${helpers.predefined_type("order", "Integer", "0",
// FIXME: Gecko doesn't support content value yet.
//
// FIXME(emilio): I suspect this property shouldn't allow quirks, and this
// was just a mistake.
// was just a mistake, it's kind of justificable to support it given the
// spec grammar is just `content | <width>`, but other browsers don't...
${helpers.predefined_type(
"flex-basis",
"MozLength",

View file

@ -891,9 +891,15 @@ pub enum ExtremumLength {
impl ExtremumLength {
/// Returns whether this size keyword can be used for the given writing-mode
/// and property.
///
/// TODO: After these values are supported for both axes (and maybe
/// unprefixed, see bug 1322780) all this complexity can go away, and
/// everything can be derived (no need for uncacheable stuff).
fn valid_for(&self, wm: WritingMode, longhand: LonghandId) -> bool {
// We only make sense on the inline axis.
match longhand {
// FIXME(emilio): The flex-basis thing is not quite clear...
LonghandId::FlexBasis |
LonghandId::MinWidth |
LonghandId::MaxWidth |
LonghandId::Width => !wm.is_vertical(),
@ -919,7 +925,9 @@ impl ExtremumLength {
}
}
/// A value suitable for a `min-width`, `min-height`, `width` or `height` property.
/// A value suitable for a `min-width`, `min-height`, `width` or `height`
/// property.
///
/// See values/specified/length.rs for more details.
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]