mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Sprinkle some comments.
This commit is contained in:
parent
32c409d5aa
commit
ed2ba30261
2 changed files with 11 additions and 2 deletions
|
@ -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",
|
||||
|
|
|
@ -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))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue