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

1201 Коммитов

Автор SHA1 Сообщение Дата
Kris Wright 5e37146c9f Bug 1692068 - Disable broken crashtests on tsan. r=necko-reviewers,decoder,dragana
These tests either cause frequent or permanent failures on TSan.

Differential Revision: https://phabricator.services.mozilla.com/D110371
2021-05-25 01:15:49 +00:00
Edgar Chen acf4edd8ea Bug 1710840 - Part 2: Get rid of NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; r=smaug
Depends on D114964

Differential Revision: https://phabricator.services.mozilla.com/D114965
2021-05-12 23:32:38 +00:00
Emilio Cobos Álvarez 62550fa581 Bug 1709577 - Remove CORS_* constants from imgIRequest, use CORSMode instead. r=tnikkel
These don't have the same value, and is a bit confusing.

Differential Revision: https://phabricator.services.mozilla.com/D114352
2021-05-05 15:23:25 +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
Emilio Cobos Álvarez 480efa657d Bug 1703592 - Deal with non-finite viewbox / viewports. r=longsonr
In the test-case we end up dividing viewbox/viewport, which is inf/inf,
end up with NaN, and boom.

Differential Revision: https://phabricator.services.mozilla.com/D111325
2021-04-09 13:10:55 +00:00
Emilio Cobos Álvarez 071bf77adf Bug 1703987 - Measure percentage stroke-widths on text/non-text svg content. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D111353
2021-04-09 13:07:07 +00:00
longsonr 6c00541d5c Bug 1700889 - remove xmlspace attribute from SVGStyleElement r=emilio
No longer in SVG 2, was removed from webkit as part of https://bugs.webkit.org/show_bug.cgi?id=29058 and Chrome doesn't support this either.

