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

505 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 9882821e73 Bug 1692684 - Don't create transitions for invalid ::marker properties. r=hiro
The test-case in the bug does something interesting, where it causes a
transition on the parent by removing a CSS rule, and that causes us to
transition text-underline-offset on our ::marker, via the magic of
font-size-relative properties.

text-underline-offset, while it gets inherited from ::marker, is not a
valid CSS property to specify on marker per spec, so we trim it here:

  https://searchfox.org/mozilla-central/rev/899bbd9e5a0d6de9bb9f068c48b1445c7905d9cf/servo/ports/geckolib/glue.rs#5709-5712

And that causes us to create a transition with an empty effect and
everything goes downhill from here.

For now, just bail out in a nicer way than we were doing. I still need
to look into whether we should handle inherited transitions differently
from non-inherited one in this case...

I think our behavior after this patch would be correct for the test-case
(because text-underline-offset would transition on the parent and
::marker would inherit it). If you specify transition only on the marker
we'd refuse to transition (which I guess it is somewhat of a sensible
behavior).

Differential Revision: https://phabricator.services.mozilla.com/D105124
2021-02-24 16:35:17 +00:00
Hiroyuki Ikezoe dce9d89e6d Bug 1634943 - Split CSSTransition class into a new file in dom/animation/. r=boris
The motivation here is that we will want to call CSSTransition specific
functions, e.g. updating the start value of a given CSSTransition with
the latest value of the CSSTransition on the compositor, from somewhere
not in layout/style.  Unfotunately nsTransitionManager.h is not exposed
and we will never want to expose it since it's purely for layout/style
stuff.

Depends on D73570

Differential Revision: https://phabricator.services.mozilla.com/D73571
2020-05-05 22:41:02 +00:00
Razvan Maries 0a5bb478ea Backed out 8 changesets (bug 1634943) for build bustages on AnimationInfo.h. CLOSED TREE
Backed out changeset 2ee9c0fc07bf (bug 1634943)
Backed out changeset 812f8cfff1b2 (bug 1634943)
Backed out changeset c446c1edc943 (bug 1634943)
Backed out changeset 6ef1fcc1d428 (bug 1634943)
Backed out changeset 5e4ccd0bffac (bug 1634943)
Backed out changeset bf3c4e7b4691 (bug 1634943)
Backed out changeset 8f310f49a366 (bug 1634943)
Backed out changeset 421cd778da3d (bug 1634943)
2020-05-05 13:50:47 +03:00
Hiroyuki Ikezoe eee4796cb1 Bug 1634943 - Split CSSTransition class into a new file in dom/animation/. r=boris
The motivation here is that we will want to call CSSTransition specific
functions, e.g. updating the start value of a given CSSTransition with
the latest value of the CSSTransition on the compositor, from somewhere
not in layout/style.  Unfotunately nsTransitionManager.h is not exposed
and we will never want to expose it since it's purely for layout/style
stuff.

Differential Revision: https://phabricator.services.mozilla.com/D73571
2020-05-05 10:01:33 +00:00
Hiroyuki Ikezoe cff00579e3 Bug 1633442 - Check the current keyframe's properties instead of checking mTransitionProperty. r=boris
Since mTransitionProperty keep holding the original transition property even if
the target effect or keyframe was replaced by others. We need to make sure the
current transition is runnable on the compositor, i.e. having the effect and
keyframes and one of the properties is runnable on the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D73586
2020-05-05 01:29:44 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Botond Ballo 0cc43ec735 Bug 1629732 - Fix non-unified build errors in layout/style. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71454
2020-04-19 00:59:06 +00:00
Tom Tung b34fac17ed Bug 1586761 - P7 - Revert a few incorrect changes on P2; r=tjr
P2 removed IsTimerPrecisionReductionEnabled and thus removed the check for RFP
pref. While most ReduceTimePrecision* functions are fine with that because
GetTimerPrecisionType checks that, the two ReduceTimePrecision*RFP functions
miss the check.

This patch mainly cover the check for that two functions and rename them to
*RFPOnly since they only use RFP when the pref is on.

Depends on D64324

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

--HG--
extra : moz-landing-system : lando
2020-04-07 07:36:52 +00:00
Tom Tung 94183661ac Bug 1586761 - P2 - Introduce new TimerPrecisionTypes and a set of new Reduce methods to decide the TimerPrecisionType in the nsRFPService; r=tjr
To support checking CrossOriginIsolated in performance.now(), we need to:
- Add new types to TimerPrecisionType for nsRFPService
  - System, HighResAllowed are added
  - All is renamed to Normal
