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

145 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe 33e7b8838f Bug 1418867 - Pass element or pseudo element to Servo_StyleSet_GetBaseComputedValuesForElement(). r=emilio
MozReview-Commit-ID: Ae3iZ6g3x3c

--HG--
extra : rebase_source : 8d07ac08d63cfdb96cb07a73ed86b268d6b5026e
2017-11-22 11:03:40 +09:00
Hiroyuki Ikezoe a2e3c0154c Bug 1418867 - Drop pseudo type argument from KeyframeEffectReadOnly::EnsureBaseStyle(). r=birtles
We have the pseudo type in mTarget.

MozReview-Commit-ID: GoXzoavnwpL

--HG--
extra : rebase_source : 2f46f581b662d7954211776f58b5104fc615486f
2017-11-22 09:56:56 +09:00
Brian Birtles c64d600a96 Bug 1418220 - Drop AnimationUtils::IsCoreAPIEnabled(ForCaller) and use nsContentUtils::AnimationsAPICoreEnabled / nsDocument::IsWebAnimationsEnabled instead; r=hiro
The difference between nsDocument::IsWebAnimationsEnabled and
nsContentUtils::AnimationsAPICoreEnabled is that the former checks the caller
type and treats the preference as set for system callers which is particularly
needed for enabling things like the getProperties() API for DevTools etc.

Generally in API-facing call sites we have a JS context / CallerType and so we
want to distinguish between system callers and non-system callers. However, for
a few internal uses--specifically filling-in missing keyframes--we don't care
about the caller type and always follow the pref setting.

That may or not be quite what we want, but this patch doesn't change that except
for one call site: KeyframeUtils::GetKeyframesFromObject. This patch changes
GetKeyframesFromObject from *not* checking the caller type to checking the
caller type. That seems to be the correct behavior here since this is called
from KeyframeEffectReadOnly::SetKeyframes(JSContext*, JS::Handle<JSObject*>,
ErrorResult&) (i.e. a JS API-facing call site) where we *should* enable the full
API when the caller is chrome code.

MozReview-Commit-ID: FQJBk3zytwd

--HG--
extra : rebase_source : 577bca1e551e39fecfab309f64c993eba110337f
2017-11-20 14:18:43 +09:00
Jonathan Watt ab7efc9dbb Bug 1417365 - Unified build issues in dom/animation. r=baku 2017-10-26 11:55:28 +01:00
Ya-Chieh Wu d2e5bc76eb Bug 1381153 - Part 1: Cache MayHaveOpacityAnimation and MayHaveTransformAnimation in nsIFrame. r=mstange, r=mats
There are two places where I have to cache the status of MayHaveOpacityAnimation
and MayHaveTransformAnimation. First place is in |nsIFrame:init()| where an
element is associated with a frame. Second place is in
|KeyframeEffectReadOnly::UpdateEffectSet()| where the script can add animations
on element.

btw I keep the original two flags of MayHaveOpacityAnimation and
MayHaveTransformAnimation in EffectSet because there is no guarantee that
an element has been associated with a frame when we call to |UpdateEffectSet()|.
But we still want to keep the benefits that we can quickly look up
MayHaveOpacityAnimation or MayHaveTransformAnimation. So I keep them in
EffectSet and transfer the status into nsIFrame when we bind an element
to a frame in nsIFrame:Init().

MozReview-Commit-ID: JDwyAQQTKA7
2017-11-13 18:15:00 -05:00
Kartikaya Gupta 87186734ba Bug 1416540 - Convert AnimationValue::GetStyleValue to return a float-based Size. r=mattwoodrow
This follows from the previous patch; these values feed into UpdateMinMaxScale
as well, which explicitly wants to use floats, so there's no point in creating
doubles. The source of this information is also a float-based matrix.

MozReview-Commit-ID: LPk4Xm9AaJJ

--HG--
extra : rebase_source : d7714755fb1078880133d6f044cc9bc7743439ee
2017-11-12 18:37:33 -05:00
Hiroyuki Ikezoe dba3425d42 Bug 1190721 - Throttle animations that produce any transform change hint if the target element is out-of-view. r=birtles
And unthrottle them on every 200ms just like we do for transform animations on
the compositor.  To unthrottle the transform animations properly, we need to
update UpdateLastTransformSyncTime each time we compose the style for the
animations instead of updating it when we send the transform animation to the
compositor.  That's because display item for transform is built even while we
are throttling the transform animations for some reasons, so if we updated the
last transform sync time there, the time will not match what it should be.

MozReview-Commit-ID: GwMzJqUlzd2

--HG--
extra : rebase_source : 09e379191970687a9f35aead871acf450c63813e
2017-10-31 09:45:41 +09:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) 3fa03bb34e Bug 1404181 - Part 22: Make sure we mark frames as modified any time they change position or style data and make sure we don't accidentally mark the root as being modified when we don't need to. r=mstange
MozReview-Commit-ID: J5ov5cwvvrE

