to_shmem and to_shmem_derive need a description, and selectors needs a
version bump.
Tweak supply-chain audits / config to deal with now published crates.
Differential Revision: https://phabricator.services.mozilla.com/D226468
When I rewrote this code in bug 1874050, the assumption was that doing
the right thing was fine because we were more likely to take the fast
path for the owned properties (the parent_ptr_eq()).
But given this shows up in profiles, let's do the order-aware comparison
(which might return false in some cases where it doesn't need to, but
seems to be a better trade-off with tons of custom properties).
Differential Revision: https://phabricator.services.mozilla.com/D226612
Product nodes are eagerly resolved during parse time, but sum nodes are
not. This might cause floating point inprecision in sum nodes, which
leads to invalid calculations, e.g. `round(down, (7 - 1) / 3, 1)` would
end up being `round(down, (2.3333333 - 0.33333334), 1)`, then
`round(down, 1.99999996, 1)`, which equals `1`, which is incorrect.
Differential Revision: https://phabricator.services.mozilla.com/D225936
We now fully support the full ColorFunction in the ComputedStyle struct
in layout. This solves an issue where colors are copied on the C++
side.
Some structs had to be renamed to avoid name collisions in the generates
C++ code.
Some specified structs has the #[repr(C)] attribute now to include them
in the ComputedStyle struct. This is not really correct as they are
specified values and only computed values should be there. Splitting all
the unit structs into specified and computed is a lot of changes so
there is a follow up bug here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1924483
Differential Revision: https://phabricator.services.mozilla.com/D225080
When an alpha component is omitted, instead of defaulting to opaque,
colors with an origin color used the alpha from there.
Differential Revision: https://phabricator.services.mozilla.com/D223134
When we have a color that can't be resolved at parse time (or should not
be resolved) then we store the data that was parsed as is to preserve
all the data for round tripping.
Differential Revision: https://phabricator.services.mozilla.com/D220268
Color components can now preserve parsed data, including calc nodes, if
required.
Some of the computed color tests fail, because we don't have the origin
color readily available to determine which color format to use. (e.g.
color instead of rgb). Fixes are in a follow up patch: D220268
Differential Revision: https://phabricator.services.mozilla.com/D220124
The zoom factor is stored as a fixed point number, and the effective zoom may
be close to 0 (because we have to mulitply the zoom values of ancestors).
So we have to make sure we don't divide by zero because the effective zoom
could be zero.
Differential Revision: https://phabricator.services.mozilla.com/D224551
I think this is a bit more consistent, and makes us preserve the
invariant that from_computed_value().to_computed_value() round-trips.
Differential Revision: https://phabricator.services.mozilla.com/D223878
XUL was opted out of support for the CSS display: contents rule due to lack of use, but there may be a valid use case for display: contents in the tab bar with the introduction of tab groups.
See Bug 1918686 for the tab groups use case.
Differential Revision: https://phabricator.services.mozilla.com/D223205
-moz-user-modify is a prefixed CSS property which does _almost_ nothing.
It has some effect on caret painting (as in, you could make a
contenteditable element not paint the caret), but there are better ways
of doing that (caret-color: transparent or so).
It is also documented to do nothing in MDN.
Given that, I plan to try to remove it. Only real risk is that someone
uses for feature detection or so, so I expect the risk to be pretty
minimal.
Differential Revision: https://phabricator.services.mozilla.com/D222984
Given that `LengthPercentage::to_used_value()` accepts an `Au`, and
`NonNegativeLengthPercentage::maybe_to_used_value()` an `Option<Au>`,
it didn't make much sense for `LengthPercentage::maybe_to_used_value()`
to accept an `Option<Length>`.
All callers from Servo and Stylo have an `Option<Au>` that they needed
to convert into `Option<Length>` in order to call this function. Gecko
doesn't call it.
Differential Revision: https://phabricator.services.mozilla.com/D222210
Rename getCSSStyleRules now that it can return something else, and
change getCSSStyleRules_starting_style.html to cover this again.
Unfortunately the asserts in ServoStyleRuleMap.cpp no longer hold,
because the style attribute and other declarations are expected not to
show up there.
Differential Revision: https://phabricator.services.mozilla.com/D222856
I didn't put this behind a pref because it was a bit annoying to do with
the parser changes while keeping it fast, and because, at least nesting
wise, this is unlikely to cause compat issues.
There are some complexities for @scope, which I think I got right.
Fixed the tests not to depend on @scope necessarily per the discussion
in https://github.com/web-platform-tests/interop/issues/697.
Differential Revision: https://phabricator.services.mozilla.com/D222817