Граф коммитов

90 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 8a62f66450 Bug 1915971 - Simplify PrependLocalTransformsTo. r=longsonr
Now that there's only one transform kind seems worth doing this.

Differential Revision: https://phabricator.services.mozilla.com/D220733
2024-09-02 17:26:21 +00:00
Emilio Cobos Álvarez 0d05060885 Bug 1915971 - Remove the concept of eUserSpaceToParent transforms. r=longsonr
After mapping the transform attribute we don't use it, it always returns
the input matrix.

Differential Revision: https://phabricator.services.mozilla.com/D220732
2024-09-02 17:26:20 +00:00
Butkovits Atila 8b044eeb9c Backed out 4 changesets (bug 1914221, bug 1915971) for causing failures at anim-pattern-attr-presence-01.svg. CLOSED TREE
Backed out changeset 7c8cd02e4dd7 (bug 1915971)
Backed out changeset 7174d7871cce (bug 1915971)
Backed out changeset 3985054aeea4 (bug 1915971)
Backed out changeset e748e0d3a446 (bug 1914221)
2024-09-02 18:58:50 +03:00
Emilio Cobos Álvarez 6b44952143 Bug 1915971 - Simplify PrependLocalTransformsTo. r=longsonr
Now that there's only one transform kind seems worth doing this.

Differential Revision: https://phabricator.services.mozilla.com/D220733
2024-09-02 13:15:09 +00:00
Emilio Cobos Álvarez a90731978c Bug 1915971 - Remove the concept of eUserSpaceToParent transforms. r=longsonr
After mapping the transform attribute we don't use it, it always returns
the input matrix.

Differential Revision: https://phabricator.services.mozilla.com/D220732
2024-09-02 13:15:09 +00:00
Butkovits Atila 5092c79785 Backed out 4 changesets (bug 1914221, bug 1915971) for causing failures at pattern-transform-presence-01.svg. CLOSED TREE
Backed out changeset 3071e3421b42 (bug 1915971)
Backed out changeset b80fe7906441 (bug 1915971)
Backed out changeset 0a2beb7878df (bug 1915971)
Backed out changeset 8b2fd5bd4301 (bug 1914221)
2024-09-02 15:36:54 +03:00
Emilio Cobos Álvarez 748004681d Bug 1915971 - Simplify PrependLocalTransformsTo. r=longsonr
Now that there's only one transform kind seems worth doing this.

Differential Revision: https://phabricator.services.mozilla.com/D220733
2024-09-02 11:05:34 +00:00
Emilio Cobos Álvarez 1996897f14 Bug 1915971 - Remove the concept of eUserSpaceToParent transforms. r=longsonr
After mapping the transform attribute we don't use it, it always returns
the input matrix.

Differential Revision: https://phabricator.services.mozilla.com/D220732
2024-09-02 11:05:34 +00:00
Emilio Cobos Álvarez 4aa1ad81ba Bug 878346 - Make transform a mapped attribute for SVG. r=longsonr,firefox-style-system-reviewers,zrhoffman
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
2024-08-21 15:00:48 +00:00
Sylvestre Ledru 45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
longsonr c77548fee7 Bug 1891002 - Make DidAnimateAttribute virtual rather than DidAnimateString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D207275
2024-04-12 15:26:36 +00:00
longsonr d8dd9fc6ae Bug 1354393 - remove flush in SMILAnimationController::DoSample r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D206847
2024-04-09 15:35:30 +00:00
Robert Longson 120a330b0f Bug 1857820 - Simplify checking for percent units on offset attribute r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190403
2023-10-12 09:40:24 +00:00
Robert Longson e01d015097 Bug 825254 - SMIL animateMotion should react to the path itself being animated r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181930
2023-07-13 12:15:22 +00:00
Emilio Cobos Álvarez 7bddcf9e5a Bug 1839223 - Remove nsMappedAttributes. r=smaug
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
2023-06-22 17:22:03 +00:00
Cristian Tuns 6957543e5e Backed out changeset a3e55d5f9f13 (bug 1839223) for causing multiple failures in Document.cpp CLOSED TREE 2023-06-22 11:34:15 -04:00
Emilio Cobos Álvarez 2c6de5f038 Bug 1839223 - Remove nsMappedAttributes. r=smaug
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
2023-06-22 14:31:16 +00:00
Emilio Cobos Álvarez 1c92ed74cb Bug 1839255 - Clean up a bit the mapped attribute set-up. r=smaug
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
2023-06-20 10:02:44 +00:00
Emilio Cobos Álvarez 21981d4a06 Bug 1831328 - Transfer nonce slot when moved across documents. r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D178297
2023-05-17 16:38:44 +00:00
Emilio Cobos Álvarez 25b79c7b15 Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug
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
2023-04-21 09:25:17 +00:00
Emilio Cobos Álvarez 51758cfc9b Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug
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
2023-04-21 08:56:27 +00:00
Emilio Cobos Álvarez ee4c38a50c Bug 1829189 - Make BeforeSetAttr infallible. r=smaug
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
2023-04-21 08:56:27 +00:00
Robert Longson 4264460c99 Bug 367994 - Map all SVG styles to all non-animation SVG elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172590
2023-03-15 19:13:51 +00:00
Cosmin Sabou f87f82e3b9 Backed out changeset 77efe6b04864 (bug 367994) for causing SVGLength animation wpt failures. CLOSED TREE 2023-03-15 17:11:05 +02:00
Robert Longson 23eb98ba93 Bug 367994 - Map all SVG styles to all non-animation SVG elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172590
2023-03-15 13:27:02 +00:00
Robert Longson f150902520 Bug 1821913 part 3 - Merge sFillStrokeMap into sGraphicsMap since they are always present together r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172379
2023-03-13 16:58:48 +00:00
Robert Longson 34d680d9dc Bug 1821913 part 1 - Simplify IsAttributeMapped for SVG text r=emilio
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
2023-03-13 16:58:47 +00:00
Robert Longson 45eb233e35 Bug 1813322 - use should be able to target any SVGGraphicsElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168201
2023-01-31 11:53:32 +00:00
Adam Vandolder 151aa8e164 Bug 1575154 - Add autofocus attribute to HTMLOrForeignElement. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D163753
2022-12-19 15:09:15 +00:00
Narcis Beleuzu 6da804aed4 Backed out changeset 34ec63cced63 (bug 1575154) for causing wpt failures on idlharness.https.html . CLOSED TREE 2022-12-15 23:10:35 +02:00
Adam Vandolder 8a69b66390 Bug 1575154 - Add autofocus attribute to HTMLOrForeignElement. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D163753
2022-12-15 18:37:28 +00:00
Robert Longson 8ef190fc79 Bug 1803917 - Remove virtual keyword from override methods in SVG DOM r=emilio
Depends on D163774