--HG--
extra : rebase_source : 4eadb82e5e0b3264cc7d6aeef2693ce8aea69b43
2017-09-29 10:51:49 +13:00
Hiroyuki Ikezoe be0c3c9792 Bug 1383239 - Don't throttle non-visible changes involved animations on out-of-view elements when they are newly in-effect. r=birtles
MozReview-Commit-ID: G9OL3pPZarr

--HG--
extra : rebase_source : 649211f4054eb3c62e993f0aafbb21a6ddd1a17a
2017-10-20 18:23:44 +09:00
Boris Chiou 22d25c4d73 Bug 1303235 - Part 3: Enable test_restyle.html and remove the early return in CanIgnoreIfNotVisible. r=hiro
MozReview-Commit-ID: LMKSVW2sh5N

--HG--
extra : rebase_source : 96d48acefeedaa5e9510ea51567b87439bb8f48e
2017-10-11 14:39:37 +08:00
Boris Chiou 80e5237e58 Bug 1303235 - Part 2: Templatize CalculateCumulativeChangeHint. r=hiro
MozReview-Commit-ID: JHSn7FoRPpW

--HG--
extra : rebase_source : f79dbf3b65bc20c13976e348cb9d192bd8b4bb4b
2017-10-12 16:12:54 +08:00
Hiroyuki Ikezoe 2b54925c5c Bug 1407463 - Drop unused pseudo atom argument from GetBaseContextForElement. r=heycam
MozReview-Commit-ID: JJ2Jh1I6y4h

--HG--
extra : rebase_source : 99c458dfffee88103e5f2b01f9ff9ae0256b8c62
2017-10-11 10:00:37 +09: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
Hiroyuki Ikezoe 9d610320fe Bug 1406284 - Remove unused parent context argument. r=heycam
MozReview-Commit-ID: A1yIOZ1bWjY

--HG--
extra : rebase_source : a4daa3466382b64f50256d1c081f886b98f4f80d
2017-10-06 13:51:02 +09:00
Hiroyuki Ikezoe 9e9a01fd49 Bug 1402219 - Compute css variables with custom properties in keyframes for getKeyframes(). r=birtles
MozReview-Commit-ID: 7CMnWbzzemY

--HG--
extra : rebase_source : 977a2d4af632beef45906cb0eb1077fc48ccd4ed
2017-09-27 16:49:21 +09:00
Brian Birtles 3b5522acdc Bug 1314537 - Drop comment reference to SharedKeyframeList; r=comment-only, DONTBUILD
This has been dropped from the spec in:

  17b14a7269

--HG--
extra : rebase_source : f0c824c5bd5bec7aefbc742830520a3a210468ef
2017-09-20 11:56:00 +09:00
Hiroyuki Ikezoe e077bd95a1 Bug 1400022 - Backed out changeset 610fbd30a6a3 (bug 1397057). r=mattwoodrow
The SchedulePaint() ends up calling
nsSVGEffects::InvalidateDirectRenderingObservers, it doesn't need for retained
display list, and causes harmful restyle events for stylo.

We will call ScheulePaint without involing InvalidateDirectRenderingObservers
later in another bug.

MozReview-Commit-ID: 10V9JLHZmCs

--HG--
extra : rebase_source : 664718eb91e973a4619847e4bfa94327e410f364
2017-09-19 11:14:48 +09:00
Matt Woodrow a33c79d3b5 Bug 1397057 - Invalidate frames whenever we toggle an animation on the corresponding Element. r=birtles
MozReview-Commit-ID: GPGaRU9HxY6

--HG--
extra : rebase_source : 9029c46b539acec5206d8e32fad9fbf36e7ee51c
2017-09-12 14:13:10 -04:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Brian Birtles ac44c390db Bug 1385139 - Expand var() references in keyframes from CSS animations when serializing; r=hiro
This is a temporary step until we implement bug 1391537. It is needed to
maintain consistent behavior with Gecko and provide sensible output,
particularly in the case where we have longhands whose values are drawn from
unparsed shorthands.

MozReview-Commit-ID: 9aD2tsLagBp

--HG--
extra : rebase_source : cdabb26be17b96a574ea8b2e8093e11abb1af430
2017-08-21 12:35:35 +09:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Brad Werth d073eb9bda Bug 1383296 Part 1: Remove all uses of the nsCSSValue::Serialization enum, now that it no longer has multiple values. r=heycam
MozReview-Commit-ID: n6px5hNHtB

--HG--
extra : rebase_source : 6269a9d52e0282d0391276dc1b9ee26dbde7b985
2017-07-21 17:26:35 -07:00
Brian Birtles 3f0630429e Bug 1371493 - Compare AnimationValues when producing property-based keyframes; r=hiro
The KeyframeEffectReadOnly::GetProperties compares AnimationValue's mGecko
member which means it sometimes produces the wrong results when using the Servo
backend. Now that AnimationValue has a suitable operator!= method we can simply
compare the AnimationValues directly.

