This simplifies a bit the code, and guarantees that all calc()s have percentages
and lengths.
I also wanted to remove unclamped_length() / specified_percentage() (for the
same reason as the above patch), but they're needed for animations for now. When
I implement min() / max() for <length-percentage> they'll be fixed.
Differential Revision: https://phabricator.services.mozilla.com/D60194
--HG--
extra : moz-landing-system : lando
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.
Differential Revision: https://phabricator.services.mozilla.com/D60168
--HG--
extra : moz-landing-system : lando
It does not make any sense with min() / max() / clamp. So just forget the
keyword info when calc() is used. This also removes a bit of complex / hacky
code.
Differential Revision: https://phabricator.services.mozilla.com/D60663
--HG--
extra : moz-landing-system : lando
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60045
--HG--
extra : moz-landing-system : lando
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60044
--HG--
extra : moz-landing-system : lando
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60045
--HG--
extra : moz-landing-system : lando
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60044
--HG--
extra : moz-landing-system : lando
Introduce a new pref "layout.css.prefixes.columns" to guard the prefixed
aliases.
The modification to `properties-db.js` was generated by
`./mach devtools-css-db`.
Differential Revision: https://phabricator.services.mozilla.com/D59564
--HG--
extra : moz-landing-system : lando
So for everything but <length> and <length-percentage>, which have more complex
mechanics.
The pref is off for now of course.
Differential Revision: https://phabricator.services.mozilla.com/D60012
--HG--
extra : moz-landing-system : lando
So that extending it to support other math functions like min / max / etc is
simpler.
There should be no behavior change with this patch, though I added a comment to
some places where we don't do calc() clamping correctly (though other browsers
don't either so...).
Differential Revision: https://phabricator.services.mozilla.com/D59939
--HG--
extra : moz-landing-system : lando
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.
I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.
Differential Revision: https://phabricator.services.mozilla.com/D57193
--HG--
extra : moz-landing-system : lando
PDFJS uses it, for example to allow text selection. It's not great if it shows
on top of the actual PDF :-)
Differential Revision: https://phabricator.services.mozilla.com/D58703
--HG--
extra : moz-landing-system : lando
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.
I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.
Differential Revision: https://phabricator.services.mozilla.com/D57193
--HG--
extra : moz-landing-system : lando
To implement safe area support on Gecko, we should get safe area from Device.
Differential Revision: https://phabricator.services.mozilla.com/D52504
--HG--
extra : moz-landing-system : lando
CssEnvironment alwasy is in Device, so use Device as parameter instead of CssEnvironment.
Differential Revision: https://phabricator.services.mozilla.com/D52507
--HG--
extra : moz-landing-system : lando
Although CssEnvironment is in Device of media query implementation, some code
creates CssEnvironment instance without Device. So I would like always to use it from Device of media query.
Differential Revision: https://phabricator.services.mozilla.com/D52506
--HG--
extra : moz-landing-system : lando
So that it takes one pointer instead of two, and doesn't make nsStylePosition's
size blow up.
This is not as ugly as I was fearing, thankfully, though it requires a bit of
boilerplate. I think it's acceptable.
Differential Revision: https://phabricator.services.mozilla.com/D58702
--HG--
extra : moz-landing-system : lando
I'm (sadly) about to make it a bit more complicated to pack it better. So we
may as well do this so it is easier to reason about navigate.
I also reordered things a bit, and removed some From<> implementations and
such.
Differential Revision: https://phabricator.services.mozilla.com/D58701
--HG--
rename : servo/components/style/values/computed/length.rs => servo/components/style/values/computed/length_percentage.rs
extra : moz-landing-system : lando
This is needed to support min() / max() / clamp(), etc, as those need to be a
tree of values and thus need heap storage.
This unfortunately grows LengthPercentage to be two pointers, which is bad as
it blows up the size of nsStylePosition enough to trigger the size assertions.
This patch comments out the assertion for now, the follow-up patches will
uncomment them.
Differential Revision: https://phabricator.services.mozilla.com/D58700
--HG--
extra : moz-landing-system : lando
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.
This is more similar to everything else, and fixes the bug.
Differential Revision: https://phabricator.services.mozilla.com/D58726
--HG--
extra : moz-landing-system : lando
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.
This is more similar to everything else, and fixes the bug.
Differential Revision: https://phabricator.services.mozilla.com/D58726
--HG--
extra : moz-landing-system : lando
This cleans up and also allows us to keep the distinction between content: none
and content: normal, which allows us to fix the computed style we return from
getComputedStyle().
Do this last bit from the resolved value instead of StyleAdjuster, because
otherwise we need to tweak every initial struct for ::before / ::after.
Differential Revision: https://phabricator.services.mozilla.com/D58276
--HG--
extra : moz-landing-system : lando
Do the same we do for classes for now. We could be more precise and achieve a
bit more sharing with some more effort (left a comment there), but it seems
unlikely to matter in practice (and if we did that, we'd probably want to do the
same for classes).
Differential Revision: https://phabricator.services.mozilla.com/D58453
--HG--
extra : moz-landing-system : lando
This matches the new servo layout engine too, and thus removes some #[cfg]
gunk. Just use `flow` since it doesn't simplify the layout code as much.
Differential Revision: https://phabricator.services.mozilla.com/D45973
--HG--
extra : moz-landing-system : lando
Font code is the only thing that was using Au in the style system without
interfacing with Gecko, and there was no real reason for it to do so.
This slightly simplifies the code.
Differential Revision: https://phabricator.services.mozilla.com/D57248
--HG--
extra : moz-landing-system : lando