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

93 Коммитов

Автор SHA1 Сообщение Дата
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
Emilio Cobos Álvarez 597b7bc37d Bug 1729330 - Add a simple CSSLayerRule implementation. r=smaug
The specifics of how this is going to work are still getting spec'd /
discussed in https://github.com/w3c/csswg-drafts/issues/6576, but this
allows DevTools to work fine and the feature to be complete enough for
Nightly experimentation (with the other in-flight patches).

Otherwise devtools crashes when trying to inspect pages that use them.

Differential Revision: https://phabricator.services.mozilla.com/D124656
2021-09-08 11:18:32 +00:00
Boris Chiou 32d231dac6 Bug 1340422 - Part 8: Optimize attribute mapping by not parsing svg path string again. r=emilio
Unfortunately, we still have to convert the cpp version into rust version.
However, it's still better than parsing it again.

If we want to use the css parser to parse d attribute, we may need an
extra API to get the whole input as &str from Parser.
(expect_string() doesn't work because the SVG attribute value is not a quoted
string.) It seems Parser::slice() cannot get the whole input because we don't
know the end index of the whole input string. We should fix this in Bug 1714238.

Differential Revision: https://phabricator.services.mozilla.com/D115571
2021-06-09 21:17:24 +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
Boris Chiou a1d053296d Bug 1340422 - Part 2: Map SVG d attribute to CSS. r=emilio
We parse the attribute and store it into CSS. We have tests already in
wpt, svg/path/property/*, but we cannot pass them for now because we
don't convert the relative commands into absolute commands. Those will
be fixed in Bug 1489392 once the spec issue is resolved.

Differential Revision: https://phabricator.services.mozilla.com/D81238
2021-06-09 21:17:21 +00:00
Alexandru Michis a09b922e62 Merge autoland to mozilla-central. a=merge 2021-04-24 00:50:35 +03: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 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Andi-Bogdan Postelnicu b9bd386da7 Bug 1626555 - Add `dom/svg` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96569
2020-11-10 13:44:03 +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 67be8b29cb Bug 1669161 - Remove dead SVG event code r=smaug
-  onSVGZoom is gone and we no longer dispatch it.
- we've never dispatched SVGUnload or SVGResize events and if we did implement these they would be unload and resize events now.

Differential Revision: https://phabricator.services.mozilla.com/D92381
2020-10-05 11:19:47 +00:00
longsonr 7ef5cefd04 Bug 1667641 - map SVG use element x and y to style r=emilio
matches current Chrome per 5a1cdd7a0e

Differential Revision: https://phabricator.services.mozilla.com/D91528
2020-10-02 04:50:16 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Emilio Cobos Álvarez 3cfb419d00 Bug 1665816 - CSSOM should respect rule-level property restrictions. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D90729
2020-09-21 09:57:46 +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
Emilio Cobos Álvarez 76e1706ca7 Bug 1494356 - Remove SVG style attribute reparsing code. r=longsonr
Now that XBL and xml:base are gone, and that <svg:use> is sane (using
shadow trees instead of NAC), we can just remove this, and fix this bug.

Differential Revision: https://phabricator.services.mozilla.com/D81553
2020-06-29 20:16:11 +00:00
Robert Longson 46d24ea87e Bug 1581691 - make transform-origin a mapped CSS attribute r=heycam,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D63016
2020-04-18 05:10:29 +00:00
Cosmin Sabou 52b7bc2fa6 Backed out changeset 136b9329a6f7 (bug 1581691) for failures on svg/styling/presentation-attributes-relevant.html. 2020-04-18 06:15:10 +03:00
Robert Longson 650b69563f Bug 1581691 - make transform-origin a mapped CSS attribute r=heycam,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D63016
2020-04-18 01:32:40 +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
Christoph Kerschbaumer de17388af5 Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug,annevk
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-29 12:35:46 +00:00
shindli f5511fecc8 Backed out changeset ec4c2b2a561b (bug 1374612) for causing wpt permafails in /html/dom/reflection-metadata.html CLOSED TREE 2020-02-27 22:46:44 +02:00
Christoph Kerschbaumer 00976af48c Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-27 18:08:54 +00:00
Dorel Luca 2e1e470d9e Backed out changeset 59fe98b41d80 (bug 1374612) for WPT failures in /html/dom/idlharness.https.html. CLOSED TREE
--HG--
extra : amend_source : a537237327643c365f02c0bfbed643b0d54cf1d5
2020-02-27 14:08:48 +02:00
Christoph Kerschbaumer ec996a7e9d Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-27 09:32:04 +00:00
Eric Rahm 02784ee81c Bug 1617771 - Remove nsAutoPtr usage from svg. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D63984

--HG--
extra : moz-landing-system : lando
2020-02-25 20:03:26 +00:00
Emilio Cobos Álvarez 1b99376255 Bug 1610171 - Clear animated paths when SVG lengths change. r=jwatt
If we reconstruct frames due to some other reason, we will never get to the
DidSetComputedStyle bit that would clear it for us on change.

This is all in all very unfortunate, since I think the fact that we reconstruct
frames so aggressively is a bug anyway (this comes from this bit in
SVGAnimatedTransformList):

  https://searchfox.org/mozilla-central/rev/a37fc61f172b432e7ae0b6b4c4a12cac2a787a0f/dom/svg/SVGAnimatedTransformList.h#108

I think we are supposed to reconstruct only once at most, but I may be crazy :^)

Will look at that in a separate bug though, this is the most minimal change that
addresses the regression.

An alternative (equally low-risk) would be to clear cached paths also in the
case where there's no old computed style in nsSVGGeometryFrame...

Differential Revision: https://phabricator.services.mozilla.com/D63802

--HG--
extra : moz-landing-system : lando
2020-02-24 01:52:52 +00:00
Boris Zbarsky bb356d988d Bug 1614546 part 1. Get rid of SVG uses of NS_ERROR_DOM_TYPE_ERR. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D62399

--HG--
extra : moz-landing-system : lando
2020-02-19 22:06:09 +00:00
Masayuki Nakano 487e463bb5 Bug 1543315 - part 21: Mark `PresShell::DidCauseReflow()` as `MOZ_CAN_RUN_SCRIPT` r=smaug
It removes a script blocker.  Therefore, although it depends on the caller
whether it causes running script or not.  However, we should mark it as
`MOZ_CAN_RUN_SCRIPT` for safer code.

It's called only by the destructor of `nsAutoCauseReflowNotifier`.  Therefore,
this patch also marks its constructor as `MOZ_CAN_RUN_SCRIPT` for making
each creator method marked as `MOZ_CAN_RUN_SCRIPT` or
`MOZ_CAN_RUN_SCRIPT_BOUNDARY`.

Most of the creators is mutation listener methods.  However, `PresShell`
does nothing after destroying `nsAutoCauseReflowNotifier`.  Therefore,
this patch does not change the callers in MutationObserver.cpp to use
`RefPtr<PresShell>` at calling them because changing it may cause performance
regression.

Perhaps, we should create another methods of `WillCauseReflow()` and
`DidCauseReflow()` to avoid unnecessary `MOZ_CAN_RUN_SCRIPT` marking.
However, I'm not sure whether most callers may run script or not because
of outside of my knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D55805

--HG--
extra : moz-landing-system : lando
2020-01-17 10:00:28 +00:00
Boris Zbarsky 59239b7c5c Bug 1607918. Fix case handling for webkit-prefixed transition/animation event handlers. r=smaug.
The WPTs were cherrypicked from e05bdb8e0d

The issue in dom/events/test/test_bug1332699.html was discussed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c8 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c10 but Xidorn never quite
made it clear enough what the issue was, so it ended up making it into the tree.

Differential Revision: https://phabricator.services.mozilla.com/D59592

--HG--
extra : moz-landing-system : lando
2020-01-13 20:04:59 +00:00
Emilio Cobos Álvarez 86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

Differential Revision: https://phabricator.services.mozilla.com/D58687

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Emilio Cobos Álvarez 4a3be9604a Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

Differential Revision: https://phabricator.services.mozilla.com/D56306

--HG--
extra : moz-landing-system : lando
2019-12-09 03:32:28 +00:00
Emilio Cobos Álvarez a6a78ce682 Bug 1599843 - Element::SetEventHandler is infallible. r=bzbarsky
Depends on D54996

Differential Revision: https://phabricator.services.mozilla.com/D54997

--HG--
extra : moz-landing-system : lando
2019-11-27 20:01:38 +00:00
Mirko Brodesser b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

Differential Revision: https://phabricator.services.mozilla.com/D51828

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Mirko Brodesser ba0285f534 Bug 1593222: part 9) Move non-animation notification methods from `nsNodeUtils` to `MutationObservers`. r=smaug
The remaining notification methods are moved in a separate commit. The
files are renamed to `MutationObservers.*` in a follow-up commit.

Depends on D51824

Differential Revision: https://phabricator.services.mozilla.com/D51825

--HG--
extra : moz-landing-system : lando
2019-11-05 21:32:53 +00:00
Emilio Cobos Álvarez 49baadd637 Bug 1582814 - Let the CSS use counter prefs be independent. r=boris
* Let layout.css.use-counters.enabled be independent from the unimplemented
   property counters.

 * Always count in the style system (that is, always create
   Document::mStyleUseCounters), so that the warning from bug 1582374 works
   irrespective of these prefs.

 * Add a pref check to the SVGElement code path so that the prefs properly
   reflect whether the histograms end up being recorded or not.

 * Make the pref checks consistent (check both when reporting telemetry, not
   earlier).

Differential Revision: https://phabricator.services.mozilla.com/D46633

--HG--
extra : moz-landing-system : lando
2019-09-21 12:18:39 +00:00
Emilio Cobos Álvarez 1e858d2a04 Bug 1578661 - Fix use counter test. r=boris
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.

Differential Revision: https://phabricator.services.mozilla.com/D44697

--HG--
extra : moz-landing-system : lando
2019-09-19 00:20:39 +00:00
Emilio Cobos Álvarez 31755a845c Bug 1578661 - Remove old CSS use counters. r=boris
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.

Differential Revision: https://phabricator.services.mozilla.com/D44695

--HG--
extra : moz-landing-system : lando
2019-09-19 00:20:35 +00:00
Cosmin Sabou 2978a72248 Backed out 10 changesets (bug 1578661) for linting failures on layout/style/ServoCSSPropList.py. CLOSED TREE
Backed out changeset b1b5393b1099 (bug 1578661)
Backed out changeset b87eebb0cf6e (bug 1578661)
Backed out changeset 6ba2ee45f26e (bug 1578661)
Backed out changeset 4a1d45160d60 (bug 1578661)
Backed out changeset 7a5687bebc02 (bug 1578661)
Backed out changeset 33c306c9020a (bug 1578661)
Backed out changeset 89d7e6fb24b0 (bug 1578661)
Backed out changeset 42c4943e569b (bug 1578661)
Backed out changeset 88d988a80de1 (bug 1578661)
Backed out changeset 78c90f9e9eee (bug 1578661)
2019-09-19 01:50:03 +03:00
Emilio Cobos Álvarez 2adb14b20a Bug 1578661 - Fix use counter test. r=boris
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.

Differential Revision: https://phabricator.services.mozilla.com/D44697

--HG--
extra : moz-landing-system : lando
2019-09-18 15:15:26 +00:00
Emilio Cobos Álvarez 6a2a92e98a Bug 1578661 - Remove old CSS use counters. r=boris
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.

Differential Revision: https://phabricator.services.mozilla.com/D44695

--HG--
extra : moz-landing-system : lando
2019-09-18 15:15:19 +00:00
Andreea Pavel 7494b360c0 Backed out 10 changesets (bug 1578661) for lints failure at ServoCSSPropList.cpp on a CLOSED TREE
Backed out changeset ed3c619100e7 (bug 1578661)
Backed out changeset 027514a2eaf6 (bug 1578661)
Backed out changeset f2e228282b20 (bug 1578661)
Backed out changeset 67c36136dce7 (bug 1578661)
Backed out changeset 2280b27cc130 (bug 1578661)
Backed out changeset 445d13a2c452 (bug 1578661)
Backed out changeset 89caaa850049 (bug 1578661)
Backed out changeset 2f8be5db1786 (bug 1578661)
Backed out changeset 51a015a9a0f8 (bug 1578661)
Backed out changeset ad8e1f27a600 (bug 1578661)
2019-09-18 18:09:30 +03:00
Emilio Cobos Álvarez 959c99b520 Bug 1578661 - Fix use counter test. r=boris
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.

Differential Revision: https://phabricator.services.mozilla.com/D44697

--HG--
extra : moz-landing-system : lando
2019-09-18 12:04:37 +00:00
Emilio Cobos Álvarez d880111e86 Bug 1578661 - Remove old CSS use counters. r=boris
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.

Differential Revision: https://phabricator.services.mozilla.com/D44695

--HG--
extra : moz-landing-system : lando
2019-09-18 12:04:33 +00:00
Andreea Pavel 31ca3fda59 Backed out 9 changesets (bug 1578661) for lints failure at ServoCSSPropList.py a=backout
Backed out changeset d16463e5698c (bug 1578661)
Backed out changeset c6d64ac858ba (bug 1578661)
Backed out changeset db306f1467f7 (bug 1578661)
Backed out changeset 273535aab82d (bug 1578661)
Backed out changeset f643262a8c25 (bug 1578661)
Backed out changeset b0db409ada96 (bug 1578661)
Backed out changeset dc96d13728e0 (bug 1578661)
Backed out changeset 11e1e8f0a1b7 (bug 1578661)
Backed out changeset 6dd7a0d914d9 (bug 1578661)
2019-09-18 13:53:34 +03:00
Emilio Cobos Álvarez f8337abcef Bug 1578661 - Fix use counter test. r=boris
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.

Differential Revision: https://phabricator.services.mozilla.com/D44697

--HG--
extra : moz-landing-system : lando
2019-09-18 02:31:19 +00:00