MozReview-Commit-ID: DQQbmcdeynw

--HG--
extra : rebase_source : 509230cf460308b0a534fe9831e9e0d7fa3b8bee
2017-07-24 10:25:13 +09: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
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
Manish Goregaokar f33beecc59 Bug 1367904 - Part 10: stylo: Switch Gecko over to ServoStyleContext; r=bholley
MozReview-Commit-ID: EmopKVjEzlz
2017-07-17 21:00:46 -07:00
Manish Goregaokar c2b070c584 Bug 1367904 - Part 5: stylo: Make GetBaseComputedValuesForElement return a style context; r=bholley
MozReview-Commit-ID: K5WpWc26xNZ
2017-07-17 21:00:32 -07:00
Emilio Cobos Álvarez dc33155ad6 Bug 1379505: Allow calling GetBaseComputedStylesForElement for an unstyled element. r=boris
Before this refactoring, getComputedStyle could have side effects, and left the
style data in the element, so we could never arrive there without data.

There are a few crashtests that caught this, but this was already broken if you
called animate() on an element deep in a display: none subtree.

MozReview-Commit-ID: 1AvOvhAyOP3

--HG--
extra : rebase_source : 0a920df8809961f784026a14a624d8eafb4cc79f
2017-07-10 13:33:21 +02:00
Brian Birtles 8ff7b93580 Bug 1376594 - Track locally whether an effect is part of an EffectSet to avoid hashmap lookups; r=hiro
MozReview-Commit-ID: IEeAmyR9ZlS

--HG--
extra : rebase_source : 112ec688662a14668839f3ceb45192e50edbe381
2017-07-05 10:29:58 +09:00
Brian Birtles 52e868b638 Bug 1370019 - Rename UpadataEffectSet to UpdateEffectSet; r=cjku
MozReview-Commit-ID: DbGvHjpr7xx

--HG--
extra : rebase_source : 8288da5110aec5e8494bf4e6e29d443a1d1437d5
2017-06-20 15:42:26 +09: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
Manish Goregaokar 02ab46c24d Bug 1373018 - Part 8: stylo: Move nsStyleContext::SetStyle to GeckoStyleContext; r=bholley
MozReview-Commit-ID: ycXu95whnG

--HG--
extra : rebase_source : 852051aa074cc8ed8f11f0d68c26fe4f0a6962b6
2017-06-10 22:27:45 -07:00
Boris Chiou 855f40d72b Bug 1339690 - Part 6: Move GetComputedKeyframeValues into local static. r=birtles
MozReview-Commit-ID: Ay3i9fDSbVg

--HG--
extra : rebase_source : 9d1de95cf15a0882fd50feb55878758c419d66ae
2017-06-14 12:51:27 +08:00
Boris Chiou 02bf8062fe Bug 1339690 - Part 4: Rename ApplyDistributeSpacing to DistributeKeyframes. r=birtles
There is no spacing mode any more, so rename this function.

MozReview-Commit-ID: 9DIqKmQnuJo

--HG--
extra : rebase_source : 3600be87a699a1a5fe237f8ed75baf03f0b5ae84
2017-06-15 10:47:32 +08:00
Boris Chiou f8dbd6bb32 Bug 1339690 - Part 3: Drop spacing mode. r=birtles,smaug
MozReview-Commit-ID: 1c7jpzWQjVP

--HG--
extra : rebase_source : 7850e290abb5fd87684c99710666c881eb777eb4
2017-06-13 15:09:19 +08: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
Brian Birtles 60c808ad43 Bug 1353202 - Add support for iteration composite modes r=hiro
MozReview-Commit-ID: BlmR88fPF6J

--HG--
extra : rebase_source : d57cb6ca20e314374cc5a26caf3d03a1ac71cd26
2017-05-24 11:14:35 +09:00
Boris Chiou 731ab38439 Bug 1334036 - Part 10: Return AnimationValue for BaseStyle. r=hiro
We need to retrieve the correct base style for Servo backend, so change
the return value to AnimationValue and update
KeyframeEffectReadOnly::BaseStyle().

MozReview-Commit-ID: 9FL3h1DLoJt

--HG--
extra : rebase_source : 42284c5fe8b8135910cde44b0815eb475ca2f1cc
2017-05-10 11:06:19 +08:00
cku 19af87ab38 Bug 1205475 - Part 1. Hold MAY_HAVE_OPACITY_ANIM/ MAY_HAVE_TRANSFOMR_ANIM information in EffectSet. r=mattwoodrow
FRAME_STATE_BIT of nsFrame and nsINode::mBoolFlags are both full, we need to
find another place to hold MAY_HAVE_OPACITY information.