Differential Revision: https://phabricator.services.mozilla.com/D163775
2022-12-03 19:18:26 +00:00
Emilio Cobos Álvarez 8c99b6befb Bug 1754522 - Limit cross-document content loadable via <svg:use>. r=dholbert
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
2022-02-26 16:17:17 +00:00
somdatta 98b05fd89a Bug 1586014- Factor out RecompileScriptEventListeners r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129974
2021-11-04 18:24:58 +00:00
Boris Chiou 5918c183ff Bug 1340422 - Part 7: Notify style system when SMIL animation changes d attribute. r=emilio
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
2021-06-09 21:17:23 +00:00
Emilio Cobos Álvarez 21d031a737 Bug 1706939 - Copy internal attribute values from SVG elements for printing. r=longsonr
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
2021-04-23 19:39:38 +00:00
Emilio Cobos Álvarez d9e2be55c5 Bug 1706939 - Make the SVG attribute code a bit more generic. r=longsonr
This could still be massively improved... Why the heck are we doing so
many virtual calls to parse an attribute? :(

Differential Revision: https://phabricator.services.mozilla.com/D113205
2021-04-23 19:39:37 +00:00
longsonr f292216c4e Bug 1687195 - Invalid enums should return the initial value, not the unknown value r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D102131
2021-01-18 15:57:55 +00:00
Csoregi Natalia 1091647af5 Backed out changeset ecd3cad19246 (bug 1687195) for reftest failures on /feBlend-1.svg. CLOSED TREE 2021-01-18 14:36:37 +02:00
longsonr 3beb46b1eb Bug 1687195 - Invalid enums should return the initial value, not the unknown value r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D102131
2021-01-18 11:10:56 +00:00
Simon Giesecke 262d17a458 Bug 1676356 - Avoid including ServoStyleConsts.h in header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D96536

Depends on D96535
2020-11-23 16:08:47 +00:00
longsonr 86058b1869 Bug 1668942 - Fix image onload attribute r=jwatt
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
2020-10-07 12:47:31 +00:00
longsonr 7d4aaf0b25 Bug 571734 - rewrite DOMSVGLength r=emilio
- Remove various redundant fields to shrink size by two pointers per instance

Differential Revision: https://phabricator.services.mozilla.com/D86365
2020-08-25 18:25:52 +00:00
longsonr 0433fcdc52 Bug 1655324 - rewrite DOMSVGAnimatedString r=heycam
- 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
2020-08-10 07:55:15 +00:00
Bogdan Tara 8f8501a84b Backed out changeset 8829157669b1 (bug 1655324) for SVGAnimatedClassOrString.h related bustage CLOSED TREE 2020-08-10 07:28:20 +03:00
longsonr 1122d0d641 Bug 1655324 - rewrite DOMSVGAnimatedString r=heycam
- 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
2020-08-10 04:01:19 +00:00
longsonr 5b9df67d2e Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert
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
2020-07-15 10:37:55 +00:00
longsonr 02829222d5 Bug 1652253 - Update SVG include guards r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D83248
2020-07-14 23:40:05 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
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
2020-07-11 02:20:20 +00:00
Sean Feng 20800c5a3c Bug 1377999 - Make SVG nodes to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57701

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:16 +00:00