Commit Graph

216 Commits

Author SHA1 Message Date
Brian Birtles
e1de2c2e24 Bug 1355349 - Call Servo's add and accumulate methods for SMIL animations; r=hiro
MozReview-Commit-ID: 1vREV73V0Wo

--HG--
extra : rebase_source : 34cd3ae04b19c3b1db01badc0016555ce5296c8c
2017-06-02 15:18:47 +09:00
Brian Birtles
4b967f386d Bug 1355349 - Reformat a ternary operator to match coding style; r=hiro
MozReview-Commit-ID: KUkqXMmzgR8

--HG--
extra : rebase_source : 45a40d595a5e2141144cd222b1236085d8143ef4
2017-06-02 15:16:48 +09:00
Brian Birtles
5273a18628 Bug 1355349 - Drop 'virtual' annotation from overridden methods in nsSMILCSSValueType.h; r=hiro
Our coding style says we should only use one of either 'virtual' or 'override'.
In the next patch I would like to add another override to this header so first
we should tidy up the existing declarations.

MozReview-Commit-ID: AFtMNvNCcNG

--HG--
extra : rebase_source : 60d0e4fc259ff05aa097a4cf2c10b75883b9deed
2017-06-02 15:14:52 +09:00
Brian Birtles
4e2036b283 Bug 1355349 - Treat properties that can't be animated by the Servo backend as unanimatable; r=hiro
If we attempt to call animation-related methods on the Servo backend (e.g.
Servo_ComputedValues_ExtractAnimationValue) and pass a property that is not
(yet) animatable by Servo, it will panic so we should avoid passing these
properties.

An alternative, is to make methods like
Servo_ComputedValues_ExtractAnimationValue fallible by having them first check
if the passed-in value is animatable and return null in that case. That too, is
probably worth doing (call sites like KeyframeEffectReadOnly::EnsureBaseStyle
that assume it is fallible could assert that the result is non-null since,
provided that property is animatable, the method should still be fallible) but
refusing to animate these properties from the start is cleaner so we just do
that for now.

MozReview-Commit-ID: ESYcbkTtfXG

--HG--
extra : rebase_source : 60e4469d0883c49b77118f9235f0f4b369f6cd3f
2017-06-02 15:14:43 +09:00
Brian Birtles
3325a83ce8 Bug 1355349 - Use Servo's zero values to fill in missing SMIL animation endpoints; r=hiro
MozReview-Commit-ID: 3WLDIlfnJcD

--HG--
extra : rebase_source : c4392aeaa07e030c147610ca7f96fbda363c030a
2017-06-05 10:28:17 +09:00
Hiroyuki Ikezoe
14e0273b91 Bug 1367293 - Don't get parent style for GetComputedKeyframeValuesFor. r=birtles
MozReview-Commit-ID: 7WjsO7P2QGz

--HG--
extra : rebase_source : b9d2d672dd670f54174a5811c7d28efe268c0c4d
2017-06-02 09:38:54 +09:00
Hiroyuki Ikezoe
c4038e928d Bug 1367293 - Early return from ValueFromStringHelper() if the target element is not associated with any documents. r=birtles
MozReview-Commit-ID: 1mcCb5txtB4

--HG--
extra : rebase_source : c2cf932f1a14cdde0ceb2729de47c4996484fa60
2017-06-02 09:38:00 +09:00
Nazım Can Altınova
e7316ee8fe Bug 1364746 - stylo: Continue to propagate quirks mode information to Servo r=bholley
I've propagated quirks mode information on some places. But we needed to pass
quirks mode to some other FFI functions to be able to handle that information
properly.

MozReview-Commit-ID: JovQWjN3YJx

--HG--
extra : rebase_source : bd25ba4276ae21ff4feb80e56b311202019268a0
2017-05-14 18:11:18 +03:00
Hiroyuki Ikezoe
7948721aac Bug 1363880 - Enable crashtest for SVG that no longer cause panic. r=birtles
MozReview-Commit-ID: KR7pyDUChFu

--HG--
extra : rebase_source : 662df24d0951f952aff652fa7e37c867d7ee45db
2017-05-17 05:50:58 +09:00
Hiroyuki Ikezoe
76442db0fb Bug 1357295 - Allow all numeric values for SMIL. r=birtles
MozReview-Commit-ID: Knlgs1j4dan

