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

48 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
longsonr ff387da653 Bug 1578098 - move DOM classes to DOM namespace and eliminate using namespace mozilla r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D44318

--HG--
extra : moz-landing-system : lando
2019-09-21 14:38:56 +00:00
Emilio Cobos Álvarez 351d40e7c3 Bug 1557430 - Add memory reporters for SVG mapped attribute declarations. r=njn,heycam
These are owned by the element and not referenced from the stylesheets.

They're referenced from the rule tree, but the rule nodes don't measure their
style source (since they're non-owning).

So unconditionally reporting them even though it's a refcounted object is ok.

While at it, remove some other fields from the old style system that are no
longer used.

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

--HG--
extra : moz-landing-system : lando
2019-06-08 18:58:57 +00:00
Emilio Cobos Álvarez 6917a38081 Bug 1555216 - Change the signature of BindToTree to be (BindContext&, nsINode& aParentNode). r=bzbarsky
BindContext was going to have way more information at first, but then I realized
that most of the things I wanted to know were basically a flag away using the
parent node.

Still I think it's worth it, now experimenting with BindToTree will only mean
adding a field to a struct that's included from a couple cpp files, instead of a
massive pain.

I also think this is clearer, and doing this highlights quite a few
inconsistencies in our code which I've left untouched, but commented with
FIXMEs.

Steps are:

$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsresult BindToTree(Document\* aDocument, nsIContent\* aParent,#nsresult BindToTree(BindContext\&, nsINode\& aParent)#g' $file; done
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#                      nsIContent\* aBindingParent) override#override#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(Document\* aDocument, nsIContent\* aParent,#::BindToTree(BindContext\& aContext, nsINode\& aParent)#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsIContent\* aBindingParent)##g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(aDocument, aParent, aBindingParent)#::BindToTree(aContext, aParent)#g' $file; done
$ ./mach clang-format

Then manual fixups.

Depends on D32948

Differential Revision: https://phabricator.services.mozilla.com/D32949
2019-05-31 23:31:52 +02:00
violet 8ebdbe5a90 Bug 1383650 - Notify style system when SMIL animation changes length r=birtles,longsonr
When animating geometry attribute, we need to notify style system about the change of SMIL override style.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 13:21:20 +00:00
Coroiu Cristina b4731ed54d Backed out 12 changesets (bug 1383650) for landing in the soft-freeze period
Backed out changeset 4316d55f87be (bug 1383650)
Backed out changeset 0118148f1534 (bug 1383650)
Backed out changeset 447c9248342b (bug 1383650)
Backed out changeset 6730776560c0 (bug 1383650)
Backed out changeset a7b8e6460fb8 (bug 1383650)
Backed out changeset e864696f6cf8 (bug 1383650)
Backed out changeset 2b003d678c58 (bug 1383650)
Backed out changeset 7bc3bff991c4 (bug 1383650)
Backed out changeset f1f7b4ad9547 (bug 1383650)
Backed out changeset 18b030b31660 (bug 1383650)
Backed out changeset 70e74dd6b45d (bug 1383650)
Backed out changeset 55a283e793df (bug 1383650)
2019-05-16 04:47:58 +03:00
violet a5f610a05c Bug 1383650 - Notify style system when SMIL animation changes length r=birtles,longsonr
When animating geometry attribute, we need to notify style system about the change of SMIL override style.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 00:58:56 +00:00
longsonr dcc4813635 Bug 1542646 Part 13 - Make function declaration and definition parameter names match r=dholbert 2019-04-27 08:57:50 +01:00
longsonr 866f2126b4 Bug 1540408 Part 3 - Rename SVGViewBoxRect to SVGViewBox r=dholbert 2019-04-10 05:08:14 +01:00
longsonr 4c4cabe851 Bug 1540408 Part 2 - Move nsSVGLength2 and nsSVGNumber2 to the mozilla namespace renaming them to be SVGAnimatedLength and SVGAnimatedNumber. r=dholbert
--HG--
rename : dom/svg/nsSVGLength2.cpp => dom/svg/SVGAnimatedLength.cpp
rename : dom/svg/nsSVGLength2.h => dom/svg/SVGAnimatedLength.h
rename : dom/svg/nsSVGNumber2.cpp => dom/svg/SVGAnimatedNumber.cpp
rename : dom/svg/nsSVGNumber2.h => dom/svg/SVGAnimatedNumber.h
2019-04-09 21:04:33 +01:00
Noemi Erli 4033c58c26 Backed out changeset 481a37f3892a (bug 1540408) for build bustages in SVGViewportElement.h
--HG--
rename : dom/svg/SVGAnimatedLength.cpp => dom/svg/nsSVGLength2.cpp
rename : dom/svg/SVGAnimateLength.h => dom/svg/nsSVGLength2.h
rename : dom/svg/SVGAnimatedNumber.cpp => dom/svg/nsSVGNumber2.cpp
rename : dom/svg/SVGAnimatedNumber.h => dom/svg/nsSVGNumber2.h
2019-04-09 09:53:57 +03:00
longsonr ef9cb13839 Bug 1540408 Part 2 - Move nsSVGLength2 and nsSVGNumber2 to the mozilla namespace renaming them to be SVGAnimatedLength and SVGAnimatedNumber. r=dholbert
--HG--
rename : dom/svg/nsSVGLength2.h => dom/svg/SVGAnimateLength.h
rename : dom/svg/nsSVGLength2.cpp => dom/svg/SVGAnimatedLength.cpp
rename : dom/svg/nsSVGNumber2.cpp => dom/svg/SVGAnimatedNumber.cpp
rename : dom/svg/nsSVGNumber2.h => dom/svg/SVGAnimatedNumber.h
2019-04-09 07:33:14 +01:00
longsonr bff06425af Bug 1540408 Part 1 - Move most internal attribute representation classes to be of the form SVGAnimated. r=dholbert
--HG--
rename : dom/svg/SVGBoolean.cpp => dom/svg/SVGAnimatedBoolean.cpp
rename : dom/svg/SVGBoolean.h => dom/svg/SVGAnimatedBoolean.h
rename : dom/svg/SVGClass.cpp => dom/svg/SVGAnimatedClass.cpp
rename : dom/svg/SVGClass.h => dom/svg/SVGAnimatedClass.h
rename : dom/svg/SVGEnum.cpp => dom/svg/SVGAnimatedEnumeration.cpp
rename : dom/svg/SVGEnum.h => dom/svg/SVGAnimatedEnumeration.h
rename : dom/svg/SVGInteger.cpp => dom/svg/SVGAnimatedInteger.cpp
rename : dom/svg/SVGInteger.h => dom/svg/SVGAnimatedInteger.h
rename : dom/svg/SVGIntegerPair.cpp => dom/svg/SVGAnimatedIntegerPair.cpp
rename : dom/svg/SVGIntegerPair.h => dom/svg/SVGAnimatedIntegerPair.h
rename : dom/svg/SVGNumberPair.cpp => dom/svg/SVGAnimatedNumberPair.cpp
rename : dom/svg/SVGNumberPair.h => dom/svg/SVGAnimatedNumberPair.h
rename : dom/svg/SVGOrient.cpp => dom/svg/SVGAnimatedOrient.cpp
rename : dom/svg/SVGOrient.h => dom/svg/SVGAnimatedOrient.h
rename : dom/svg/SVGString.cpp => dom/svg/SVGAnimatedString.cpp
rename : dom/svg/SVGString.h => dom/svg/SVGAnimatedString.h
rename : dom/svg/SVGViewBox.cpp => dom/svg/SVGAnimatedViewBox.cpp
rename : dom/svg/SVGViewBox.h => dom/svg/SVGAnimatedViewBox.h
2019-04-04 18:40:56 +01:00
longsonr 3b325c4a5f Bug 1518666 Part 4 - remove some unnecessary typedefs r=dholbert 2019-03-26 18:51:23 +00:00
longsonr 21dcb548e6 Bug 1518666 part 2 - Move existing SVGAnimated classes to DOMSVGAnimated so that we can rename various existing classes to SVGAnimated later r=dholbert
--HG--
rename : dom/svg/SVGAnimatedAngle.cpp => dom/svg/DOMSVGAnimatedAngle.cpp
rename : dom/svg/SVGAnimatedAngle.h => dom/svg/DOMSVGAnimatedAngle.h
rename : dom/svg/SVGAnimatedBoolean.cpp => dom/svg/DOMSVGAnimatedBoolean.cpp
rename : dom/svg/SVGAnimatedBoolean.h => dom/svg/DOMSVGAnimatedBoolean.h
rename : dom/svg/SVGAnimatedEnumeration.cpp => dom/svg/DOMSVGAnimatedEnumeration.cpp
rename : dom/svg/SVGAnimatedEnumeration.h => dom/svg/DOMSVGAnimatedEnumeration.h
rename : dom/svg/SVGAnimatedInteger.cpp => dom/svg/DOMSVGAnimatedInteger.cpp
rename : dom/svg/SVGAnimatedInteger.h => dom/svg/DOMSVGAnimatedInteger.h
rename : dom/svg/SVGAnimatedLength.cpp => dom/svg/DOMSVGAnimatedLength.cpp
rename : dom/svg/SVGAnimatedLength.h => dom/svg/DOMSVGAnimatedLength.h
rename : dom/svg/SVGAnimatedNumber.cpp => dom/svg/DOMSVGAnimatedNumber.cpp
rename : dom/svg/SVGAnimatedNumber.h => dom/svg/DOMSVGAnimatedNumber.h
rename : dom/svg/SVGAnimatedString.cpp => dom/svg/DOMSVGAnimatedString.cpp
rename : dom/svg/SVGAnimatedString.h => dom/svg/DOMSVGAnimatedString.h
2019-03-19 00:01:03 +00:00
longsonr 8e1810987f Bug 1523178 - Merge SVGAngle and nsSVGOrientType into SVGOrient r=jwatt
--HG--
rename : dom/svg/SVGAngle.cpp => dom/svg/SVGOrient.cpp
rename : dom/svg/SVGAngle.h => dom/svg/SVGOrient.h
2019-02-15 08:41:37 +00:00
Narcis Beleuzu e853a80e32 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-25 06:41:23 +02:00
longsonr 1fdb590a11 Bug 1522650 - Rename all remaining nsSMIL classes and types as SMIL and ensure they are in the mozilla namespace. r=birtles
--HG--
rename : dom/smil/nsISMILAttr.h => dom/smil/SMILAttr.h
2019-01-25 03:24:01 +00:00
Daniel Holbert 808dca3627 Bug 1522208: Clean up nsCOMPtr.h includes in dom/svg. r=longsonr
A lot of files include nsCOMPtr without really needing it in dom/svg. (And a
few files use the nsCOMPtr type without including its header.)

For this patch, I found candidate files by just searching for files that only
had a single line that contained "nsCOMPtr", and I took the following actions:
 - If the match is an #include, then remove it (replacing it with the include
   for RefPtr or AlreadyAddrefed if the file uses those types instead).
 - If the match is a usage of the type, then add an #include for nsCOMPtr (as
   well as one for RefPtr, if the file uses that type).