- Introduce a set of Reduce methods which require isSystemPrincipal and
CrossOriginIsolated to be passed and decide the TimerPrecisionType later
  - Original Reduce methods should only be called when callsites know the
  TimerPrecisionType. Otherwise, they should call the new methods.
- The following patches will use new methods

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

--HG--
extra : moz-landing-system : lando
2020-03-25 14:09:55 +00:00
Brian Birtles 1ed864c5e1 Bug 1292001 - Drop ElementPropertyTransition; r=boris
Differential Revision: https://phabricator.services.mozilla.com/D64523

--HG--
extra : moz-landing-system : lando
2020-03-02 06:40:31 +00:00
Brian Birtles 47e8e27385 Bug 1292001 - Make transition reversing behavior work even when the entire effect is replaced; r=boris
Differential Revision: https://phabricator.services.mozilla.com/D64522

--HG--
extra : moz-landing-system : lando
2020-03-02 06:39:01 +00:00
Brian Birtles 7f1a4ae7e1 Bug 1292001 - Drop TransitionProperty() and ToValue() from ElementPropertyTransition; r=boris
These are no longer needed and they make assumptions about the shape of the
keyframes/properties which are not valid if the keyframes are replaced.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 06:38:38 +00:00
Brian Birtles ca0cb641eb Bug 1292001 - Move transition start value replacing behavior to the CSSTransition; r=boris
This is needed so that later we can make the effect of transitions replaceable.

Note that the test added in this patch will fail without the code changes in
this patch.

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

--HG--
rename : layout/style/test/test_transitions_replacement_on_busy_frame.html => layout/style/test/test_transitions_replacement_with_setKeyframes.html
extra : moz-landing-system : lando
2020-03-02 06:38:36 +00:00
Brian Birtles d9c4b35ee9 Bug 1292001 - Move transition-timing-function from keyframe easing to effect easing; r=boris
This is yet to be specified although it is already tested in CSS Transitions
WPT. It is also needed in order to produce the expected reversing behavior when
CSSTransition's keyframes are replaced.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 06:35:05 +00:00
Oana Pop Rus feeffe566a Backed out 7 changesets (bug 1292001) for devtools failures in browser_animation_playerState.js on a CLOSED TREE
Backed out changeset 7ecffcc58457 (bug 1292001)
Backed out changeset 111e88a3f2a9 (bug 1292001)
Backed out changeset 851b689f6593 (bug 1292001)
Backed out changeset a94cb2c7e518 (bug 1292001)
Backed out changeset 4f12b279af44 (bug 1292001)
Backed out changeset f35daa06e7b6 (bug 1292001)
Backed out changeset 9dbefe504221 (bug 1292001)
2020-03-02 08:16:58 +02:00
Brian Birtles 9629d8ed3d Bug 1292001 - Drop ElementPropertyTransition; r=boris
Differential Revision: https://phabricator.services.mozilla.com/D64523

--HG--
extra : moz-landing-system : lando
2020-03-02 00:41:35 +00:00
Brian Birtles e8ff53a11b Bug 1292001 - Make transition reversing behavior work even when the entire effect is replaced; r=boris
Differential Revision: https://phabricator.services.mozilla.com/D64522

--HG--
extra : moz-landing-system : lando
2020-03-02 00:40:41 +00:00
Brian Birtles 2f448cd468 Bug 1292001 - Drop TransitionProperty() and ToValue() from ElementPropertyTransition; r=boris
These are no longer needed and they make assumptions about the shape of the
keyframes/properties which are not valid if the keyframes are replaced.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 00:40:17 +00:00
Brian Birtles cace4bbef4 Bug 1292001 - Move transition start value replacing behavior to the CSSTransition; r=boris
This is needed so that later we can make the effect of transitions replaceable.

Note that the test added in this patch will fail without the code changes in
this patch.

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

