style: Make ExtremumLength::valid_for static.

Differential Revision: https://phabricator.services.mozilla.com/D5975
This commit is contained in:
Emilio Cobos Álvarez 2018-09-17 00:54:43 +00:00
parent 8040c8bfec
commit d5ba19696a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -953,7 +953,7 @@ impl ExtremumLength {
/// 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 {
fn valid_for(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...
@ -1018,7 +1018,7 @@ impl ToComputedValue for specified::MozLength {
.rule_cache_conditions
.borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if !ext.valid_for(
if !ExtremumLength::valid_for(
context.builder.writing_mode,
context.for_non_inherited_property.unwrap(),
) {
@ -1080,7 +1080,7 @@ impl ToComputedValue for specified::MaxLength {
.rule_cache_conditions
.borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if !ext.valid_for(
if !ExtremumLength::valid_for(
context.builder.writing_mode,
context.for_non_inherited_property.unwrap(),
) {