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

250 Коммитов

Автор SHA1 Сообщение Дата
Brian Birtles 46d04e2219 Bug 1390384 - Apply SMIL's calcMode=discrete handling to discretely animatable properties in Stylo; r=hiro
In SMIL if a discrete calcMode is used, the keyTimes attribute may be used to
specify the times at which the various animation values are used, overriding the
regular 50% flip behavior (see nsSMILAnimationFunction::ScaleSimpleProgress).

However, this behavior is only applied when the calcMode is known to be
discrete. If the author specifies calcMode="linear" but
attributeType="stroke-linecap" then SMIL should fall back to discrete calcMode
including applying the special keyTimes behavior.

For the Servo backend, Servo_AnimationValues_Interpolate does not return an
error for discretely animated properties so SMIL does not recognize when we fall
back to discrete calcMode. This patch adds a check before performing
interpolation that tests if the property is a discretely interpolable one and,
if it is, returns an error so that we run SMIL's special discrete calcMode
handling.

MozReview-Commit-ID: FOp8XcNbvdu

--HG--
extra : rebase_source : 57ddb333855de111aa585fe894e99937681e5cd2
2017-08-15 14:40:06 +09:00
Hiroyuki Ikezoe 9bf9d338f9 Bug 1385089 - Set restyle subtree restyle hint if the element animates display style from 'none' to other. r=emilio
When display style is changed from 'none' to other in animation-only restyle
we need to resolve descendant elements' style that were in the display:none
subtree.

Three possible ways to resolve the descendant elements' style;

1) Traversing unstyled elements in animation-only restyle
   We can't simply traverse unstyled elements in the animation-only restyle
   since when we decided to traverse the unstyled elements we don't know yet
   the elements will be initially styled or are in display:none subtree. It
   will result that the new elements are styled in animation-only restyle,
   it's undesirable.

2) Creating a SequentialTask and resolve the descendants' style with
   ServoStyleSet::StyleNewSubtree()
   We can't resolve the descendants' styles with ServoStyleSet::StyleNewSubtree()
   in SequentialTask since at the moment we are still in servo traversal (i.e.
   sInServoTraversal is true). That means AutoSetInServoTraversal fails
   in PrepareAndTraverseSubtree().

3) Creating a SequentialTask and set restyle subtree hint and defer descendants'
   restyle in a subsequent normal traversal
   Note that, when we process throttled animations flush, we don't process
   normal traversal so the descendants will not be traversed until normal
   restyle happens but it will not be a big problem since it's really rare
   that user clicks display animation element just at the right moment when
   display property changes from none to other.  Also, if it will be really
   a problem, we should process *only* transform animations on the compositor,
   it's ideally right thing to do. Display property never runs on the
   compositor.

This patch takes the third approach.

MozReview-Commit-ID: Krxa3kkdIq4

--HG--
extra : rebase_source : 33e9db953f21168c76716329568191625bd15896
2017-08-02 20:01:08 +09:00
Bobby Holley c7e4963340 Bug 1384769 - Skip two smil tests due to crashes until bug 1385089 is sorted out. r=me
MozReview-Commit-ID: 4Bkav7OzvtU
2017-07-27 17:49:46 -07:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Carsten "Tomcat" Book 679210723b merge mozilla-inbound to mozilla-central a=merge 2017-07-25 14:27:17 +02:00
Xidorn Quan c4c6fbf75a Bug 1383980 - Enable animation mochitests in mochitest-style task. r=birtles
MozReview-Commit-ID: 38Ir2MG7IMO

--HG--
extra : rebase_source : 0997b7026a24cc271ad977db5ce233c393554dfa
2017-07-25 14:17:04 +10:00
Yoshi Huang 7036b3761f Bug 1382531 - Part 1: rewrite crashtest for data: URI is unique opaque origin. r=smaug 2017-07-25 09:56:02 +08:00
Emilio Cobos Álvarez 2b7de51623 Bug 1381844: Be more explicit about the kind of style context we handle all the time. r=bholley
MozReview-Commit-ID: E0mdkhU3XBz
2017-07-22 18:02:57 +02:00
Brian Birtles f1f7ad791c Bug 1375596 - Use valueToAdd in AddAccumulateOrValue, not valueToAddWrapper; r=hiro
AddOrAccumulate in nsSMILCSSValueType.cpp sets initializes |valueToAdd| to
either &valueToAddWrapper->mGeckoValue or nullptr. It then asks
FinalizeStyleAnimationValues to fill it in. FinalizeStyleAnimationValues will
return false if it could not fill it in, in which case AddOrAccumulate returns
early. As a result, after the early return we can be assured that |valueToAdd|
is not null. However, valueToAddWrapper may still be null.

Changeset 4d87f2bf4b10369af0dd83a2ef962a23299ee8d9 from bug 1358966 changed this
code such that we pass a member of valueToAddWrapper to StyleAnimationValue::Add
where we used to pass a member of valueToAdd. As a result, we can end up passing
0x20 (since valueToAddWrapper is nullptr) to Add() and then trying to read from
it.

This patch makes us pass, instead, |valueToAdd| since we know that is guaranteed
to be non-null here.

MozReview-Commit-ID: 1YwT1lBHnUe

