So as to avoid serializing as identifiers font-families with spaces as part of
the identifier. This avoids serializing confusing escaped sequences if the
beginning of the stuff after the space happens to not be a valid ident start.
This is an slightly more restrictive version of the existing logic, which
happens to also match other browsers in my testing.
Differential Revision: https://phabricator.services.mozilla.com/D62376
--HG--
extra : moz-landing-system : lando
We don't actually share _that_ much code across them. This makes callers clearer
and code less confusing, IMHO.
This also has the benefit of not autocompleting path from devtools for
shape-outside.
Differential Revision: https://phabricator.services.mozilla.com/D62373
--HG--
extra : moz-landing-system : lando
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.
But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().
Differential Revision: https://phabricator.services.mozilla.com/D62164
--HG--
extra : moz-landing-system : lando
Tweak the ShapeSourceRepresentation so that it doesn't store Option<>s.
Some renames so that GeometryBox doesn't conflict with the Gecko type, and some
other usual bits / re-exports to deal with cbindgen and generics.
Also, drive-by derive parsing of GeometryBox as it's trivial.
Doing this unfortunately is not possible without removing nsStyleImage first, so
let's do that before.
This makes us serialize in the shortest form for shape-outside, but that's what
we should do anyway.
(aside: the shapes code is a bit too generic, maybe we should unify
ClippingShape and FloatAreaShape...)
Differential Revision: https://phabricator.services.mozilla.com/D62163
--HG--
extra : moz-landing-system : lando
We include it everywhere because it's included from gfxTypes.h.
This should avoid including all the generated bindings _everywhere_.
Differential Revision: https://phabricator.services.mozilla.com/D62174
--HG--
extra : moz-landing-system : lando
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.
Differential Revision: https://phabricator.services.mozilla.com/D62161
--HG--
extra : moz-landing-system : lando
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.
Differential Revision: https://phabricator.services.mozilla.com/D62161
--HG--
extra : moz-landing-system : lando
Always store the pointer in little-endian order so that the tag trick works.
Differential Revision: https://phabricator.services.mozilla.com/D61386
--HG--
extra : moz-landing-system : lando
For now, we still bail out at the stage of getting the calc node into a
CalcLengthPercentage if we couldn't simplify the min() / max() / clamps()
involved.
After this plan is to use just CalcNode everywhere instead of
specified::CalcLengthPercentage, and then modify the computed
CalcLengthPercentage, which would look slightly different as we know all the sum
terms for those are a struct like { Length, Percentage, bool has_percentage } or
such, so all the simplification code for that becomes much simpler, ideally.
Or we could turn CalcNode generic otherwise, if it's too much code... We'll see.
Differential Revision: https://phabricator.services.mozilla.com/D61739
--HG--
extra : moz-landing-system : lando
There were two issues with the existing code that we use to determine whether a
widget is styled or not.
First, it was using `color == Color::transparent()` instead of
`color.is_transparent()` to check for transparent backgrounds. That is not sound
as `Color::transparent()` is the literal value `rgba(0, 0, 0, 0)`, not the
`transparent` keyword, so the equality check would fail.
The other issue is that this function was early-returning false if that check
was returning false. It is a bug for this function to early-return false, as it
makes the result of the function dependent of the order of the declarations.
Differential Revision: https://phabricator.services.mozilla.com/D62060
--HG--
extra : moz-landing-system : lando
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).
That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.
This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.
It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.
The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.
Differential Revision: https://phabricator.services.mozilla.com/D58519
--HG--
extra : moz-landing-system : lando
Keep a flat list of sum members. Simpify product and division ASAP.
I want to preserve the tree for a bit longer to implement min / max / clamp.
This doesn't do anything for it that we weren't doing already, but it helps to
eventually keep this specified representation and the equivalent computed
representation for <length-percentage> values.
Enable the tests for the comparison functions too, to prevent regressions.
Differential Revision: https://phabricator.services.mozilla.com/D61514
--HG--
extra : moz-landing-system : lando
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).
That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.
This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.
It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.
The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.
Differential Revision: https://phabricator.services.mozilla.com/D58519
--HG--
extra : moz-landing-system : lando
MANUAL PUSH: Patch from contributor was missing this, causing bustage.
CLOSED TREE
--HG--
extra : amend_source : ebf9505656921c452d3b2abac2f5a88f1b99db15
This is needed to make the root element not a containing block in presence of
filters or what not.
Differential Revision: https://phabricator.services.mozilla.com/D61167
--HG--
extra : moz-landing-system : lando