--HG--
extra : rebase_source : 02e84a42a377deb0489c123adaa6db4df244ca56
2017-05-13 19:47:38 +09:00
Hiroyuki Ikezoe
7cd8cdf2bb Bug 1357295 - Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength. r=emilio
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.

MozReview-Commit-ID: IDFNppjGeB

--HG--
extra : rebase_source : 456f661b33346ff4a756a66c6accf4ab1a5f2f80
2017-05-13 19:47:38 +09:00
Hiroyuki Ikezoe
9219415cbf Bug 1363574 - Allow unitless length for SMIL values. r=birtles
MozReview-Commit-ID: BkGCHgQVzHD

--HG--
extra : rebase_source : c0b0601fba6cfba04217dd6da7e942c167858496
2017-05-11 08:29:36 +09:00
Jeremy Chen
e265ee592d Bug 1359343 - annotate svg related crashtests to enable stylo for SVG documents. r=heycam
The two skipped tests (1 in layout/base/ and 1 in view/) both cause leaks while
running crashtests, so annotate them with a tracking bug (bug 1363000) filed.

MozReview-Commit-ID: GhSRt4wqu44

--HG--
extra : rebase_source : ed81c75251b35cee7f940b38e3998a6df3c1fcc6
2017-05-05 09:58:56 +00:00
Mantaroh Yoshinaga
0b67f40478 Bug 1357979 - Add dom.animations-api.core.enabled preference to test of smil with transition in order to enable beta/release test. r=birtles
MozReview-Commit-ID: EmdxQMgjatu

--HG--
rename : dom/smil/test/test_smilWithTransition.html => dom/smil/test/file_smilWithTransition.html
extra : rebase_source : e4e0011a3b6a7583a1fbf69dfa02afcc1262db5c
2017-05-01 22:54:11 +09:00
Brian Birtles
0484ed8286 Bug 1355348 - Don't return early when sampling SMIL animations with Servo backend; r=heycam
MozReview-Commit-ID: 26PxOSB9C9l

--HG--
extra : rebase_source : 5b414022395ecef8c310b8e1351ca4072215faad
2017-04-26 13:00:12 +09:00
Brian Birtles
93862d0cba Bug 1355348 - Make nsSMILCSSValueType store an AnimationValue instead of a StyleAnimationValue; r=heycam
MozReview-Commit-ID: 7EF9CN2SdwQ

--HG--
extra : rebase_source : 7aba63b5b537655191d2031881e8a15d38589ac2
2017-04-26 13:00:12 +09:00
Brian Birtles
3a16a45d8f Bug 1355348 - Factor out method to remove minus sign from property values; r=hiro
This is just a minor refactoring to simplify ValueFromStringHelper before we
refactor it further in the next patch (and so we can re-use this definition to
produce debug warning for Servo since we don't handle negative values there
yet).

MozReview-Commit-ID: CfcnI2Be5di

--HG--
extra : rebase_source : 4e052cc37d24671159f32c3e0ca3bc48f5a73c54
2017-04-26 13:00:11 +09:00
Brian Birtles
a7d2fa0411 Bug 1355348 - Add SMIL restyles in the stylo pretraverse; r=heycam
MozReview-Commit-ID: mwjkKr6wsr

--HG--
extra : rebase_source : 23324e128041f6d190312958dab093da382863f3
2017-04-26 13:00:11 +09:00
Aryeh Gregor
af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00
Brian Birtles
61d7e366f8 Bug 1315874 - Use base style context to resolve base values in nsSMILCSSProperty; r=heycam
MozReview-Commit-ID: 12Y6svWgXG

--HG--
extra : rebase_source : 345712d11b268648a18660decf4d2989384cd3c3
2017-04-03 16:49:27 +09:00
Brian Birtles
c94eac8983 Bug 1315874 - Pass a base style context to nsSMILCSSProperty; r=heycam
We will use this in the next patch in this series to fetch the base style.

(I tried simply passing this as a parameter to GetBaseStyle but it proved to be
more complicated since all the overrides of GetBaseStyle would need to be
updated to take a parameter that would be irrelevant to most of them.)

MozReview-Commit-ID: Fdr4rFUlE9V

--HG--
extra : rebase_source : 26978951302b4764938959a065402f05220b6093
2017-04-03 16:49:10 +09:00
Brian Birtles
33041d1214 Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F

--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
2017-04-05 14:39:23 +09:00
Brian Birtles
6a706e8040 Bug 1315874 - Add MightNeedBaseStyle helper method; r=dholbert
We will use this in a subsequent patch in this series to determine if we need to
fetch a style context at the beginning of ComposeAttribute (when we create the
nsISMILAttr) or not.