--HG--
rename : layout/style/test/test_transitions_replacement_on_busy_frame.html => layout/style/test/test_transitions_replacement_with_setKeyframes.html
extra : moz-landing-system : lando
2020-03-02 00:40:05 +00:00
Brian Birtles 5865a0c41b Bug 1292001 - Move transition-timing-function from keyframe easing to effect easing; r=boris
This is yet to be specified although it is already tested in CSS Transitions
WPT. It is also needed in order to produce the expected reversing behavior when
CSSTransition's keyframes are replaced.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 00:36:56 +00:00
Boris Chiou cedb507f58 Bug 1610981 - Drop Maybe<> from KeyframeEffect::mTarget. r=birtles
In order to store the different combinations of (Element, PsuedoStyleType)
pairs, including (nullptr, ::before/::after), we drop Maybe<> and use
OwningAnimationTarget directly.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 20:44:12 +00:00
Emilio Cobos Álvarez 678c18063d Bug 1583203 - Annotate nsINode::OwnerDoc() as MOZ_NONNULL_RETURN. r=smaug
People keep adding useless null-checks and it was not clear what the consensus
was from bug 1441165, but this should be unobjectionable I guess.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 18:12:19 +00:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Brian Birtles 7a10d13a65 Bug 1541767 - Don't post animation restyles when unbinding an element; r=hiro
Currently we avoid posting animation restyles when unbinding an element by
removing the element from the document before deleting its animation
collections. As a result, when canceled animations go to post a restyle, they
can't find a pres context and give up posting a restyle.

However, this is problematic for two reasons:

* It means we can't remove such canceled animations from the
  PendingAnimationTracker if they are present there (i.e. it regresses the fix
  from bug 1223445).

* It means we can't post cancel events for such animations/transitions since we
  can't lookup the appropriate AnimationEventDispatcher.

In the next patch in this series we will change that order to fix the above
problems but before we do that, we need to introduce another mechanism to make
sure that we don't post restyles when unbinding an element or else we will
regress bug 1396041.

This patch does that by introducing a flag which causes us to not post restyles
when we are doing DOM surgery. For all other cases we actually _do_ need to post
restyles in order to update the style correctly.

Without this patch, layout/style/crashtests/1396041.html would fail after
applying the next patch in this series.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 06:49:25 +00:00
Ryan Hunt b936c00a65 Bug 1523969 part 14 - Move method definition inline comments to new line in 'layout/'. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D21115

--HG--
extra : rebase_source : 4d65c07d8822f3a54ac881b5d0f55468ce884554
2019-02-25 16:09:24 -06:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Emilio Cobos Álvarez 15e84a4c1c Bug 1525371 - Kill ComputedStyle::ComputedData. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18733
2019-02-07 11:15:33 +01: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
Sylvestre Ledru 2b4847d320 Bug 1506538 - Remove +x permissions on C++ source files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D11609

--HG--
extra : moz-landing-system : lando
2018-11-13 15:32:08 +00:00
Emilio Cobos Álvarez b3a5d43536 Bug 1505645 - Remove other now useless old style system code. r=hiro
We'd better not be hitting those code paths already :-)

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

--HG--
extra : moz-landing-system : lando
2018-11-08 02:10:58 +00:00
Boris Chiou 04b273259e Bug 1496619 - part 6: Generate StyleTimingFunction and drop ns_timing_function.rs r=emilio,birtles
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use
it in nsTimingFunction, so we could copy it directly without handling
the different memory layout. However, we have to rewrite the
nsTimingFunction and mozilla::ComputedTimingFunction for this.

