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

1186 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 881f8f938a Bug 1762109 - Make the XLink setup a bit saner. r=smaug
Make Link and SVGAElement agree on XLink handling, and make it more
explicit that SVGAElement needs to be a bit more special for SMIL.

Remove dead MathML XLink code.

Differential Revision: https://phabricator.services.mozilla.com/D142546
2022-03-31 14:33:57 +00:00
Emilio Cobos Álvarez 1ce0975b8e Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00
Mathew Hodson 34da4aaf3e Bug 1751107 Part 3 - Clamp current time for SVG elements. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D140449
2022-03-11 18:13:07 +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
Nicolas Silva a7f5f3a538 Bug 1754829 - Detect when an SVG path is a Rectangle. r=gfx-reviewers,mstange
This patch doesn't attempt to cache the result. I don't know if it will cause regressions in practice.

Differential Revision: https://phabricator.services.mozilla.com/D138465
2022-02-21 13:35:44 +00:00
Cristian Tuns da203d126f Backed out changeset a0cf41898cf6 (bug 1754829) for causing hybrid bustages on SVGPathSegUtils.cpp CLOSED TREE 2022-02-17 11:59:24 -05:00
Nicolas Silva b0e5f60303 Bug 1754829 - Detect when an SVG path is a Rectangle. r=gfx-reviewers,mstange
This patch doesn't attempt to cache the result. I don't know if it will cause regressions in practice.

Differential Revision: https://phabricator.services.mozilla.com/D138465
2022-02-17 13:53:43 +00:00
Sylvestre Ledru 98949ee751 Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D138441
2022-02-11 10:01:15 +00:00
Boris Chiou 95f284eff5 Bug 1715387 - Flush style properly for DOM APIs which use d property. r=jwatt,hiro,emilio
In order to make sure these APIs work properly, we have to flush style before
building the path to make sure the d property is up-to-date.
1. isPointInFill()
2. isPointInStroke()
3. getTotalLength()
4. getPointAtLength()
5. getPathSegAtLength() (note: Legacy API, only Gecko and WebKit support.)

Differential Revision: https://phabricator.services.mozilla.com/D133434
2021-12-13 01:03:39 +00:00
Boris Chiou 7c8078f842 Bug 1388931 - Unship SVGPathSeg APIs behind a preference. r=emilio
Add the preference, dom.svg.pathSeg.enabled, so let
SVGPathElement::getPathSegAtLength(), SVGAnimatedPathData::pathSegList,
and SVGAnimatedPathData::animatedPathSegList behind the preference, and
set the preference to false by default on all channels.

Differential Revision: https://phabricator.services.mozilla.com/D133289
2021-12-10 01:01:40 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +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
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Masayuki Nakano 25a3c48305 Bug 1732845 - Add `nsINode::IsInDesignMode()` to check whether the node is directly in design mode r=smaug
There are a lot of check of `Document`'s editable state **with** comments. This
means that it's unclear for developers that only `Document` node is editable in
design mode.

Additionally, there are some points which use composed document rather than
uncomposed document even though the raw API uses uncomposed document. Comparing
with the other browsers, checking uncomposed document is compatible behavior,
i.e., nodes in shadow trees are not editable unless `contenteditable`.

Therefore, `nsINode` should have a method to check whether it's in design mode
or not.

Note that it may be called with a node in UA widget.  Therefore, this patch
adds new checks if it's in UA widget subtree or native anonymous subtree,
checking whether it's in design mode with its host.

Differential Revision: https://phabricator.services.mozilla.com/D126764
2021-10-12 03:14:43 +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
Andrew Osmond ac49f09199 Bug 1728113 - Remove DrawTargetCapture and related code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123953
2021-08-30 16:35:50 +00:00
Daniel Holbert fda78b55e2 Bug 1723249: Gracefully handle null SVG image-frame when resolving geometry properties. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D122791
2021-08-17 18:12:19 +00:00
Nicolas Silva 9cfa0db31b Bug 1722316 - Add UseCounter telemetry for various svg filters. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120850
2021-08-10 14:14:37 +00:00
Brindusan Cristian bead970f1f Backed out changeset b100ed804d46 (bug 1722316) for causing cpp unified-bustages in SVGFEMorphologyElement.cpp.
CLOSED TREE
2021-08-09 17:09:57 +03:00
Nicolas Silva c50c34223a Bug 1722316 - Add UseCounter telemetry for various svg filters. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120850
2021-08-09 12:18:12 +00:00
Emilio Cobos Álvarez 2d0a072174 Bug 1723921 - Cleanup nsComputedDOMStyle and related APIs. r=layout-reviewers,jfkthame
This will make implementing the new behavior behind a pref
really straight-forward, and is generally nicer.

Depends on D121858

Differential Revision: https://phabricator.services.mozilla.com/D121705
2021-08-07 09:47:15 +00:00
Boris Chiou ab6b587bfe Bug 1340422 - Part 10: Use style for GetDistancesFromOriginToEndsOfVisibleSegments(). r=emilio
When using a mpath elememt which linked to a external path element, we use
GetDistancesFromOriginToEndsOfVisibleSegments() to do a quick check if we
really need to build the path (note: see
SVGMotionSMILAnimationFunction::RebuildPathAndVerticesFromMpathElem),
so we have to get the d property value from style in this function.

Differential Revision: https://phabricator.services.mozilla.com/D116920
2021-06-09 21:17:25 +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 6c444066ce Bug 1340422 - Part 6: Factor out part of Elliptical arc implementation. r=emilio
Besides, add some conversion from double to float to make clang-tidy happy.

Differential Revision: https://phabricator.services.mozilla.com/D115569
2021-06-09 21:17:23 +00:00
Boris Chiou 81730e1d1a Bug 1340422 - Part 5: Factor out some utility inline functions in SVGPathData.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D115568
2021-06-09 21:17:23 +00:00
Boris Chiou 74fad503a5 Bug 1340422 - Part 4: Resolve SVG Marker points of path from CSS. r=emilio
We have to calculate markers from style.

Differential Revision: https://phabricator.services.mozilla.com/D115567
2021-06-09 21:17:22 +00:00
Boris Chiou 3159e083e9 Bug 1340422 - Part 3: Resolve SVG path from CSS. r=emilio
Use the style value when building the SVG path and its display items.
Besides, we should also invalid the cache when there are any CSS updates.

Differential Revision: https://phabricator.services.mozilla.com/D115566
2021-06-09 21:17:21 +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
Dana Keeler 1b9fd10c83 Bug 1701192 - don't allow third-party loads to set HSTS state r=annevk,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115715
2021-06-02 16:52:19 +00:00
Edgar Chen 1ebbd60592 Bug 1685421 - Part 2: Stop using NS_ERROR_DOM_HIERARCHY_REQUEST_ERR in nsINode; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113344
2021-06-02 13:43:39 +00:00
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