MozReview-Commit-ID: CFBNmmFNNef

--HG--
extra : rebase_source : 4729b2e1194649f461c353fa74d99b5b7829a077
2017-04-03 16:49:09 +09:00
Brian Birtles
c02e19cf1f Bug 1315874 - Add a method to nsSMILCSSValueType that takes a StyleAnimationValue; r=dholbert
In a subsequent patch we will extract a StyleAnimationValue from an
nsStyleContext. Rather than serializing it and then re-parsing it into
a StyleAnimationValue, this patch adds a method to directly accept
a StyleAnimationValue since that is what nsSMILCSSValueType stores internally
anyway.

MozReview-Commit-ID: KBaLYAzAlWZ

--HG--
extra : rebase_source : b42f25236fba52939e07c63f5195d10678ea12bd
2017-03-30 16:53:15 +09:00
Mantaroh Yoshinaga
e6e8efa20f Bug 1315874 - Add test that SMIL does not trigger CSS Transitions; r=dbaron
MozReview-Commit-ID: D8zZTFkoY6p

--HG--
extra : rebase_source : 557360b8d55200b6e5e3e12c83f87f0bfb931133
2017-01-16 14:07:39 +09:00
Brian Birtles
5986b384f6 Bug 1353208 - Add check for attribute namespace ID when we decide if it should animate as a CSS property or not; r=dholbert
This seems like an existing bug. If the content specifies
attributeType="yer:opacity", we should not try to animate it as a CSS property.
This patch adds a namespace check before we try to animate as a CSS property.

MozReview-Commit-ID: 1LpBa23ddqX

--HG--
extra : rebase_source : c5a4edb4c48bfd6116e58d4ef3eb91384ee86bd5
2017-03-30 16:13:02 +09:00
Brian Birtles
6b8dbeadd1 Bug 1353208 - Simplify logic in GetCSSPropertyToAnimate to remove double negatives; r=dholbert
MozReview-Commit-ID: 41qhKdcNoNB

--HG--
extra : rebase_source : 22541e23514b950e6d48c72bb0ee4a1f992f67b1
2017-04-04 14:56:52 +09:00
Brian Birtles
e96d223104 Bug 1353208 - Factor out nsSMILCompositor::GetCSSPropertyToAnimate helper method; r=dholbert
In bug 1315874 we will create a method to check if we're likely to need to
resolve base styles or not, and for that we need to extract the check for
whether or not we're animating a CSS property.

MozReview-Commit-ID: 9Ybsi91fro8

--HG--
extra : rebase_source : e2f72a7d807bfbe026fbd1a603cd993c3d502584
2017-03-30 13:10:08 +09:00
Brian Birtles
1efabc2e0b Bug 1353208 - Don't allocate separate heap memory for nsSMILCompositor::mCachedBaseValue; r=dholbert
nsSMILCompositor::mCachedBaseValue is an nsAutoPtr<nsSMILValue> that we allocate
on the heap. It looks like we did that back in bug 533291 presumably because it
makes transferring these cached values between nsSMILCompositor objects cheaper.

One drawback of this, however, is that mCachedBaseValue has two null states:
the mCachedBaseValue pointer can be null, and the pointed-to nsSMILValue can be
a null value (i.e. IsNull() returns true).

Now that we have move ctors and operators defined for nsSMILValue we can
transfer these objects between compositors cheaply without requiring the object
to be allocated as separate heap object. This patch makes mCachedBaseValue just
a regular nsSMILValue class member (i.e. drops the nsAutoPtr).

There's a subtle difference in behavior with regards to the first sample.
Previously we would compare the (initially) null mCachedBaseValue pointer with
the passed-in nsSMILValue and set mForceCompositing to true. With this patch,
however, we will only set mForceCompositing to true if the passed-in
mCachedBaseValue is not null.

I believe this is correct, however, since if we don't call GetBaseValue in
ComposeAttribute we should not be setting mForceCompositing to true (something
else should ensure that gets set to true), and if we do call GetBaseValue the
result should not be a null nsSMILValue (except in some OOM cases where we don't
really care if we miss a sample). This patch adds an assertion to check that
GetBaseValue does, in fact, return a non-null value. (I checked the code and
this appears to be the case. Even in error cases we typically return an empty
nsSMILValue of a non-null type. For example, the early return in
nsSMILCSSProperty::GetBaseValue() does this.)

