This brings us alignas support and also associated constants for bitfield enums.
Differential Revision: https://phabricator.services.mozilla.com/D15334
--HG--
extra : moz-landing-system : lando
Replace LengthOrPercentage with NonNegativeLengthOrPercentage on
ShapeRadius, Circle, Ellipse. And derive ToAnimatedValue for ShapeSource and
its related types, so we clamp its interpolated results into non-negative
values. (i.e. The radius of circle()/ellipse() and the border-radius of
inset().)
Note: We may get negative values when using a negative easing function, so the
clamp is necessary to avoid the incorrect result or any undefined behavior.
Differential Revision: https://phabricator.services.mozilla.com/D14654
--HG--
extra : moz-landing-system : lando
We should let block-size/min-block-size/max-block-size accept keywords as the
initial value, just like width in vertical writing mode or height in horizontal
writing mode.
Depends on D7536
Differential Revision: https://phabricator.services.mozilla.com/D14320
--HG--
extra : moz-landing-system : lando
Support unprefixed min-content and max-content and treat the prefixed
version as aliases for
1. width, min-width, max-width if inline-axis is horizontal, and
2. height, min-height, max-height if inline-axis is vertical, and
3. inline-size, min-inline-size, max-inline-size, and
4. flex-basis.
Besides, update the test cases to use unprefixed max-content and
min-content.
Depends on D7535
Differential Revision: https://phabricator.services.mozilla.com/D7536
--HG--
extra : moz-landing-system : lando
ExtremumLength is the keyword type for css sizing properties, so we
could use cbindgen.
In Gecko, we use nsStyleCoord to store the sizing properties, and use
integer values to check the enum values, so I keep the macros in nsStyleConsts.
Even though we need to convert the enum type into integer, we still have
benefits to reduce the complexity of converting Rust into C++, and leave
the simplified mappings in C++ for better readability.
Differential Revision: https://phabricator.services.mozilla.com/D7535
--HG--
extra : moz-landing-system : lando
This ended up not being so small of a patch as I'd have thought, since it
propagated a bit. But most of it is mechanical. Interesting part is
NonNegativeNumberOrPercentage and the actual uses of the NonNegative stuff and
during parsing.
This looks like it'd fix a few correctness issues during interpolation for all
the types except for BorderRadius and co (which handled it manually).
I should write tests for those in a different patch.
Depends on D14672
Differential Revision: https://phabricator.services.mozilla.com/D14673
--HG--
extra : moz-landing-system : lando
I'm about to introduce another use of it and I don't want to repeat the same
copy-pasta again.
Differential Revision: https://phabricator.services.mozilla.com/D14672
--HG--
extra : moz-landing-system : lando
Since it allows to animate display, which is not good.
This is a regression from:
https://hg.mozilla.org/mozilla-central/rev/6884ba750aa3
Actually I wonder if the logic shouldn't be the other way around, i.e., a
shorthand is animatable if all the longhands are, not if just one.
In any case this rolls back to the previous behavior, should we do that, it
should be another bug.
Differential Revision: https://phabricator.services.mozilla.com/D14632
--HG--
extra : moz-landing-system : lando
Previously we'd omit it since it was merely an explicit way of requesting the
default behavior. But the spec has changed such that it's not necessarily
equivalent to the default anymore:
https://drafts.csswg.org/css-align/#overflow-values
(Technically the behaviors are probably still equivalent in our implementation,
pending bug 1451380, but we don't have to publicize that via our
serialization.)
Differential Revision: https://phabricator.services.mozilla.com/D14599
--HG--
extra : moz-landing-system : lando
We could keep using ParsedCaseSensitivity::CaseSensitive as a temporary stand-in
for "case-sensitive or maybe not depending on what HTML says" until we check the
attribute list, but it seems better to make that explicit.
Differential Revision: https://phabricator.services.mozilla.com/D14093
--HG--
extra : moz-landing-system : lando
This allows to experiment with other hash maps easily rather than
depending on what hashglobe::fake::HashMap dereferences to.
In particular I wrote it while trying to get a build working with hashbrown.
Differential Revision: https://phabricator.services.mozilla.com/D14098
--HG--
extra : moz-landing-system : lando
I'm pretty sure the FIXME I left in the outline-style code is a bug,
but I want to clean this up further and I didn't want to fix it without adding
a test.
Differential Revision: https://phabricator.services.mozilla.com/D12859
--HG--
extra : moz-landing-system : lando
This is all the style-system work needed for this.
This implements the concept of legacy shorthands, teaches tests to understand
it, and adds a few more tests for these properties in particular.
The WPT even caught a few WebKit / Blink bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=906336https://bugs.webkit.org/show_bug.cgi?id=191803
This doesn't change the layout behavior for page-break-before: always, since
it'd stop breaking in multicol and such. Similarly, break-before / break-after:
column and page still behave the same, I'll file followups for those given
comment 22.
Differential Revision: https://phabricator.services.mozilla.com/D12211
--HG--
extra : moz-landing-system : lando