Differential Revision: https://phabricator.services.mozilla.com/D109702
2021-03-25 17:15:43 +00:00
Jonathan Kew 45d1f12441 Bug 1342741 - Adjust a few testcases that are sensitive to glyph/metrics differences in Menlo. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D107288
2021-03-12 16:13:18 +00:00
Bogdan Tara 446173458c Backed out 3 changesets (bug 1696176, bug 1342741) for test_nsIHTMLEditor_getSelectedElement.html and inert-retargeting-iframe.tentative.html failures CLOSED TREE
Backed out changeset 1154df798888 (bug 1342741)
Backed out changeset 02b69c938fbe (bug 1342741)
Backed out changeset a7ceef946175 (bug 1696176)
2021-03-10 17:06:26 +02:00
Jonathan Kew 5abe82b7b8 Bug 1342741 - Adjust a few testcases that are sensitive to glyph/metrics differences in Menlo. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D107288
2021-03-10 13:48:46 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke be7dc83fa6 Bug 1691913 - Mark nsBaseHashtable (and its subclasses') member functions nodiscard where appropriate. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105474
2021-02-26 09:22:53 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +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
Emilio Cobos Álvarez 5c1a39349e Bug 1551040 - Add const versions of Document casts. r=edgar
Depends on D101516

Differential Revision: https://phabricator.services.mozilla.com/D101517
2021-01-17 14:44:44 +00:00
Dorel Luca dac45cc702 Backed out 3 changesets (bug 1551040) for Browser-chrome failures in browser/base/content/test/static/browser_parsable_css.js
Backed out changeset f48f479bcacd (bug 1551040)
Backed out changeset a6cd4b393999 (bug 1551040)
Backed out changeset 252cbf40efcb (bug 1551040)
2021-01-17 16:38:39 +02:00
longsonr 6feef3dcfc Bug 1687131 - test_pointer-events-5.xhtml is a copy of test_pointer-events-2.xhtml r=emilio
They should be different, test_pointer-events-5.xhtml was intended to test non-existent clip paths as part of bug 975206

Differential Revision: https://phabricator.services.mozilla.com/D102091
2021-01-16 22:55:48 +00:00
Emilio Cobos Álvarez edf7671bfc Bug 1551040 - Add const versions of Document casts. r=edgar
Depends on D101516

Differential Revision: https://phabricator.services.mozilla.com/D101517
2021-01-16 18:58:28 +00:00
Bogdan Tara c88a628881 Backed out 3 changesets (bug 1551040) for stylesheets related bustage CLOSED TREE
Backed out changeset 3822fe3e163d (bug 1551040)
Backed out changeset 032025f28d8f (bug 1551040)
Backed out changeset 1aeb38c2dce3 (bug 1551040)
2021-01-16 20:53:31 +02:00
Emilio Cobos Álvarez b4e254b836 Bug 1551040 - Add const versions of Document casts. r=edgar
Depends on D101516

Differential Revision: https://phabricator.services.mozilla.com/D101517
2021-01-16 10:53:11 +00:00
Mihai Alexandru Michis f1247be876 Backed out 4 changesets (bug 1551040) for causing mochitest failures.
CLOSED TREE

Backed out changeset 06c07b144db8 (bug 1551040)
Backed out changeset a6ebb45be432 (bug 1551040)
Backed out changeset 38f1416a92c3 (bug 1551040)
Backed out changeset 6c80881c8844 (bug 1551040)
2021-01-16 12:47:04 +02:00
Emilio Cobos Álvarez 91d84e11c8 Bug 1551040 - Add const versions of Document casts. r=edgar
Depends on D101516

Differential Revision: https://phabricator.services.mozilla.com/D101517
2021-01-13 11:39:30 +00:00
longsonr 749233d55b Bug 1685543 - Expose auto-start-reverse enum value r=emilio
Per https://github.com/w3c/svgwg/issues/424 we should expose the new value in webidl

Differential Revision: https://phabricator.services.mozilla.com/D101089
2021-01-08 00:05:11 +00:00
longsonr f518393a92 Bug 1518099 - Add support for lighter operator in feComposite r=jrmuizel,emilio
Spec: https://www.w3.org/TR/filter-effects-1/#attr-valuedef-operator-lighter

Lighter is defined in the compositing & blending spec as equivalent to porter-duff plus, https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_plus.

The 'lighter' composite mode already works in <canvas> (via globalCompositeOperation), and it's the same there.

Chrome implemented support in https://bugs.chromium.org/p/chromium/issues/detail?id=439037

Per https://github.com/w3c/svgwg/issues/424 we should expose the new value in webidl and Chrome uses 7 too (https://codereview.chromium.org/779963002/patch/120001/130009)

Differential Revision: https://phabricator.services.mozilla.com/D100605
2021-01-05 20:49:00 +00:00
longsonr d8af75a6ae Bug 987432 - remove unnecessary float casts in SkewX and SkewY r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D100595
2021-01-02 17:17:26 +00:00
longsonr 50c0681324 Bug 1684567 - don't round unspecified image dimensions to integers r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D100562
2020-12-31 12:34:02 +00:00
longsonr df56c9a52e Bug 1683907 - use the same logic for rendering and bounds checking r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D100481
2020-12-26 16:29:05 +00:00
Emilio Cobos Álvarez 6f72a71fea Bug 1683690 - Cleanup SVGGeometryElement::IsGeometryChangedViaCSS and related functions. r=longsonr
At the very least per our coding style star should be near the pointer
type, not the variable name, but while we're at it let's also make
IsGeometryChangedViaCSS a bit more efficient, and use references.

Differential Revision: https://phabricator.services.mozilla.com/D100244
2020-12-21 17:00:36 +00:00
Emilio Cobos Álvarez 4ec02c259b Bug 1683652 - Clear cached path when reframed. r=longsonr
The issue here is caused (a bit surprisingly) by the counter-reset
declaration.

The underlying issue is that counter-reset causes us to rebuild the
frame tree for the whole `<body>`, in order to rebuild the counter tree.

That makes the geometry frame not get its updated style (because the
frame goes away), and the next frame getting constructed getting a null
aOldComputedStyle (as expected, as it's a new frame).

We can't rely on the cached path not to change while there's no frame,
so clear it out when there's no old style.

The test is a simpler version of the test-case, where instead of
`counter-reset`, I use `display: none` to trigger the bogus codepath.

Differential Revision: https://phabricator.services.mozilla.com/D100237
2020-12-21 14:34:18 +00:00
longsonr c59d310501 Bug 1682307 - use document URI rather than baseURI for local references with SMIL r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D100207
2020-12-21 03:49:33 +00:00
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Simon Giesecke 9379d0240f Bug 1679987 - Use nsTokenizedRange where easily possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D98308
2020-12-16 19:10:34 +00:00
Simon Giesecke 4a023dd2aa Bug 1679987 - Make nsTokenizerFlags a scoped enum and make them a template argument to nsTCharSeparatedTokenizer. r=xpcom-reviewers,necko-reviewers,nika
There are no uses of nsTCharSeparatedTokenizer that require run-time
configuration of the flags, so having them a compile-time template
argument allows for generation of more efficient code.

This might not matter that much now, but a subsequent patch will add another
flag to allow merging the implementation of nsTSubstring::Split with
nsTCharSeparatedTokenizer, through which the compile-time evaluation will
become more relevant.

Differential Revision: https://phabricator.services.mozilla.com/D99368
2020-12-16 19:10:21 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +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
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
Peter Van der Beken ea7daa934e Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Mihai Alexandru Michis d06ca5f7d1 Backed out changeset e4b67fc1f101 (bug 1677483) for causing multiple mochitest plain failures.
CLOSED TREE
2020-11-17 19:29:26 +02:00
Peter Van der Beken 75190a1035 Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +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
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
longsonr 1d585e9840 Bug 821955 - Add crashtest r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94099
2020-10-20 12:45:12 +00:00
longsonr 637f9ed3d8 Bug 1474311 - check whether we should load images r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D93096
2020-10-13 22:30:54 +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
longsonr 6dff88f429 Bug 1667629 - support mpath pointing to shapes r=birtles,emilio
Differential Revision: https://phabricator.services.mozilla.com/D91510
2020-10-01 16:19:37 +00:00
Botond Ballo 01b3c7969d Bug 1667594 - Move nsLayoutUtils::RectCallback to namespace scope. r=emilio,jgilbert
This allows it to be forward-declared (while a nested class cannot be),
such that headers files that use RectCallback by pointer or reference
do not need to include nsLayoutUtils.h.

This avoids including nsLayoutUtils.h in nsRange.h.

Differential Revision: https://phabricator.services.mozilla.com/D91685
2020-09-30 21:06:47 +00:00
longsonr 213122103c Bug 1667018 - minor improvements to path code r=emilio
- Use IsMoveto method where appropriate
- Avoid referencing path in animation so we can move to supporting shapes later

Differential Revision: https://phabricator.services.mozilla.com/D91242
2020-09-24 08:43:51 +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
Cameron McCormack a9b6211496 Bug 1658343 - Propagate intrinsic sizes from SVG documents in embed/object to parent using IPC. r=kmag,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D90055
2020-09-21 02:09:57 +00:00
longsonr 45d0b4e8da Bug 1665921 - check result of SVGGeometryProperty calls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90694
2020-09-18 13:45:32 +00:00
longsonr 796e8e5378 Bug 1665402 - fix SVGGeometry.getTotalLength to work if the element is not attached to the document or is display:none r=emilio
fallback to how we used to do it if there's no styles

Differential Revision: https://phabricator.services.mozilla.com/D90440
2020-09-17 07:50:43 +00:00
longsonr 1681e6571b Bug 1664184 - minor SVG content code cleanup r=emilio
- DOMSVGAnimatedNumberList does not need to inherit from nsISupports
- various other classes can be included via forward declarations
- remove explicit in a couple of places where it makes no sense to have it

Differential Revision: https://phabricator.services.mozilla.com/D89732
2020-09-10 16:38:31 +00:00
longsonr 013ad7db46 Bug 1663438 - check element r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89673
2020-09-09 23:51:51 +00:00
longsonr 226b57059c Bug 1661912 - Convert remaining typedefs in SVG code to 'using' r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88718
2020-08-29 14:24:37 +00:00
Emilio Cobos Álvarez f1b7a3ca58 Bug 1661509 - Fix SVGSVGElement::QueryInterface. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D88475
2020-08-27 20:56:04 +00:00
longsonr 61fc7b177e Bug 1648550 - Fix getBoundingClientRect for use element position r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83256
2020-08-25 23:36:18 +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 4f8808ae6f Bug 1459905 - Merge DOMSVGTranslatePoint and DOMSVGPoint and fix updates r=emilio
SVGSVGElement::SetCurrentScaleTranslate checks that things have changed but if we
manage to update both translate values before we get here then we'll skip the screen update
that we need.

Also
- introduces a tear off for SVGSVGElement.currentTranslate so we hand out the same object as required by the SVG idl
- removes SVGSVGElement::SetCurrentTranslate as dead code
- removes mPreviousScale and mPreviousTranslate from SVGSVGElement as they are no longer necessary

Differential Revision: https://phabricator.services.mozilla.com/D84796
2020-08-25 14:38:32 +00:00
longsonr e3b924526e Bug 1659783 - Fix use pointing to image elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D87571
2020-08-19 15:25:39 +00:00
longsonr 09a2a0f739 Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert
- eANIMATION is the same as testing for SVGAnimationElement
- eFILTER is the same as testing for SVGFE

Differential Revision: https://phabricator.services.mozilla.com/D86695
2020-08-15 10:38:17 +00:00
longsonr 75df4a9a49 Bug 1658778 - Convert typedef enum to enum class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D86840
2020-08-12 23:54:29 +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 b0908ad8d6 Bug 1654331 - throw InvalidStateError when getPointAtLength can't get the path for measuring r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D86461
2020-08-10 03:49:56 +00: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
Cosmin Sabou cf533b3575 Backed out changeset 5a3189a82913 (bug 1654331) for wpt failures on SVGGeometryElement.getPointAtLength-03.svg. 2020-08-10 02:40:26 +03:00
longsonr e2d27d8052 Bug 1654331 - throw InvalidStateError when getPointAtLength can't get the path for measuring r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D86461
2020-08-09 20:34:04 +00:00
longsonr 914ea37ede Bug 1653858 - Introduce concept of valid target for use elements and use it rather than listing out all elements r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D84104
2020-08-08 15:47:04 +00:00
longsonr aed118e1f6 Bug 888685 - Remove nsISupports from remaining SVG DOM classes r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D84915
2020-08-07 22:50:28 +00:00
longsonr 5221ba1823 Bug 1524314 - Use RAII notifier classes to simplify code r=dholbert
Also converts some of the RAII notifier classes to templates where they are doing the same notifications so we get more code reuse.

Differential Revision: https://phabricator.services.mozilla.com/D84229
2020-08-03 09:32:36 +00:00
Dorel Luca 04fc1721e0 Backed out changeset 07a20e5f68e3 (bug 1524314) for Build bustage in dom/svg/DOMSVGPointList.h. a=backout 2020-08-03 01:20:49 +03:00
longsonr e1f94afeec Bug 1524314 - Use RAII notifier classes to simplify code r=dholbert
Also converts some of the RAII notifier classes to templates where they are doing the same notifications so we get more code reuse.

Differential Revision: https://phabricator.services.mozilla.com/D84229
2020-08-01 22:22:52 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
tkhan e778811453 Bug 1653400 - Add xorigin and fission annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D84006
2020-07-23 18:05:05 +00:00
Emilio Cobos Álvarez 5f53233ca1 Bug 1648064 - Switch DOM images to work like CSS images for the purposes of printing. r=tnikkel,smaug
Make them perform the image load (if needed), instead of copying the
image requests from the original document.

This is needed for CSS for stuff like:

@media print {
  #foo::before {
    content: url(bar.png);
  }
}

And so on. For images, we should do this as well. Nothing prevents you
from doing:

  <picture>
    <source srcset="print.png" media="print">
    <source srcset="screen.png" media="not print">
    <img>
  </picture>

And that should in theory work. It works after this patch, and I added a
test for that.

This patch is a bit bigger than I'd like, but I didn't find a more
reasonable way to split it up.

Making static docs able to do image loads is most of the patch and is
mostly straight-forward. This allows to remove the hacky "change the
loading document" thing that CSS images do, which is just working around
the CSP of the print document.

I need to enable background colors in printpreview_helper so as to be
able to have a reference page for all the different image types.

Differential Revision: https://phabricator.services.mozilla.com/D81779
2020-07-22 20:29:00 +00:00
Narcis Beleuzu 46367e2f7d Backed out 6 changesets (bug 1648064) for wp failures on test_printpreview.xhtml . CLOSED TREE
Backed out changeset 8ac892c60eda (bug 1648064)
Backed out changeset 189401f7b6e8 (bug 1648064)
Backed out changeset 2598e2706bd0 (bug 1648064)
Backed out changeset 4ec12eb9788c (bug 1648064)
Backed out changeset f735d4f6b21f (bug 1648064)
Backed out changeset 0fed6928b53d (bug 1648064)
2020-07-22 21:28:10 +03:00
Emilio Cobos Álvarez 08db8b4b15 Bug 1648064 - Switch DOM images to work like CSS images for the purposes of printing. r=tnikkel,smaug
Make them perform the image load (if needed), instead of copying the
image requests from the original document.

This is needed for CSS for stuff like:

@media print {
  #foo::before {
    content: url(bar.png);
  }
}