MozReview-Commit-ID: BRJFa4xMdxz

--HG--
extra : rebase_source : f3e3ca1e01e73610523bde7583e2a002d2473184
2017-03-30 13:10:07 +09:00
Brian Birtles
8ff0648aee Bug 1353208 - Use UniquePtr for handling heap-allocated nsISMILAttr objects; r=dholbert
MozReview-Commit-ID: 10lA0ZaXChj

--HG--
extra : rebase_source : f5285b5363b2247ac73f63d9d13f8a109728a7c2
2017-03-30 13:10:07 +09:00
Brian Birtles
b4442afb51 Bug 1353208 - Sort includes in nsSMILAnimationController.cpp; r=dholbert
We will add to these includes later in this patch series so we sort them now so
it's clear where to add to.

MozReview-Commit-ID: CgqlS3f62nu

--HG--
extra : rebase_source : 009e8de1961cfd3d0f9cd72061e2e8f254f03cad
2017-03-30 13:10:06 +09:00
Brian Birtles
a8a97cdc11 Bug 1353208 - Drop a few remaining references to attributeType; r=hiro
These are left over from bug 1062106.

MozReview-Commit-ID: 4vfcT4O2tMz

--HG--
extra : rebase_source : 2d606f0d5470ae0c56318f7d682ff1ab3ad86f19
2017-03-30 13:10:06 +09: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
Jan Henning
8a6b5c9c8a Bug 1328868 - Part 2 - Apply the system font scale as an additional text zoom factor to all pages that are not font inflated. r=tnikkel
We want to use a similar model as Chrome on Android does for scaling our display of web content, that is use font inflation for desktop pages and plain text zooming for everything else.

Since we don't want to simply clobber any text zoom that might have been set by the user/front-end code, we allow setting and storing the system font scale separately on the PresContext. We then calculate the effective text zoom value as the product of the system font scale and the current text zoom value.

Any function that is using the PresContext's TextZoom value for layouting/rendering is switched over to this new EffectiveTextZoom value, whereas functions that are interested in the text zoom as actually set by the user/front-end (e.g. the nsDocumentViewer, or the code responsible for copying text and full zoom settings into the new PresContext on page navigation) continue using the plain TextZoom value.

As long as font inflation is enabled in principle (e.g. font.size.inflation.minTwips != 0), every page starts out as eligible for font inflation until the relevant meta viewport tags marking the page as "mobile friendly" have been detected. Since the PresShell caches the font inflation state and only recalculates it when necessary, we make use of that and set the PresContext's system font scale as necessary whenever the font inflation state has been refreshed.

MozReview-Commit-ID: 2InyE04wKAW

--HG--
extra : rebase_source : 3f6d7128f37c1dc18f67a6655f86d9a3003fe90b
extra : source : 6100458b97289f9aea5ac8fda57ded045e6860b7
2017-02-25 13:22:52 +01:00
Mantaroh Yoshinaga
2558f6837e Bug 1062106 part 3 - Remove SMIL MappedAttribute mechanism. r=birtles
We can remove unnecesasary SMILMappedAttribute and SMILAttrAnimationRuleProcessor since earlier patches in this serieas mean this code is no longer used.

MozReview-Commit-ID: 5Rl5WFW5zZ1

--HG--
extra : rebase_source : cf2efca8d01c7e6cd5bd3b3b44d994c6cbb760e9
2017-03-21 15:45:58 +09:00
Mantaroh Yoshinaga
df05b9f9a2 Bug 1062106 part 1 - Remove special handling of attributeType='XML'. r=birtles,longsonr+218550
This patch removes handling of the 'attributeType' attribute so that we behave
as if attributeType is always 'auto'. This means that for CSS properties we
always animate them as CSS properties (i.e. we animate them as part of the
SMIL override stylesheet) rather than mapped attributes.

The one special case is width/height on an outer SVG. Previously we animated
this as a mapped attribute since Web compatibility requires that the
width/height on an outer SVG, when set explicitly, are mapped to style.
However, we can produce the same behavior by animating these as CSS properties
(as opposed to mapped attributes). There is no observable difference in results
returned by the SVG DOM APIs, only the level at which the result is added to
the cascade: the SMIL override stylesheet instead of the attribute animation
presentation hint level.

As part of this patch, we animate width/height on outer SVG elements as CSS
properties as opposed to mapped attributes both for consistency and also so
we can remove the animated mapped attribute code altogether.