(And in a few cases, I moved an adjacent #include, to get the #include list
closer to sortedness.)

I verified that the dom/svg directory continues to build successfully in
non-unified mode (i.e. if I remove UNIFIED_ from its moz.build file).  So, I'm
not removing any includes that files are now inadvertantly leaning on other
compilation units to provide.

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

--HG--
extra : moz-landing-system : lando
2019-01-24 23:40:25 +00:00
longsonr 17cf7940c4 Bug 1518033 - Move nsSVGBoolean and nsSVGInteger to the mozilla namespace r=jwatt
--HG--
rename : dom/svg/nsSVGBoolean.cpp => dom/svg/SVGBoolean.cpp
rename : dom/svg/nsSVGBoolean.h => dom/svg/SVGBoolean.h
rename : dom/svg/nsSVGInteger.cpp => dom/svg/SVGInteger.cpp
rename : dom/svg/nsSVGInteger.h => dom/svg/SVGInteger.h
2019-01-07 19:23:13 +00:00
longsonr 6c649bdee4 Bug 1518000 - Move nsSVGString and nsSVGViewBox to the mozilla namespace r=jwatt
--HG--
rename : dom/svg/nsSVGString.cpp => dom/svg/SVGString.cpp
rename : dom/svg/nsSVGString.h => dom/svg/SVGString.h
rename : dom/svg/nsSVGViewBox.cpp => dom/svg/SVGViewBox.cpp
rename : dom/svg/nsSVGViewBox.h => dom/svg/SVGViewBox.h
2019-01-06 17:52:55 +00:00
longsonr 5530126c12 Bug 1517938 - Move nsSVGIntegerPair and nsSVGNumberPair to the mozilla namespace r=jwatt
--HG--
rename : dom/svg/nsSVGIntegerPair.cpp => dom/svg/SVGIntegerPair.cpp
rename : dom/svg/nsSVGIntegerPair.h => dom/svg/SVGIntegerPair.h
rename : dom/svg/nsSVGNumberPair.cpp => dom/svg/SVGNumberPair.cpp
rename : dom/svg/nsSVGNumberPair.h => dom/svg/SVGNumberPair.h
2019-01-06 08:22:55 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
longsonr eb0a735bca Bug 1517185 - Move nsSVGEnum to the mozilla namespace and rename it as SVGEnum r=jwatt
--HG--
rename : dom/svg/nsSVGEnum.cpp => dom/svg/SVGEnum.cpp
rename : dom/svg/nsSVGEnum.h => dom/svg/SVGEnum.h
extra : amend_source : faf1423f0eecafceae6ede115759d06fa061faf2
2019-01-02 18:24:11 +00:00
Daniel Holbert 44acfc60f7 Backed out changeset c796403f5a29 since it landed with wrong bug number
--HG--
rename : dom/svg/SVGEnum.cpp => dom/svg/nsSVGEnum.cpp
rename : dom/svg/SVGEnum.h => dom/svg/nsSVGEnum.h
2019-01-02 10:44:12 -08:00
longsonr 69a6be5b17 Bug 1517108 - Move nsSVGEnum to the mozilla namespace and rename it as SVGEnum r=jwatt
--HG--
rename : dom/svg/nsSVGEnum.cpp => dom/svg/SVGEnum.cpp
rename : dom/svg/nsSVGEnum.h => dom/svg/SVGEnum.h
2019-01-02 18:24:11 +00:00
longsonr 477d3cab33 Bug 1516727 - Part 4 move SVGAngle to the mozilla namespace r=jwatt 2019-01-01 21:01:19 +00:00
longsonr bf776da028 Bug 1517127 - move nsSVGClass to the mozilla::dom namespace r=jwatt
--HG--
rename : dom/svg/nsSVGClass.cpp => dom/svg/SVGClass.cpp
rename : dom/svg/nsSVGClass.h => dom/svg/SVGClass.h
2019-01-01 16:26:26 +00:00
longsonr e6ae298fff Bug 1516727 - Part 3 rename nsSVGAngle to SVGAngle r=jwatt
--HG--
rename : dom/svg/nsSVGAngle.cpp => dom/svg/SVGAngle.cpp
rename : dom/svg/nsSVGAngle.h => dom/svg/SVGAngle.h
2018-12-31 19:00:42 +00:00
longsonr d03099b507 Bug 1516921 - export things in the mozilla namespace properly r=jwatt 2018-12-31 11:56:52 +00:00
longsonr cb858a95bf Bug 1516076 - Part 4 - make include order more sensible for some files r=dholbert 2018-12-27 17:30:38 +00:00
longsonr cd491fca01 Bug 1516076 - Part 3 rename nsSVGAnimatedTransformList to SVGAnimatedTransformList and move it to the mozilla namespace r=dholbert
--HG--
rename : dom/svg/nsSVGAnimatedTransformList.cpp => dom/svg/SVGAnimatedTransformList.cpp
rename : dom/svg/nsSVGAnimatedTransformList.h => dom/svg/SVGAnimatedTransformList.h
2018-12-26 23:46:38 +00:00
longsonr f68bd8c718 Bug 1515705 - Rename NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT as all SVG elements are now namespaced r=dholbert 2018-12-21 11:43:29 +00:00
longsonr 3d04ba9c9e Bug 1515187 - Part 4 Rename nsSVGElement to SVGElement and put it in the mozilla:dom namespace r=dholbert
--HG--
rename : dom/svg/nsSVGElement.cpp => dom/svg/SVGElement.cpp
rename : dom/svg/nsSVGElement.h => dom/svg/SVGElement.h
2018-12-21 08:58:14 +00:00