nsINode::mSlots might be a choice, but since we always use this information in
painting, memory footprint of nsINode will become larger after this change.

So I decide to put this information right in EffectSet. The drawback of storing
this information in EffectSet is, although unnecessary Effect look-up is
prevented, we still need EffectSet property look-up in each time
HasOpacityInternal call, so we need Part 2.

Conceptually, Part 1 and Part 2 are independent.

MozReview-Commit-ID: 6sfBFSHjxQb

--HG--
extra : rebase_source : 394141cec3b44bb352297a0add8f9763d815bddb
2017-05-16 19:11:04 +08:00
Emilio Cobos Álvarez 8b2a66ab16 Bug 1364412: Convert pseudo-elements to an enum. r=hiro,xidorn
This allows us to access metadata using `match` instead of comparison with
atoms, which makes it doable to get the pseudo-element flags in the future.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: KgGjFePmhyS
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 57614aed13d2c088fe129ecf3fabf9869d5a6d50
2017-05-14 18:39:22 +02:00
Botond Ballo 7075b5e1c9 Bug 1361915 - Record telemetry each time we try to run a transform animation on the compositor. r=birtles,bsmedberg
The telemetry is recorded once per effect:target pair, and is intended for
comparison with the telemetry added in bug 1349808.

MozReview-Commit-ID: 8JYbAifjmki

--HG--
extra : rebase_source : a5adf4ea9c0836d9ad0ecde5e5869d00eccc2205
2017-05-03 21:39:42 -04:00
Wes Kocher 2325e84d49 Backed out changeset 3a3a19e0d903 (bug 1361915) for build bustage a=backout
MozReview-Commit-ID: 3BG6xILsiXW
2017-05-11 15:11:29 -07:00
Botond Ballo a7e015ab49 Bug 1361915 - Record telemetry each time we try to run a transform animation on the compositor. r=birtles,bsmedberg
The telemetry is recorded once per effect:target pair, and is intended for
comparison with the telemetry added in bug 1349808.

MozReview-Commit-ID: 8JYbAifjmki

--HG--
extra : rebase_source : fa0b615684ca1355f9bbc24b3355e90001db47b5
2017-05-03 21:39:42 -04:00
Hiroyuki Ikezoe d8fafebff7 Bug 1360776 - Pass AnimationValueMap raw pointer instead of Arc to Gecko_GetAnimationRule(). r=emilio
MozReview-Commit-ID: 5o8NuJolG2R

--HG--
extra : rebase_source : 13d732112dfe5614a83657c7bf7703944050c0f4
2017-05-01 18:45:41 +09:00
Brian Birtles f37fe9b84d Bug 1355348 - Move ServoComputedValuesWithParent to separate file; r=hiro
We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.

MozReview-Commit-ID: 4Z7YbsQ9xz4

--HG--
extra : rebase_source : 0f6f7248d1a4dfc77360829f3a0e6ed263f156db
2017-04-26 13:00:11 +09:00
Emilio Cobos Álvarez 6fe2b3e89d Bug 1355351: Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos. r=heycam
This also happens to fix other bugs, like making display: contents pseudos
animatable, which weren't before.

MozReview-Commit-ID: LhwTPNbFvSZ

--HG--
extra : rebase_source : 785105b08d6bfa15ad257e61b769a263c6810ad0
2017-04-19 12:53:57 +02:00
Carsten "Tomcat" Book 207b516e89 merge mozilla-inbound to mozilla-central a=merge 2017-04-06 12:50:50 +02:00
Hiroyuki Ikezoe 79052959a8 Bug 1311257 - Support missing keyframes handling for stylo. r=birtles
MozReview-Commit-ID: 1Iz6By2Y2Gp

--HG--
extra : rebase_source : 94dd3845c271e89f88dc7351b4cea179bd3bb2e5
2017-04-06 10:34:51 +09:00
Hiroyuki Ikezoe e432173483 Bug 1311257 - getKeyframes() returns base computed values in missing keyframes. r=birtles
MozReview-Commit-ID: K8btLtALEfK

--HG--
extra : rebase_source : 1709e9a153790f90e26da7170273474a4a1d2dfd
2017-04-06 10:34:51 +09:00
Hiroyuki Ikezoe 2614ef2eac Bug 1311257 - Use underlying value for missing keyframes. r=birtles,heycam
mBaseStyleValuesForServo is a nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>
In this patch, we use void* instead of exposing nsRefPtrHashtable in FFI
because we just use the hash table as an argument of a C++ function, it means
we don't touch the hash table in Rust at all.

MozReview-Commit-ID: 1wM6NeF2S0t

--HG--
extra : rebase_source : 17908ff84d061e189f21641bf660dc9720b964bc
2017-04-06 10:34:51 +09:00