MozReview-Commit-ID: Ll1LWWRQ66R

--HG--
extra : rebase_source : bd513e191e3d0ba2a1e982eea4c548392bf5817d
2017-03-21 15:42:17 +09:00
Brian Birtles
c2591c2bd2 Bug 1347168 - Hold on to animation elements while compositors might refer to their animation functions; r=dholbert
MozReview-Commit-ID: 1SH546Iu2FK
2017-03-21 08:47:46 +09:00
Florian Quèze
9d62681259 Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
Wes Kocher
9746f81e53 Merge m-c to autoland, a=merge
MozReview-Commit-ID: FzykkWPQCrq

--HG--
rename : browser/modules/test/browser_UsageTelemetry_content.js => browser/modules/test/browser/browser_UsageTelemetry_content.js
rename : browser/modules/test/browser_UsageTelemetry_content_aboutHome.js => browser/modules/test/browser/browser_UsageTelemetry_content_aboutHome.js
rename : browser/modules/test/browser_UsageTelemetry_searchbar.js => browser/modules/test/browser/browser_UsageTelemetry_searchbar.js
rename : browser/modules/test/browser_UsageTelemetry_urlbar.js => browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
2017-03-01 17:48:44 -08:00
Mantaroh Yoshinaga
e255a0466a Bug 1343415 - Add test for SMIL with xmil:href attribute which specifying outer element. r=birtles
MozReview-Commit-ID: BeyWbdYCaxe

--HG--
extra : rebase_source : b04b0858b064323a482fc687e33a845b78f7801e
2017-03-01 16:42:29 +09:00
Joel Maher
f297f17181 Bug 1339232 - annotate more dom/* moz.build files with BUG_COMPONENT. r=overholt
MozReview-Commit-ID: 2HbPxGkrVfv
2017-03-01 08:20:25 -05:00
Brian Birtles
c6848e20a8 Bug 1339591 - Rearrange construction order of RAII objects in SMIL code; r=mccr8
MozReview-Commit-ID: FXFF0Phvgjj
2017-02-16 15:36:04 +09:00
Xidorn Quan
95c1b23bd9 Bug 1339341- Downgrade several stylo errors to warnings. r=heycam
MozReview-Commit-ID: 2Sa8dS8uSo5

--HG--
extra : rebase_source : c6809309bbef5faf458b56018b964619ff386238
2017-02-14 18:26:10 +11:00
Cameron McCormack
b2ee81223c Bug 1334735 - Part 1: Move need style/flush flags from document to pres shell. r=bz
MozReview-Commit-ID: 2Amf9yGRiJA
2017-02-10 10:42:27 +08:00
Mantaroh Yoshinaga
cbf08f5f05 Bug 1322970 - Use primary frame for checking throttle instead of using style context. r=dholbert,hiro
This changeset will skip finding the first SMIL animation function to affect the sandwich from multiple functions if element hasn't primary frame when composing attributes.
This mean that target element's animation don't need to animate in the following cases.
- ancestor elements has display:none attribute.
- target element have display:none attribute.
- ancestor element's tag produces a non-rendering subtree, by definition (like <desc>).

MozReview-Commit-ID: 253qTpBLc8L

--HG--
extra : rebase_source : c6f0eff440fa5448fc28e5283be68b6e33335b9e
2017-02-02 15:23:22 +09:00
Cameron McCormack
8731638062 Bug 1334768 - stylo: Adjust a bunch of reftest expectations. r=me on a CLOSED TREE
MozReview-Commit-ID: 1qa08cspl7o
2017-01-31 17:38:24 +01:00
Cameron McCormack
590058f927 Bug 1324669 - stylo: Downgrade SMIL assertion even further to a non-test-failing warning. r=me
MozReview-Commit-ID: 5fk6C9qaOgW
2017-01-31 17:37:08 +01:00
Sebastian Hengst
ed5bd31f9b Backed out changeset ad45a3da5e4a (bug 1324669) for Windows build bustage: OverflowChangedTracker.h(44). r=backout on a CLOSED TREE 2017-01-31 17:32:12 +01:00
Sebastian Hengst
79a42c161e Backed out changeset e3687105be00 (bug 1334768) 2017-01-31 17:30:16 +01:00
Cameron McCormack
0333846acf Bug 1334768 - stylo: Adjust a bunch of reftest expectations. r=me
MozReview-Commit-ID: 1qa08cspl7o
2017-01-31 23:36:46 +08:00