Second, the rust-bindgen seems cannot generate the correct generic members
from complex C++ templates, especially for the nested template struct,
(https://github.com/rust-lang-nursery/rust-bindgen/issues/1429)
So we have to hide StyleTimingFunction to avoid the compilation errors.

Depends on D9312

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:35 +00:00
Diego Pino Garcia eca2cd1106 Bug 1498948 - Refactor KeyframeEffect constructor to use r-value reference. r=boris 2018-10-16 00:38:00 +03:00
Olli Pettay 57b81277a0 bug 1483963, cache the index of a child node when ordering animations for event dispatch, r=hiro,ehsan
--HG--
extra : rebase_source : f98586625b199e7b2d0eb7db8dc9c1c5235289fe
2018-09-05 00:31:57 +03:00
Daniel Holbert 0878eb4d7e Bug 1483394: Remove unneeded #includes of nsContentUtils.h in /layout. r=TYLin
For each file touched in this patch, the file had an #include for nsContentUtils.h, but no other mentions of the string "nsContentUtils", nor any mention of its "ScriptBlocker"-related types. So these files likely don't need their nsContentUtils.h include anymore, and we can remove it to get a marginal win on build time/complexity.

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

--HG--
extra : moz-landing-system : lando
2018-08-15 07:04:43 +00:00
Emilio Cobos Álvarez 196560b95f Bug 1479681: Fix the loop in nsTransitionManager dealing with stopping `all` transitions. r=hiro a=aryx
The loop was mutating the nsCSSPropertyID used to guard the exit, which is
obviously wrong.

This branch is pretty rarely taken, since people don't usually specify `all` as
a transition property other than the first, for which case we take the fast path
with `checkProperties = false`. Our test-suite failed to catch this.

Added a crashtest that hangs without this patch.

The reason bug 1478990 regressed this is because it changed the order of
nsCSSPropertyID so that `p` actually went backwards causing the infinite loop,
but the bug was introduced (by me, whoops) in bug 1309752.

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

MozReview-Commit-ID: Ii3D1FaZ31R

--HG--
extra : source : 78be4bbf4b050f6614bb9f4115f57fb61f4890df
2018-07-31 11:32:53 +02:00
Emilio Cobos Álvarez 9b504cb749 Bug 1309752: Animate logical properties. r=birtles
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

MozReview-Commit-ID: 9dI20N0LFrk
2018-07-18 12:10:16 +02:00
Hiroyuki Ikezoe 1609fd1ef0 Bug 1472900 - Use timestamp associated with the timeline for animation cancel events. r=birtles
Before this change, the test in this commit fails.  The received events order
is;

 1) cancel
 2) transitioncancel
 3) transitionstart
 4) finish

MozReview-Commit-ID: 8liTFXime6e

--HG--
extra : rebase_source : 3c68ef330b1f263afa2fad9670a30b351b8dbf28
2018-07-05 06:19:12 +09:00
Hiroyuki Ikezoe 067150dbd6 Bug 1472900 - Rename mTimeStamp in AnimationEventInfo to mScheduledEventTimeStamp. r=birtles
It matches the name in the spec.
https://drafts.csswg.org/web-animations/#scheduled-event-time

MozReview-Commit-ID: EKoUNRfTVMJ

--HG--
extra : rebase_source : 83a5ee36d5df98273e26789733df69800d115b34
2018-07-05 06:13:18 +09:00
Hiroyuki Ikezoe b5935f0573 Bug 1354501 - Bail out if we know there is no need to dispatch any animation events in advance of checking which animation event we need. r=birtles
MozReview-Commit-ID: JhOs0CD49R

--HG--
extra : rebase_source : dd4c779ed23eb4f728192fdc27536f4409de2c55
2018-07-03 11:06:46 +09:00
Hiroyuki Ikezoe 1c47aa1edf Bug 1354501 - Factor out calculations for interval start/end times. r=birtles
MozReview-Commit-ID: H9iXX9VLXLr

--HG--
extra : rebase_source : 736d304858cd0a2c5953f9986dd161ebd21c8099
2018-07-03 09:25:02 +09: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
Xidorn Quan 1f1e9d6d8f Bug 1418874 part 4 - Remove nsCSSScanner. r=emilio
MozReview-Commit-ID: 9sgOd243771

--HG--
extra : rebase_source : 2ade7be1065920d0fd1f5565bdfae799306a8110
2018-06-14 20:13:44 -07:00
Dorel Luca 535f1df913 Merge mozilla-central to mozilla-inbound 2018-06-04 21:48:29 +03:00
Emilio Cobos Álvarez 552c62240b Bug 1419695: Allow transitioning chrome-only properties, as long as they're specified as a longhand. r=xidorn
MozReview-Commit-ID: 4hQfYbhxeq7
2018-06-04 15:55:51 +02:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Emilio Cobos Álvarez 3a031c33a3 Bug 1461070: Skip starting other transitions based on specified, not already-started transitions. r=birtles,dbaron
MozReview-Commit-ID: 3D5elrj2Ypi
2018-05-18 17:21:16 +02:00
Brian Birtles f8c518344a Bug 1456394 - Rename AnimationEffectReadOnly to AnimationEffect; r=bz,hiro
MozReview-Commit-ID: 8jzJiCWt5vs

--HG--
rename : dom/animation/AnimationEffectReadOnly.cpp => dom/animation/AnimationEffect.cpp
rename : dom/animation/AnimationEffectReadOnly.h => dom/animation/AnimationEffect.h
rename : dom/webidl/AnimationEffectReadOnly.webidl => dom/webidl/AnimationEffect.webidl
extra : rebase_source : 2bd6490fe9be47cfb760bda81a63c33ba0b0397d
2018-05-07 11:15:16 +09:00