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

695 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 3e8ab627f8 Bug 1507961 - Check that an SVG DOM item wasn't removed from its list before scheduling its animation update r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D12361

--HG--
extra : moz-landing-system : lando
2018-11-20 07:01:49 +00:00
Andreea Pavel 17960ad8f1 Backed out changeset ed44376f7c7a (bug 1507961) for failing crashtests on a CLOSED TREE 2018-11-20 06:09:41 +02:00
Cameron McCormack 4039b4c7c3 Bug 1507961 - Check that an SVG DOM item wasn't removed from its list before scheduling its animation update r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D12361

--HG--
extra : moz-landing-system : lando
2018-11-20 00:54:23 +00:00
Jonathan Watt 705aa1c0d7 Bug 1505498. Rename IDTracker::Reset to something more descriptive. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D11199

--HG--
extra : rebase_source : 0cf198a1eacb23a533b2f93eb80c33476018acda
extra : amend_source : 2245208957d917cb3e9524b573169059f5ce9e16
2018-10-29 10:42:14 +00:00
Julian Descottes 079a123093 Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 13:48:48 +00:00
Csoregi Natalia faba2c8c15 Backed out 4 changesets (bug 1467712) for multiple failures with: Too many arguments passed to ok. CLOSED TREE
Backed out changeset 9ce0ac2b9d71 (bug 1467712)
Backed out changeset 026eb1f6dc6e (bug 1467712)
Backed out changeset 0088a09d869a (bug 1467712)
Backed out changeset 1b19ea76aad6 (bug 1467712)
2018-11-01 15:22:52 +02:00
Julian Descottes b50a5ba4dc Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 11:09:48 +00:00
Gurzau Raul 42ed3a7d97 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-30 07:32:36 +02:00
Doug Thayer 976c503a09 Bug 1493447 - Add crashtest. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D7631

--HG--
extra : rebase_source : 4336e8f1c86c277d9638e81fe7e56ac62c9b7d7b
2018-10-29 17:40:32 -04:00
Emilio Cobos Álvarez d4ae853741 Bug 1502658 - Remove SVG use attribute change handling code from nsSVGUseFrame to SVGUseElement. r=longsonr
Most of those shouldn't rely on a frame to run.

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

--HG--
extra : moz-landing-system : lando
2018-10-28 23:20:43 +00:00
Andrew Osmond 4590e9df52 Bug 1466707 - Ensure that animated images always honour the animated image mode. r=tnikkel
Animated images inside of SVGs and used in XUL frames did not get the
configured animation image mode from the pres context.

Differential Revision: https://phabricator.services.mozilla.com/D8586
2018-10-16 08:50:44 -04:00
Emilio Cobos Álvarez 622bf3097d Bug 1502936 - Fix SVGUseElement::GetFrame to not get confused. r=heycam
Should've noticed in bug 1502658 that GetFrame() was dead, to verify its
assumptions... Oh well.

Differential Revision: https://phabricator.services.mozilla.com/D10109
2018-10-29 23:27:10 +01:00
Daniel Holbert 53412531d1 Bug 563481: Remove stale asserts() annotation for crashtest 307322-1.svg. (no code changes, test-manifest-only tweak) 2018-10-29 13:57:56 -07:00
Sylvestre Ledru dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

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

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Nicholas Nethercote d072469ddd Bug 1449883 - Use `const nsStaticAtom* const` instead of `nsStaticAtom**` in some SVG .cpp files. r=jwatt
The patch also removes some conditional tests involving unitMap[i] that are
now redundant due to preceding null tests against unitAtom.

MozReview-Commit-ID: CJpktlS4k15

--HG--
extra : rebase_source : fb40a9b9cb52062e2aa5312aab00a99780a387a7
2018-04-03 17:29:37 +10:00
Nicholas Nethercote 612eceaaa5 Bug 1449883 - Use `nsStaticAtom* const` instead of `nsStaticAtom**` in SVGTests. r=jwatt
MozReview-Commit-ID: JBqaxfrRNCn

--HG--
extra : rebase_source : ff50c1d86566c80ba66ac6ba8aab8daad531ffce
2018-03-29 20:45:31 +11: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
Nicholas Nethercote 36c48819d1 Bug 1451169 - Use `nsStaticAtom*` instead of `nsStaticAtom**` in Element.h. r=baku
--HG--
extra : rebase_source : db09f7ab93a1c41ace03a645623f78a27ecfff8c
2018-04-03 13:21:06 +10:00
Coroiu Cristina 71988c7b7e Merge inbound to mozilla-central a=merge 2018-09-28 00:36:46 +03:00
Andrew McCreight 5a1eb609f9 Bug 1493276 - Statically prevent CallQueryInterface to a base class r=froydnj
If a class A is derived from a class B, then an instance of A can be
converted to an instance of class B via a static cast, so QI is not
needed. QIs are slower than static casts.

