Commit Graph

76 Commits

Author SHA1 Message Date
Daniel Holbert
bb0c446650 Bug 1516576: Adjust dom/svg/*.cpp files to include their own header first. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D15443

--HG--
extra : moz-landing-system : lando
2018-12-28 02:47:10 +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
Daniel Holbert
76a8cb61f7 Bug 1516025 part 2: Add needed #includes to some files in dom/svg to preemptively fix unified build bustage. r=longsonr
And while I'm here, I'm giving SVGDataParser.h a more specific/efficient string
include, to just provide the *forward-decl* of nsAString for this file's
"nsAString&" usage in a function prototype.

Depends on D15231

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

--HG--
extra : moz-landing-system : lando
2018-12-21 23:29:24 +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
Margareta Eliza Balazs
33d4594712 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-12-21 11:44:48 +02: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
Cameron McCormack
115eddc306 Bug 1515800 - Rename some more GetCurrentTime methods to avoid winbase.h bustage r=birtles,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15167

--HG--
extra : moz-landing-system : lando
2018-12-21 05:37:58 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Nicholas Nethercote
0c3cf3ece2 Bug 1449883 - Use nsStaticAtom* const instead of nsStaticAtom** in nsSVGEnumMapping. r=jwatt
MozReview-Commit-ID: DRCUIaHY5SX

--HG--
extra : rebase_source : 3b10706466271f61c48f6a1c85867b047859895c
2018-03-29 20:45:28 +11:00
Nicholas Nethercote
28cd0d7a4a Bug 1449883 - Use nsStaticAtom* const instead of nsStaticAtom** in nsSVGElement.h. r=jwatt
The patch also const-ifies a bunch of nearby fields.

MozReview-Commit-ID: IId52fm3Y7j

--HG--
extra : rebase_source : 8b84842dbb105672cce3cd90eef20290f28feb0e
2018-03-29 20:45:24 +11:00
Nathan Froyd
846d8789ee Bug 1492894 - part 1 - make the node hierarchy consistently constructed with NodeInfo&&; r=mccr8
Various places in dom/ use the pattern:

  already_AddRefed<NodeInfo> ni = ...;

which is supposed to be disallowed by our static analysis code, but
isn't, for whatever reason.  To fix our static analysis code, we need to
eliminate instances of the above pattern.

Unfortunately, eliminating this pattern requires restructuring how Nodes
are created.  Most Node subclasses take `already_AddRefed<NodeInfo>&` in
their constructors, and a few accept `already_AddRefed<NodeInfo>&&`.  We
need to enforce the latter pattern consistently, which requires changing
dozens of source files.
2018-09-21 16:45:49 -04:00
Emilio Cobos Álvarez
8f34c12e14 Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

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

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
711587f9ff Bug 1469176: Load svg.css upfront. r=jwatt
Test Plan: Covered by existing tests.

Reviewers: jwatt

Reviewed By: jwatt

Bug #: 1469176

Differential Revision: https://phabricator.services.mozilla.com/D1762
2018-06-22 12:48:40 +02:00
Emilio Cobos Álvarez
bd7c1e4e8c Bug 1468133: Remove the optimization to lazily load non-SVG styles since it's not relevant anymore. r=heycam
This was a memory-saving optimization introduced as part of dependencies for bug
686875, but a more general system landed in bug 77999 for Gecko and
https://github.com/servo/servo/pull/18509 for Servo.

So now it's probably even a bit of a pessimization (though probably not huge),
and given this causes bugs like bug 1462742, bug 1157592, and bug 1468145, and
fishiness like the one pointed out in this bug, we may as well remove it.

The performance impact of having to lookup through more rules should be minimal
given the bloom filter and the rule hash optimizations.

This makes me wonder whether we could remove the whole concept of on-demand UA
sheets, since they've caused pain, for example, when the frontend people try
loading <svg>s from NAC (since that triggers sheet loading from frame
construction, which is not good). I'm not concerned about loading mathml.css and
svg.css everywhere, though xul.css may not be as doable since it adds a bunch of
attribute-dependent selectors. Though on the other hand I asserted in the
xul.css code and we don't load it in content with <video> / <input
type="date/time/etc"> and such, afaict, so maybe now that legacy addons are gone
we can remove that sheet from content processes altogether.

MozReview-Commit-ID: 9JCWNZj6BkT
2018-06-22 03:42:46 +02:00
Boris Zbarsky
cb08b0de7d Bug 1455676 part 21. Remove nsIDOMNode. r=qdot 2018-05-29 22:58:51 -04:00
Boris Zbarsky
bea3100e53 Bug 1455676 part 14. Remove most use of nsIDOMNode in dom/. r=qdot 2018-05-29 22:58:49 -04:00
Boris Zbarsky
1cbc813260 Bug 1455674 part 20. Get rid of nsIDOMElement. r=qdot 2018-04-26 23:37:34 -04:00
Cameron McCormack
8e2992c3d7 Bug 1133172 - Remove SVGSVGElement.{pixel,screenPixel}UnitToMillimeter{X,Y}. r=longonsr,bz
MozReview-Commit-ID: KKy0J8oQYJj

--HG--
extra : rebase_source : 615b8b0b910344219490c0a5558c67777ecbe521
2018-04-19 17:21:00 +03:00
Boris Zbarsky
14f26fccf6 Bug 1449631 part 8. Remove nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: 5wQ2LYrjUxf
2018-04-05 13:42:41 -04:00
Xidorn Quan
d81392eca1 Bug 1447828 part 6 - Have only a single nsLayoutStylesheetCache instance. r=emilio
MozReview-Commit-ID: BjCgc8MZjIq

--HG--
extra : rebase_source : 104140c2eed5987b5568aca89a72bc7d5e3ed839
extra : source : cd66e264953865b0604054fb9d0b741d0ae19ebf
2018-03-29 02:34:34 +11:00
Robert Longson
728a3f36fc Bug 1435477 - Make the SVG dom code use the WebIDL constants from the bindings r=jwatt 2018-02-18 15:53:13 +00:00
Cameron McCormack
a3eee241b4 Bug 1435666 - Part 1: Remove nsIDOMSVGElement. r=bz
MozReview-Commit-ID: Hlfnu3pXC0n

--HG--
extra : rebase_source : b50343bbebe2044442af4491f7c97209ad8d4fc0
2018-02-04 17:40:57 +08:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Andrew McCreight
7f7f149167 Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : 890df75914906a5d34e8af67f9fc3a4be239d2d6
2017-08-31 16:29:22 -07:00
Sebastian Hengst
2f7f455fa1 Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 20d028d6b971cf6a221dc2f1553687d6c074bdcb
2017-09-06 19:18:06 +02:00
Andrew McCreight
4d6e76dfcf Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : cb952cfc5600a163a5580438e5b0177595689dab
2017-08-31 16:29:22 -07:00
Daniel Holbert
1607723a71 Bug 1384561: Null-check pointer before deleting it (rather than after), in SVG ClearPreserveAspectRatioProperty() function. r=jwatt
In practice, this shouldn't make a difference -- but C++ allows compilers to
make pointer-usage-after-delete trigger a runtime fault.

MozReview-Commit-ID: J1tZ3TxXR80

--HG--
extra : rebase_source : 046407c3c034b85a5b5d41e4c1a87e4a79c6833e
2017-07-26 18:03:43 -07:00
Olli Pettay
21b0ca3bbf Bug 1378196, Make IsEventAttributeName non-virtual in common case, r=ehsan
--HG--
extra : rebase_source : 9daf46de13698348b7ab6b68f8da13ffb338c0a0
2017-07-04 23:54:30 +03:00
cku
37aeebd4f3 Bug 265894 - Part 10. Remove SVGSVGElement::HasPreserveAspectRatio. r=heycam
Since no callee of this funciton anymore.

MozReview-Commit-ID: 6tQdFA6e7U4

--HG--
extra : rebase_source : a39b65387c893adba7bde4161a1e2385ef5cd582
2017-06-16 14:09:09 +08:00
cku
f9701e84eb Bug 265894 - Part 2. Implement SVGViewportElementBase, and let SVGSVGElement inherit from it. r=heycam
MozReview-Commit-ID: I6BIgEMhN6Q

--HG--
extra : rebase_source : 8e0e18914fc061532e853d2d3347e924d244b212
2017-06-14 20:38:10 +08:00
cku
67b6f80c35 Bug 265894 - Part 1. Implement NS_IMPL_ELEMENT_CLONE_WITH_INIT_AND_PARSER. r=heycam
Implement this new macro to reuse clone code in SVGSymbolElement in the
following patch.

MozReview-Commit-ID: 4vobWVrcbn2

--HG--
extra : rebase_source : 11e7dd9fd11199689ed5dc2a532c6517cf2e21fe
2017-06-14 19:57:40 +08:00
Kirk Steuber
7fdb378650 Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.

However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.

MozReview-Commit-ID: 3iVezeAKXnI

--HG--
extra : rebase_source : 9c3deec6d7aafd6411044d623d4863637b45fd58
2017-04-20 12:57:48 -07:00
Jonathan Watt
80319e98e0 Bug 1358794, part 1 - If necessary, synthesize a viewBox for SVG embedded via SVG <image>. r=longsonr
MozReview-Commit-ID: DuKOqfxCUW8
2017-03-25 15:57:29 +00:00
Aryeh Gregor
b03daa975a Bug 1314388 - Remove SVGZoomEvent; r=longsonr,smaug
Some code in SVGSVGElement.cpp might be unnecessary now, but Robert said
to leave it for a followup.

MozReview-Commit-ID: 8PpRGeGrREJ
2017-04-04 15:36:22 +03:00
Jonathan Watt
d942383a79 Bug 1350493 - Speed up and clean up SVGTransformableElement::PrependLocalTransformsTo and its overrides. r=longsonr 2017-02-23 08:35:08 +00:00
Jonathan Watt
e331fb83fd Bug 1349244 - Rename nsISVGChildFrame to nsSVGDisplayableFrame to reduce confusion. r=longsonr
MozReview-Commit-ID: IQCv2ebZbwk

--HG--
rename : layout/svg/nsISVGChildFrame.h => layout/svg/nsSVGDisplayableFrame.h
2017-02-09 18:24:31 +00:00
Stone Shih
1ed10ff082 Bug 1305458 Part1: Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: FM3vDUyLOCb

--HG--
extra : rebase_source : 5a513af84718a6d591f77437a0704984c8fc2b67
2016-10-21 10:11:07 +08:00
cku
52058e0fbc Bug 1289011 - Part 3. Handle view-box. r=heycam
MozReview-Commit-ID: 3GsivsTYPYK

--HG--
extra : rebase_source : 814a758605418893de60c2cb677ff4ee06671fe8
2016-08-30 10:27:30 +08:00
Phil Ringnalda
51211ec1af Backed out 9 changesets (bug 1289011) for Android failures in select-fieldset-legend-4.html
Backed out changeset 296f8c0b77e1 (bug 1289011)
Backed out changeset 869997798534 (bug 1289011)
Backed out changeset 3f1f0bc8c878 (bug 1289011)
Backed out changeset b3da5e487c2c (bug 1289011)
Backed out changeset fd404df10eed (bug 1289011)
Backed out changeset 8e3fc6d5237f (bug 1289011)
Backed out changeset 062cae507676 (bug 1289011)
Backed out changeset 43daa18916ce (bug 1289011)
Backed out changeset 632cf28211de (bug 1289011)
2016-09-03 13:32:40 -07:00
cku
bb5d15f610 Bug 1289011 - Part 3. Handle view-box. r=heycam
MozReview-Commit-ID: 3GsivsTYPYK

--HG--
extra : rebase_source : 450c93da72439c8332ec1892f81fbb3bf31ff3d7
2016-08-30 10:27:30 +08:00
Phil Ringnalda
c3de252482 Backed out 9 changesets (bug 1289011) for Win8 clip-path-* reftest failures
CLOSED TREE

Backed out changeset dea9d3f8bfe0 (bug 1289011)
Backed out changeset 03572962add4 (bug 1289011)
Backed out changeset 4b8d3be7bdf8 (bug 1289011)
Backed out changeset d1b4d0b38cdb (bug 1289011)
Backed out changeset aa59aca85397 (bug 1289011)
Backed out changeset 43d1ec007a49 (bug 1289011)
Backed out changeset a623cab8e4a7 (bug 1289011)
Backed out changeset 34e7dd6acb4c (bug 1289011)
Backed out changeset 900800f54055 (bug 1289011)
2016-09-02 19:46:39 -07:00
cku
235e174b8f Bug 1289011 - Part 3. Handle view-box. r=heycam
MozReview-Commit-ID: 3GsivsTYPYK

--HG--
extra : rebase_source : da1fff2bb43f85b8d6e55ce4d490f1d872ddea45
2016-08-30 10:27:30 +08:00
Carsten "Tomcat" Book
5f79b99ba6 Merge mozilla-central to autoland 2016-07-04 13:09:12 +02:00
Kevin Chen
96f6cecc6b Bug 1264809 - (Part 1) Decouple SetImageOverridePreserveAspectRatio from mIsPaintingSVGImageElement setting. r=dholbert 2016-07-01 00:41:00 +02:00
Fariskhi Vidyan
6a7ef6e422 Bug 1280425 part 2: Remove code associated with now-unsupported "defer" in SVG. r=dholbert
MozReview-Commit-ID: 8Naxc84aAES

--HG--
extra : rebase_source : 78d34a35dde95c10923c2aaa4660e0ed58e402b4
2016-06-30 17:28:56 -07:00
Cameron McCormack
0ecd5593cc Bug 1244074 - Part 4: Use StyleSheetHandle instead of concrete style sheet class in most places. r=dholbert 2016-02-24 18:01:12 +11:00
Robert Longson
ebdab47988 Bug 1145195 part 2 - SVGFragmentIdentifier::ProcessSVGViewSpec() shouldn't actually let #svgView() affect attribute values r=dholbert 2015-12-14 00:58:01 +00:00
Robert Longson
e5adaf828f Bug 1145195 part 1 - Create a helper function for PrependLocalTransformsTo in SVGContentUtils r=dholbert 2015-12-02 22:36:23 +00:00