And so on. For images, we should do this as well. Nothing prevents you
from doing:

  <picture>
    <source srcset="print.png" media="print">
    <source srcset="screen.png" media="not print">
    <img>
  </picture>

And that should in theory work. It works after this patch, and I added a
test for that.

This patch is a bit bigger than I'd like, but I didn't find a more
reasonable way to split it up.

Making static docs able to do image loads is most of the patch and is
mostly straight-forward. This allows to remove the hacky "change the
loading document" thing that CSS images do, which is just working around
the CSP of the print document.

I need to enable background colors in printpreview_helper so as to be
able to have a reference page for all the different image types.

Differential Revision: https://phabricator.services.mozilla.com/D81779
2020-07-22 14:39:43 +00:00
longsonr 58d8d9dc4a Bug 1201214 - Deal with AppendElement failing if it's called in a fallible way r=jwatt
Fortunately bug 1631371 has marked the methods and SVGPathData::GetSegmentLengths is dead code

Differential Revision: https://phabricator.services.mozilla.com/D84092
2020-07-21 14:17:44 +00:00
Edgar Chen 2003a00dfc Bug 1608501 - Part 3: Clean up image request in DestroyContent; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D82875
2020-07-21 12:08:14 +00:00
Edgar Chen e10324adb1 Bug 1608501 - Part 1: Rename nsImageLoadingContent::DestroyImageLoadingContent to ::Destroy; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D82729
2020-07-21 12:08:14 +00:00
Simon Giesecke 75e36d4ce3 Bug 1653193 - Hide complex template instance PrimitiveAttributes. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D83751
2020-07-21 08:39:35 +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