TestCallTemplates seems to be testing that CallQueryInterface compiles
even if the first argument's class is only ambiguously castable to
nsISupports, so I changed the second argument to be a class unrelated
to the concrete class.

I also removed some useless null checks on the return value of new.

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

--HG--
extra : moz-landing-system : lando
2018-09-27 14:59:55 +00:00
Doug Thayer ae67ae685f Bug 1493447 - Check for 0 length before copying table values. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D6678
2018-09-26 13:07:41 -04:00
Jonathan Watt 8b400ea6ce Bug 1494695. Remove SVGFilterElement::Invalidate. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7095

--HG--
extra : rebase_source : 951c95ceef8ce6682ed867aa96c88283c64ccbd1
extra : __touch-noise__ : 4288727139
extra : amend_source : ad0a1fcb56b4c1ad08f54142cac64c1ab7d7300b
2018-08-31 16:30:03 +01: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
Jonathan Watt 90314b1dd6 Bug 1492573. Make SVGTextFrame ignorant of the implementation details of SVG rendering observers. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6320

--HG--
extra : rebase_source : fb88b6e2a87dc2e766974cff1ffed1f11a86f5e5
2018-08-15 21:32:04 +01:00
Doug Thayer f0ed0dee36 Bug 1417699 - Remove PrimitiveType enum r=mstange
Ran into a couple of test failures because I was leaving
mAttributes empty for empty things like MergeAttributes, and
only setting mType. Since mType is now redundant though, and
since it's the only use of PrimitiveType, I figured I'd just
remove it entirely.

Depends on D4900

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:18:44 +00:00
Doug Thayer e79792a58a Bug 1417699 - Replace hash map with tagged union r=mstange
This replaces the hash map of attributes with a tagged union. In
this case, all filter attributes will be stored in line, with the
exception of some more complex attributes which have an internal
nsTArray of floats. This should help avoid all the hashing and
extra heap allocations.

Depends on D4899

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:18:16 +00:00
Doug Thayer 39b28dbb28 Bug 1417699 - Avoid copies of filter attributes when possible r=mstange
This is a more conservative optimization for bug 1417699. There's no
reason we need to be copying these everywhere, so let's just go ahead
and implement moves.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:17:43 +00:00
Robert Longson dad3e866c1 Bug 1396642 - support smaller viewBox coordinates at the expense of larger ones r=dholbert 2018-09-18 19:43:53 +01:00
Thomas Nguyen 7f029744d5 Bug 1330487 - Part 7: Send correct Referrer header when referencing SVG from CSS r=heycam
MozReview-Commit-ID: DAkZ1wjuEe0

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:37:46 +00:00
Thomas Nguyen 02f4dbbbf9 Bug 1330487 - Part 3: Propagate referrer policy from doc/sheet to URLExtraData r=heycam
Referrer policy argurment is passed from sheet/doc to URLExtraData, default
value is RP_Unset. We use default value in some cases, particularly when there's
no certain spec talks about that (svg for example)

MozReview-Commit-ID: 5VAX1ZUXD3i

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:36:45 +00:00
Jonathan Watt e729179571 Bug 1488700 p6. Rename nsSVGFilterReference to SVGFilterObserver. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5617

--HG--
extra : rebase_source : 32075c4e95fbedb102e94584330bcb0315d43fab
2018-08-13 10:39:12 +02:00
Jonathan Watt ac6f67ef4f Bug 1488700 p5. Get rid of nsISVGFilterReference. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5079

--HG--
extra : rebase_source : 3ad29efa0666b870cb3683b854919cc2d8514ad0
2018-08-09 20:15:48 +02:00
Boris Chiou 58b7c8f2bd Bug 1486094 - Part 5: Use the standalone struct and enum for the flags in SVG path. r=emilio,birtles
We define the standalone types for using derive macro easily and overriding
the behaviors of this traits. This could avoid defining the general
behavior of booleans.

Depends on D4788

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:25:59 +00:00
Robert Longson 5050624201 Bug 1486115 - use mozilla::IsAsciiDigit and mozilla::AsciiAlphanumericToNumber r=dholbert 2018-08-31 16:55:04 +01:00
Emilio Cobos Álvarez a1f03332c2 Bug 1486488 - Don't assume that SVGAnimationElement has a parent on bind. r=dholbert
This is a regression from bug 1450250, which removed a if (!GetCx()) early
return in this function.

That early return was wrong, both because it prevented elements that were in
shadow trees from targeting other elements, but also because that check was not
present in AfterSetAttr, which means that dynamic updates to the attribute would
work.

Pass the SVGAnimationElement itself to resolve references. That's what we do for
attribute mutations, and also it's the same behavior we have, since the ID
lookup IDTracker does only depends on containing shadow root and containing
document, and that's invariant between a kid and it's DOM parent.

