This adds the name of the interface and method to the beginning of the exception
string when reporting the exception from Web IDL codegen, so it's clearer what
was called.
Some existing error messages are adjusted to not duplicate the information
about which method was called.
Differential Revision: https://phabricator.services.mozilla.com/D61521
--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
Otherwise it'd error, which is not great. We could add a custom attribute in
there if needed or something, or fix cbindgen to generate these for us as
described in the issue linked from the comments.
Do this in ServoStyleConstsInlines as that's where we have the guarantee that
the templates have been defined, and that the file is included every time
ServoStyleConsts is included.
Differential Revision: https://phabricator.services.mozilla.com/D61625
--HG--
extra : moz-landing-system : lando
When our position changes from / to absolute / fixed, then we need to reframe
(most likely, at least). But in some easier cases we can just live with a reflow
plus (optionally) a containing-block update or a repaint, depending on the case.
We need to delete the normal position property when this happens and we switch
from static to relative/sticky, and also need to update the handling of
UpdateContainingBlock to avoid making decisions based on position not changing.
This will actually not cause more reframes, as one would expect, because that
optimization became somewhat obsolete by bug 1519371 (which made the
optimization exact).
Differential Revision: https://phabricator.services.mozilla.com/D61142
--HG--
extra : moz-landing-system : lando
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
```
function rename() {
echo "Renaming $1 to $2"
rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}
rename "NS_FOR_CSS_SIDES\(side\)" "for (const auto side : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(s\)" "for (const auto s : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(i\)" "for (const auto i : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(ix\)" "for (const auto ix : mozilla::AllPhysicalSides())"
```
Differential Revision: https://phabricator.services.mozilla.com/D61250
--HG--
extra : moz-landing-system : lando
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
This provides stronger typing and removes a bunch of subtle constants matching.
Differential Revision: https://phabricator.services.mozilla.com/D61058
--HG--
extra : moz-landing-system : lando
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:
<div style="color: transparent">
<div style="color: red">
Red
</div>
</div>
To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".
This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:
<a href="foo">
<span style="color: red">Should be the red color</span>
</a>
Differential Revision: https://phabricator.services.mozilla.com/D60391
--HG--
extra : moz-landing-system : lando
(And while at it, format the end of the other keyword tables so that
cleanup_ktables.py works).
It seems `Window.setCursor` is only used once in our code, maybe
we should remove it...
Differential Revision: https://phabricator.services.mozilla.com/D61090
--HG--
extra : moz-landing-system : lando
Per SVG2 spec, the EBNF allows the path data string to be empty.
An empty path data string disables rendering of the path.
Therefore, we should make path('') a valid path string.
The related spec issue: https://github.com/w3c/fxtf-drafts/issues/392.
Now we serialize `path("")` as `path("")` for offset-path and clip-path.
Differential Revision: https://phabricator.services.mozilla.com/D60771
--HG--
extra : moz-landing-system : lando
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
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
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.
Differential Revision: https://phabricator.services.mozilla.com/D60328
--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
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