--HG--
extra : rebase_source : abec6995af68de13eacaccf7eca7b2d121eaedf3
2017-07-18 16:24:28 +09:00
Emilio Cobos Álvarez dde6942936 Bug 1381764 - style: More ComputedValuesInner cleanup. r=Manishearth on a CLOSED TREE
MozReview-Commit-ID: 8rkAP3pMEpD
2017-07-18 16:22:33 -07:00
Emilio Cobos Álvarez 9a6ef770c1 Bug 1381764: Cleanup the Gecko bits. r=manishearth
MozReview-Commit-ID: dbVDy1u4vp
2017-07-18 16:22:00 -07:00
Josh Matthews e0c37f0ed3 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-10 17:52:00 -04:00
Wes Kocher 19d135c982 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 4R4GFHPiij
2017-07-06 16:19:38 -07:00
Nathan Froyd fa32de6af4 Bug 1378492 - label nsSMILTimedElement's AsyncTimeEventRunner; r=billm
Dispatching it to the associated document should be good enough.
2017-07-06 11:41:48 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Wes Kocher a9eb08898f Backed out changeset f220d8060c14 (bug 1352669) for build bustage CLOSED TREE a=bustage
MozReview-Commit-ID: INYGT4WT1pO
2017-07-06 14:56:06 -07:00
Josh Matthews 723b20d420 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter.
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-06 13:15:08 -07:00
Robert Longson 57cdb660f1 Bug 1374861 - add const keyword where appropriate. r=birtles 2017-07-01 10:55:27 +01:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Manish Goregaokar 3188b9bfd6 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA

--HG--
extra : rebase_source : e2f65c316be2c5640150eb5ff5628505ce446535
2017-06-10 22:27:45 -07:00
Brian Birtles f7f386ac4e Bug 1371196 - Round font-weight when interpolating, don't floor; r=hiro
The spec says,

 font weight: interpolated via discrete steps (multiples of 100). The
 interpolation happens in real number space and is converted to an integer by
 rounding to the nearest multiple of 100, with values halfway between
 multiples of 100 rounded towards positive infinity.[1]

However, our implementation pre-dates this spec text (bug 528234 landed Nov 2009
whereas the spec was updated in Mar 2012[2]).

This patch rounds the result by simply adding 50 to the result before we floor
it (which is good enough in this case because we don't need to worry about
negative values).

It also slightly simplifies the logic by re-using Clamp from MathAlgorithms.h.

[1] https://drafts.csswg.org/css-transitions/#animtype-font-weight
[2] 00c6286109

MozReview-Commit-ID: BjCg7MG70hW

--HG--
extra : rebase_source : 879ea18d7d1a49ff425d6e467081983a130a65e3
2017-06-09 12:19:47 +09:00
Hiroyuki Ikezoe b18c06da27 Bug 1358966 - Enable shorthand properties for SMIL. r=birtles
MozReview-Commit-ID: IyJIzVGpvYK

--HG--
extra : rebase_source : 90a34cf57a2af48b58c631c0e554e1710c448396
2017-06-09 06:19:38 +09:00
Hiroyuki Ikezoe 5626c5dfa9 Bug 1358966 - Serialize multiple AnimationValue(s) for sub properties of a shorthand into single shorthand string. r=birtles,manishearth
MozReview-Commit-ID: KihUZRSD6pg

--HG--
extra : rebase_source : 8a75edcde8acf5c47981ef009d7a3c2b1d40c777
2017-06-09 06:19:38 +09:00
Hiroyuki Ikezoe 19bb8c0441 Bug 1358966 - Call additive or accumulative functions for each sub properties of shorthand. r=birtles
MozReview-Commit-ID: 26uflUKa2oa

--HG--
extra : rebase_source : 7c296c94b0534e22038604963b6100cb7d02904e
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe aca372df5b Bug 1358966 - Compute distance for each sub properties of shorthand. r=birtles
We use Euclidean distance for shorhand.

MozReview-Commit-ID: 6gUbIUl9SZ

--HG--
extra : rebase_source : ef92e2387d9bbb8da51ce3b2c89f0c2cc2d182fe
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe d3612df34a Bug 1358966 - Call Servo_AnimationValues_Interpolate for each sub properties of shorthand. r=birtles
MozReview-Commit-ID: Ath0b06j5zm

--HG--
extra : rebase_source : 3851bcf8c3da3130b097b2c23669576afb2a8720
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe 9af90ec795 Bug 1358966 - Use Servo_GetAnimationValues. r=birtles
MozReview-Commit-ID: 7ag2IFUViDX

--HG--
extra : rebase_source : d545bf833a4bc428bf9141ff4cdfac05f4c453e1
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe 263593c1fa Bug 1358966 - Make RawServoAnimationValue in ValueWrapper an array. r=birtles
MozReview-Commit-ID: 15iGyKc2qe0

--HG--
extra : rebase_source : e5d565ac194b39a37731b13f5c8d20717fa71aed
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe b90af8cd9c Bug 1358966 - Split mCSSValue into a RawServoAnimationValue and a StyleAnimationValue. r=birtles
In case of gecko, we use only the StyleAnimationValue.
Whereas in case of servo, we use RawServoAnimationValue and
make it an array to store multiple values for shorthand sub properties.

MozReview-Commit-ID: 4PnWBk9WP2Q

--HG--
extra : rebase_source : a2b5878f14241c2cbf4adeeed3a0fa08ae230fa3
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe cdde6f6108 Bug 1368889 - Post animation restyle hint againt pseudo element instead of its parent. r=birtles
To traverse pseudo elements in animation-only restyle, the pseudo element
itself needs the animation-only dirty bit.

MozReview-Commit-ID: 11RfVqnPXfJ

--HG--
extra : rebase_source : d048c9a053c03bf3fef46fcbfd9cbd5f60204e1d
2017-06-08 10:22:25 +09:00
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