Some other code has been updated to take references instead of pointers so the
null-safety of those methods is explicit.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 09:06:08 +00:00
Boris Chiou 7ba34b6df6 Bug 1246764 - Part 3: Layout part for |clip-path: path()|. r=jwatt
Create clip-path for the path function and reuse some APIs in
nsCSSClipPathInstance, so we don't have to update the code flow.

Differential Revision: https://phabricator.services.mozilla.com/D3635
2018-08-24 11:37:55 -07:00
Boris Chiou cc2e8fb329 Bug 1429298 - Part 6: Apply motion path transform matrix. r=nical
We implement the layout part of offset-path. Now we don't have
offset-distance, so use the default value, 0%, for it.

Note: rename mCombinedTransform as mIndividualTransform, which only
stores the combined individual transforms. We apply the individual
transforms, motion path transform, and specified transform in
ReadTransforms. (We have to follow the order, so we don't combine the
specified transform in FinishStyle.)

Differential Revision: https://phabricator.services.mozilla.com/D2968
2018-08-21 22:41:44 -07:00
Boris Chiou cfadc28092 Bug 1429298 - Part 5: Implement BuildPath for offset-path. r=jwatt
Implement one variant of BuildPath to accept nsTArray<StylePathCommand>,
which is used by <offset-path> (and clip-path in the future).

Differential Revision: https://phabricator.services.mozilla.com/D2967
2018-08-21 22:41:42 -07:00
Boris Chiou b2e2f913eb Bug 1429298 - Part 4: Rename builder as aBuilder in SVGPathData.cpp. r=TYLin
Follow the rule of naming for the function parameters.

Differential Revision: https://phabricator.services.mozilla.com/D3922
2018-08-21 22:41:41 -07:00
Tiberius Oros aff5d4ad5d Merge inbound to mozilla-central. a=merge 2018-08-09 13:02:05 +03:00
Emilio Cobos Álvarez 1fbd784d00 Bug 1481601 - Remove now-useless aPreallocateChildren from nsINode::Clone() and friends. r=bzbarsky
Since sed on multiple lines ended up being such a pain and I didn't end up
writing a script for this because I didn't think it'd end up being so boring, I
may have made a couple cleanups here and there as well...

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

--HG--
extra : moz-landing-system : lando
2018-08-08 23:58:44 +00:00
Andrew Osmond 51d273388c Bug 1416328 - Part 2. Expose decoding attribute for img elements. r=bz,tnikkel
This adds support for HTMLImageElement's decoding attribute, as
described by:

https://github.com/whatwg/html/pull/3221
https://whatpr.org/html/3221/images.html#decoding-images

It also exposes the same attribute on SVGImageElement, just as Blink has
chosen to do so.
2018-08-08 07:56:01 -04:00
Olli Pettay 7315a671e1 Bug 1481399 - rename nsAttrAndChildArray to AttrArray, r=mrbkap
--HG--
rename : dom/base/nsAttrAndChildArray.cpp => dom/base/AttrArray.cpp
rename : dom/base/nsAttrAndChildArray.h => dom/base/AttrArray.h
extra : rebase_source : 488f4d9c87bf337686abfa98e79466343a9e6685
2018-08-07 22:07:26 +03:00
Robert Longson 91f16c1309 Bug 1480946 - systemLanguage should be case insensitive r=dholbert 2018-08-06 21:47:20 +01: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
Robert Longson 3116ab5e06 Bug 1479272 - remove svg.marker-improvements.enabled pref r=heycam 2018-07-31 21:45:29 +01:00
Emilio Cobos Álvarez 2996813963 Bug 1479450: Implement nsCSSProps::LookupProperty using Rust. r=xidorn
Always assume allowed-for-all-content. There are a couple callers which weren't
doing that:

 * A unit test -> removed.

 * ComputeAnimationDistance: Used for testing (in transitions_per_property), and
   for the animation inspector. The animation inspector shouldn't show
   non-enabled properties. The transitions_per_property test already relies on
   getComputedStyle stuff which only uses eForAllContent.

 * GetCSSImageURLs: I added this API for the context menu page and such. It
   doesn't rely on non-enabled-everywhere properties, it was only using
   eInChrome because it was a ChromeOnly API, but it doesn't really need this.

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

MozReview-Commit-ID: 4VOi5Su3Bos
2018-07-31 12:00:15 +02:00
Emilio Cobos Álvarez 47b44daec3 Bug 1477965: Fix SVGAnimationElement::AfterSetAttr. r=heycam
It's not fine to only check if we're in a document in one of the code
paths.

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

MozReview-Commit-ID: JXLexono4kv
2018-07-26 14:47:42 +02:00
Boris Zbarsky 1914ffc8ec Bug 1450167. Stop using atom-or-string for event names in the listener manager. r=smaug
Now that we support atoms off the the main thread, we can just use atoms.
2018-07-24 18:15:19 -04:00