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

1201 Коммитов

Автор SHA1 Сообщение Дата
Robert Longson 1c3f01bcb5 Bug 1738701 - Fix getNumberOfChars for tspan and textPath elements r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D151164
2022-07-07 16:38:20 +00:00
Robert Longson e2d6a866f3 Bug 1712623 - add disabled property to SVGStyleElement r=emilio
consistent with Chrome, the desires of the specification

Differential Revision: https://phabricator.services.mozilla.com/D115838
2022-06-28 18:36:26 +00:00
Robert Longson a06e965dfb Bug 1762792 - SVG <use> elements should render despite zero values in their width and height attributes (unless they're referencing a <svg> or <symbol> element) r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D150258
2022-06-28 10:30:49 +00:00
Emilio Cobos Álvarez 255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Emilio Cobos Álvarez 9c190fff4b Bug 1771564 - Constify ComputedStyle usage in nsComputedDOMStyle. r=dholbert
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.

Doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D147555
2022-05-28 01:04:24 +00:00
Mark Banner 3924c8914b Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 4acbb4ff59 Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-17 16:50:33 +00:00
Kagami Sascha Rosylight 831f5ab3a0 Bug 1768189 - Part 37: Apply modernize-concat-nested-namespaces to dom/svg/SVGTSpanElement.cpp ... r=andi
Depends on D145772

Differential Revision: https://phabricator.services.mozilla.com/D145773
2022-05-09 20:41:17 +00:00
Kagami Sascha Rosylight 1d101a2f00 Bug 1768189 - Part 36: Apply modernize-concat-nested-namespaces to dom/svg/SVGMetadataElement.h ... r=andi
Depends on D145771

Differential Revision: https://phabricator.services.mozilla.com/D145772
2022-05-09 20:41:17 +00:00
Kagami Sascha Rosylight 03667957e8 Bug 1768189 - Part 35: Apply modernize-concat-nested-namespaces to dom/svg/SVGFESpotLightElement.h ... r=andi
Depends on D145770

Differential Revision: https://phabricator.services.mozilla.com/D145771
2022-05-09 20:41:17 +00:00
Kagami Sascha Rosylight 4097fbaf3a Bug 1768189 - Part 34: Apply modernize-concat-nested-namespaces to dom/svg/SVGFEDiffuseLightingElement.h ... r=andi
Depends on D145769

Differential Revision: https://phabricator.services.mozilla.com/D145770
2022-05-09 20:41:16 +00:00
Kagami Sascha Rosylight 906416b43f Bug 1768189 - Part 33: Apply modernize-concat-nested-namespaces to dom/svg/SVGAnimatedRect.cpp ... r=andi
Depends on D145767

Differential Revision: https://phabricator.services.mozilla.com/D145769
2022-05-09 20:41:16 +00:00
Kagami Sascha Rosylight 58dc9a8c1f Bug 1768189 - Part 32: Apply modernize-concat-nested-namespaces to dom/svg/DOMSVGAnimatedNumberList.cpp ... r=andi
Depends on D145766

Differential Revision: https://phabricator.services.mozilla.com/D145767
2022-05-09 20:41:15 +00:00
Kagami Sascha Rosylight d6d515bcdd Bug 1768189 - Part 31: Apply modernize-concat-nested-namespaces to dom/storage/Storage.h ... r=andi
Depends on D145764

Differential Revision: https://phabricator.services.mozilla.com/D145766
2022-05-09 20:41:15 +00:00
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