Daniel Bratell
unread,Feb 13, 2019, 9:44:48 AM2/13/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to layou...@chromium.org, styl...@chromium.org
As part of a task to move kAuto and kFixed (from enum LengthType) out of
the blink namespace where they clash or get shadowed by many other kAuto
and kFixed, I've just added wrapper methods for creating various flavours
of Length.
Yesterday:
return Length(CalculateFoo(x) + 10.0 + SomePaddingMaybe(y, and, stuff),
kFixed);
Now:
return Length::Fixed(CalculateFoo(x) + 10.0 + SomePaddingMaybe(y, and,
stuff));
This is slightly more readable (IMHO), but more importantly it will allow
kFixed to move into some tighter namespace/scope without making the code
more verbose.
The same change was done to kAuto (Length::Auto()), kPercent
(Length::Percent(x)) and all the others.
The old constructor is still available for those cases where you
programmatically need to set a type, though I'm not sure that constructor
is actually needed anymore.
/Daniel
--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */