The tricky bit is rotate() which in SVG means something different if
there's an origin (you translate-then-untranslate it).
But this seems to work off-hand, and fix the reminder of bug 1906261.
Differential Revision: https://phabricator.services.mozilla.com/D215788
Instead, lazily schedule evaluation of them before styling, much like we
were doing for SVG.
A subtle tweak is that we only remain scheduled while in the document.
This allows us to use the "in document" bit plus the "mapped attributes
dirty" bit to know our scheduled status. It also prevents doing silly
work for disconnected elements, and having to do hashmap lookups on
adoption and node destruction.
Differential Revision: https://phabricator.services.mozilla.com/D181549
Instead, lazily schedule evaluation of them before styling, much like we
were doing for SVG.
A subtle tweak is that we only remain scheduled while in the document.
This allows us to use the "in document" bit plus the "mapped attributes
dirty" bit to know our scheduled status. It also prevents doing silly
work for disconnected elements, and having to do hashmap lookups on
adoption and node destruction.
Differential Revision: https://phabricator.services.mozilla.com/D181549
This doesn't change behavior on its own. It could be split up a bit more
if needed though over all it shouldn't be hard to follow.
Unify nsHTMLStyleSheet and nsHTMLCSSStyleSheet into AttributeStyles
because the fact that we have two right now is pretty silly. They are
also not stylesheets (they used to be pre-stylo).
Differential Revision: https://phabricator.services.mozilla.com/D181414
ParseAttribute ideally would be const (see bug 1829138), but the SVG and
SMIL code is rather messy. Still, now that BeforeSetAttr can't really
fail, swapping the order of ParseAttribute and BeforeSetAttr shouldn't
really change behavior.
Sorry for the extra `virtual` keyword removal and such. I had to do this
one by hand unlike the dependent bugs, and I went a bit drive-by, lmk if
you want me to split those changes.
Differential Revision: https://phabricator.services.mozilla.com/D176086
Same rg + sed shenanigans as the first patch.
There were two that could fail, both due to OOM:
* HTMLInputElement::AfterSetAttr: If we fail (only in the type=range
case) we end up with an old value without it being clamped by
min/max/step.
* HTMLBodyElement::AfterSetAttr: If we fail we won't peek up the
DocShell's frame margins and styling could be incorrect.
That seems better than having to deal with broken states after we've
already set the attribute.
Depends on D176069
Differential Revision: https://phabricator.services.mozilla.com/D176070
rg BeforeSetAttr -l | xargs sed -i 's/nsresult BeforeSetAttr/void BeforeSetAttr/g'
rg ::BeforeSetAttr -l | xargs sed -i 's/nsresult \(.*\)::BeforeSetAttr/void \1::BeforeSetAttr/g'
Plus trivial fixes, plus clang-format.
The only meaningful changes are in nsXULElement::BeforeSetAttr. Two
things could fail:
chromemargin: I removed it because we don't use the parsed attribute any
other place than here:
https://searchfox.org/mozilla-central/rev/31f5847a4494b3646edabbdd7ea39cb88509afe2/dom/xul/ChromeObserver.cpp#136
And that deals just fine with it not being parsed.
usercontextid: We have a debug assertion that we don't dynamically change it.
I kept it but I don't think it's worth failing to set the attribute on release for that
Differential Revision: https://phabricator.services.mozilla.com/D176069
Merge sFontSpecificationMap into sTextContentElementsMap since they always exist together
Move IsAttributeMapped for text elements to SVGTextContentElement so all text (text, tspan, textPath) share a single common implementation.
Differential Revision: https://phabricator.services.mozilla.com/D172377
It seems Blink / WebKit run this even if in the same document, but it
seems less-potentially-breaking to restrict this to the cross-document
case.
Though at least on the test-case it seems it's loading from the same
origin, which is a bit dubious to restrict...
Differential Revision: https://phabricator.services.mozilla.com/D138369
So we update d property in the style system as well. This makes sure we
have the correct computed style and the correct rendering result.
Differential Revision: https://phabricator.services.mozilla.com/D115570
This should ensure that we print SMIL animations, and also that we don't
mess up when the SVG use element propagates the internal values to
<symbol> / <svg>.
Differential Revision: https://phabricator.services.mozilla.com/D113177
New wpt contains an image with an onload attribute. Image elements send a load event but that's transformed into an SVGLoad event and then we don't pick that up.
onSVGLoad and onSVGScroll are deprecated anyway. Let's just keep them for <svg> elements for now.
Differential Revision: https://phabricator.services.mozilla.com/D92581
- Convert DOMSVGAnimatedString to a concrete class rather than having two almost identical derived classes that differ only by the class of the mVal pointer
- Introduce tear off support for SVGAnimatedClass
- Move to native refcounting rather than nsISupports
Differential Revision: https://phabricator.services.mozilla.com/D84924
- Convert DOMSVGAnimatedString to a concrete class rather than having two almost identical derived classes that differ only by the class of the mVal pointer
- Introduce tear off support for SVGAnimatedClass
- Move to native refcounting rather than nsISupports
Differential Revision: https://phabricator.services.mozilla.com/D84924
Also removes some mozilla:: where its no longer needed
Note that this patch was created by running
sed -e -i '.bak' 's/typedef ([a-zA-Z0-9:]+) ([a-zA-Z0-9:]+)/using \2 = \1/'
and then fixing up a few cases that didn't work.
Differential Revision: https://phabricator.services.mozilla.com/D83294
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.
Differential Revision: https://phabricator.services.mozilla.com/D83140