Commit Graph

3790 Commits

Author SHA1 Message Date
L. David Baron
a2f97c232b Bug 978712 - Prevent non-running transitions and animations (animations or transitions during their delay period, and animations after they finish) from repeatedly poking layer activity because we think we can run them on the compositor. r=heycam
This changes the behavior of the CanPerformOnCompositorThread methods of
both ElementAnimations and ElementTransitions to check that the
respective animations or transitions are actually running.  This is ok
because:
 - The main caller is nsLayoutUtils::HasAnimationsForCompositor, and all
   of its callers pretty clearly want the more restricted behavior (they're
   concerned with layer activity)
 - The only other callers of these functions are
   nsAnimationManager::FlushAnimations and
   nsTransitionManager::FlushTransitions (determining when to do
   throttling), nsAnimationManager::GetAnimationsForCompositor (whose
   only caller,
   nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer, also checks
   IsRunningAt).  I think these also all want or are fine with having
   the IsRunningAt check.

As to the actual changes:
 - In the animation manager, I think it's a mistake that
   ElementAnimation::IsRunningAt didn't already check
   mIterationDuration, since we throw out animations with a bad
   iteration-duration in ElementAnimations::EnsureStyleRuleFor.  So this
   makes that change as well.
 - In the transition manager, IsRunningAt already checks
   !IsRemovedSentinel().

I've confirmed in gdb on a device that this fixes the repeated
nsIFrame::SchedulePaint calls that were the symptom of this bug.

I believe this patch also makes it so that a short animation of a
property that can't be animated on the compositor doesn't prevent the
entire duration of the animation of a property that can from being
throttled (having the main thread style updates suppressed).
2014-03-06 22:08:57 -08:00
Vaibhav Agarwal
b192b2603d Bug 971132 - B2G mochitests should use the new manifest format; r=jmaher 2014-03-06 13:42:43 -05:00
Ryan VanderMeulen
eccc1b69c8 Backed out changesets d65a803d2b9a, 9456495d6121, and 73c710ddf3d8 (bug 977757) for Gaia UI test failures.
CLOSED TREE
2014-03-06 13:10:20 -05:00
Benoit Jacob
bb9ddf27a6 Bug 977757 - 3/3 - Expose CSS_PROPERTY_ALWAYS_ENABLED_IN_CHROME_OR_CERTIFIED_APP properties in JS bindings as needed - r=bz 2014-03-06 11:38:21 -05:00
Benoit Jacob
5af2dfb560 Bug 977757 - 2/3 - add nsCSSProps::eEnabledInChromeOrCertifiedApp bit, and use it for will-change - r=dbaron,bz 2014-03-06 11:38:19 -05:00
Benoit Jacob
39560c498f Bug 977757 - 1/3 - make nsCSSProps::EnabledState a bitfield - r=dbaron,bz 2014-03-06 11:38:17 -05:00
Mats Palmgren
079b02433f Bug 971955 - Make overflow-clip-box:content-box the default for all <input> @type values except type=file/button/reset/submit. r=roc 2014-03-06 10:03:38 +00:00
Simon Sapin
ee55ba56ec (no bug) Add labels to the various is() checks in test_initial_storage.html, to aid in diagnosing test-failures. r=dholbert 2014-03-05 16:53:08 -08:00
L. David Baron
b109d5c930 Bug 979557: CanAnimatePropertyOnCompositor should return early when there's no OMT compositing, whether or not logging is enabled. r=dzbarsky
This shouldn't behave differently depending on whether or not logging is
enabled; that difference was introduced in bug 785648.
2014-03-04 20:13:22 -08:00
L. David Baron
c9ae86a635 Bug 828173 patch 6: Remove calls to ForceLayerRerendering from the miniflush code (UpdateThrottledStyles, which flushes animations whose main thread updates are throttled without updating any other styles). r=mattwoodrow
I've been wanting to remove this code for a while.  I think this code is
problematic for three reasons:

 (1) It's in the middle of code where it doesn't belong, and which ought
     to be handling purely-style-system things.  (This is blocking me
     from reusing that code elsewhere, e.g., in bug 977991 and
     bug 960465, both of which could use it in some form.)

 (2) It defeats the optimization from bug 790505 whenever we do a
     miniflush (in other words, whenever we have any style change,
     whether or not it's related)

 (3) It means the conditions for when we decide to ship a new set of
     animation data to a layer doesn't cover all the cases the layer
     needs it.  In particular, we only run this miniflush code when we
     have a currently running animation or transition that's running on
     the compositor thread.  On the other hand, the UpdateTransformLayer
     style change handling in DoApplyRenderingChangeToTree depends on
     whether the frame currently has a transform layer, which can
     continue to be true for a bit after the animation stops.  So if we
     need to send animations to the layer because of a transform style
     change that happens soon after an animation completes, our style
     change handling will find the existing layer and call its
     SetBaseTransformForNextTransaction method but never do anything
     that triggers layer construction.  The style throttling code, in
     turn, will never stop doing main thread updates because the
     animation generation on the layer is out-of-date, and these main
     thread updates will keep the layer active, but they'll never show
     up because the stale animation data overrides the new transform
     that we've been setting.  (At least, I think that's what was
     happening; it makes sense to me and matches the behavior I was
     observing.  I didn't verify which main thread updates and which
     layer updates were actually happening, though.)

     This shows up, for example, in the animation in attachment 8384813
     just halting at a corner if I'm careful not to disturb it.  (I'm
     testing on Linux, with both accelerated layers and OMT animations
     explicitly enabled.)

I think there are probably some other things that can be removed as
followups to removing this code, because I think we made some boundary
conditions intentionally incorrect so that problem (3) above wouldn't be
as bad as it otherwise would have been.
2014-03-04 20:13:22 -08:00
L. David Baron
ef65031de5 Bug 978903: Fix some uninitialized variable warnings in the CSS parser. r=heycam
The first provides a reasonable default (failure to parse) for the case
of an unknown value type (which should never happen).

The second reorders two failure checks so that the one that returns
early when units is uninitialized happens before the one that looks at
units.
2014-03-04 20:13:20 -08:00
L. David Baron
537d857ff5 Bug 978648: Handle dynamic changes to @keyframes rules and keyframe rules better. r=heycam 2014-03-04 20:13:20 -08:00
Mihaela Velimiroviciu
6cead5f1b3 Bug 959973 - Add tests for using variables in external style sheets. r=heycam,ted 2014-03-05 12:29:44 +11:00
Brian Birtles
1b317920a5 Bug 972199 part 3 - Fix comment in ElementAnimations::GetPositionInIteration; r=nrc
Make comment reflect current parameter names.
2014-03-05 10:19:16 +09:00
Brian Birtles
a863a20459 Bug 972199 part 2 - Add a crashtest for restoring the refresh driver after an advance; r=nrc
In this crash test we restore the refresh driver after manually advancing it.
This causes a situation where a layer has an animation that has yet to start.

Prior to modifying ElementAnimations::GetPositionIteration this test case would
trip an assertion there that rejected negative elapsed times when called from
the compositor thread.
2014-03-05 10:19:15 +09:00
Mats Palmgren
5bd85e6c56 Bug 978443 - Rename NS_STYLE_CLEAR_LEFT_AND_RIGHT to NS_STYLE_CLEAR_BOTH. r=dholbert
Rename NS_STYLE_CLEAR_LEFT_AND_RIGHT to NS_STYLE_CLEAR_BOTH.  Also fix whitespace and remove unnecessary parens in a few places and enumerate the possible break types in an assertion so that it doesn't make assumptions on the actual property values.
2014-03-02 17:42:16 +00:00
Mats Palmgren
42841bae56 Bug 513110 - Adjust the maximum break type (only used in assertions) to reflect reality. r=dholbert 2014-03-01 10:36:39 +00:00
L. David Baron
9f6268fc48 Add bug number (bug 828173) to FIXME comment.
DONTBUILD.
2014-02-28 17:14:31 -08:00
Reuben Morais
b672cdc604 Bug 458300 - Rename nsINameSpaceManager.h to nsNameSpaceManager.h. r=jst r=hsivonen
--HG--
rename : content/base/public/nsINameSpaceManager.h => content/base/public/nsNameSpaceManager.h
2014-02-27 20:04:46 -03:00
Benoit Jacob
091f9d7026 Bug 975769 - Avoid asserting on a eCSSProperty_UNKNOWN - r=dbaron 2014-02-27 15:09:02 -05:00
Andrew McCreight
c479f2a541 Bug 962608 - Make PL_DHashTableInit infallible by default. r=briansmith,bsmedberg,ehsan,froydnj,jduell,jfkthame,roc,smaug 2014-02-27 10:04:09 -08:00
stefanh@inbox.com
0d496326a6 Bug 970079 - Native theming for MacOS X help buttons, widget part. r=mstange, roc. 2014-02-27 18:12:16 +01:00
Simon Sapin
818727a691 Bug 975501 part 2: Add display:{inline-,}grid behind a pref, and a stub nsGridContainerFrame. r=dholbert 2014-02-26 23:45:29 -08:00
Simon Sapin
3b9a3f4ac0 Bug 975501 part 1: Add a XUL prefix to existing internal GRID constants. r=dholbert 2014-02-26 23:43:18 -08:00
L. David Baron
947e9a9b1a Bug 977248: Remove quirk.css rule that selects on an attribute that was only set by the old HTML parser. r=mrbkap 2014-02-26 23:00:13 -08:00
Matt Woodrow
5d58c059d9 Bug 968555 - Don't create a stacking context for backface-visibility:hidden. r=dbaron 2014-02-27 15:57:45 +13:00
Ryan VanderMeulen
d3dfcaea0e Merge m-c to inbound. 2014-02-26 16:42:16 -05:00
L. David Baron
dfb9ad9186 Bug 976350 patch 1: Move the contents of nsTraceRefcnt.h into nsISupportsImpl.h. r=bsmedberg
This makes sense since the file no longer contains anything with the
nsTraceRefcnt name in it, and it will allow renaming nsTraceRefcntImpl
back to nsTraceRefcnt.
2014-02-26 13:36:35 -08:00
Ryan VanderMeulen
cacbbe57fc Merge inbound to m-c. 2014-02-26 16:16:11 -05:00
Daniel Holbert
9122c51c50 (no bug) insert space before paren in 'switch(' and 'while(' in nsRuleNode.cpp. whitespace-only, no review, DONTBUILD 2014-02-26 11:10:50 -08:00
Jonathan Watt
57960e5d91 Bug 974430 - Put the |input[type=number]| rule in forms.css into a separate sheet so we can make it respect the dom.forms.number pref. r=dbaron
--HG--
extra : rebase_source : 450ffd1ca743868d75dda6ce0f89078216934e79
2014-02-26 12:26:14 +00:00
Ted Mielczarek
062d40049c Bug 975455 - Move more Mochitests to manifests. r=jmaher 2014-02-20 10:14:52 -05:00
Horia Iosif Olaru
560bff2f18 Bug 970348 - Add background-blend-mode reftests corresponding to the csswg test plan. r=roc, r=heycam
* 5.3.1: Blending between the background layers and the background color for an element with background-blend-mode. Most of section 5.3.1 is covered by other tests. Add the missing tests of the 5.3.1 section of the test plan.
- Test 9: SVG image and background color (SVG as data:uri)
- Test 10: Animated gif image and background color
- Test 12: background-blend-mode on element with 3D transform

* 5.3.2: Background layers do not blend with content outside the background (or behind the element).
- Implementation of tests 2 and 3. Test 1 is already covered by background-blending-isolation.html.

* 5.3.6: background-blend-mode for an element with background-position

* 5.3.7: background-blend-mode for an element with background-size

* 5.3.8: background-blend-mode for an element with background-repeat

* 5.3.9: background-blend-mode for an element with background-clip

* 5.3.10: background-blend-mode for an element with background-origin

* 5.3.11: background-blend-mode for an element with background-attachement

* Add extra tests for the background-blend-mode CSS property: Add some invalid values to the background-blend-mode property definition so that it can benefit from existing invalid property tests.
2014-02-25 08:40:54 -05:00
William Chen
6c1fe0c5a8 Bug 973321 - Prevent int overflow in border image width calculation. r=dbaron 2014-02-18 14:14:31 -08:00
L. David Baron
710cc29e88 Bug 975741: Store the initial value of 'perspective' as 'none' rather than the (invalid value) '0' to make storage of 'none' consistent, and remove workaround from nsComputedDOMStyle computed value implementation. r=heycam 2014-02-24 15:27:53 -08:00
Arnaud Sourioux
94fd6d0fd6 Bug 974687 - Part 1: Add about 300 MOZ_OVERRIDE in layout/. r=dholbert 2014-02-24 09:41:56 -05:00
Rick Eyre
2dedf9f7cc Bug 865407 - Part 9: Remove border-box and padding CSS on the caption overlay. r=rillian
This wasn't working correctly. Vtt.js now takes care of applying padding
to the video overlay.
2014-02-21 22:14:22 -05:00
Mats Palmgren
3b03dccc65 Bug 965237 - Make overflow-clip-box:content-box be the default for <input type=text/password/number> and <textarea>. r=roc 2014-02-22 01:18:24 +00:00
Mats Palmgren
531a7f43aa Bug 966992 - Implement the overflow-clip-box property in the style system. r=cam 2014-02-22 01:18:23 +00:00
Mats Palmgren
b3dd01b923 Bug 966992 - Add a CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS bit for properties that are enabled by a pref but that are always enabled in UA sheets. r=cam 2014-02-22 01:18:23 +00:00
Benoit Girard
85ef318061 Bug 964885 - Implement stacking context behavior of CSS will-change. r=dbaron
--HG--
extra : rebase_source : 9417239e40a13df22c207838faf64b67d9027f6e
2014-02-05 23:50:22 -05:00
Ehsan Akhgari
0c756d118f Backed out 5 changesets (bug 966992, bug 965237) because of a PGO only build failure on Linux, landed on a CLOSED TREE
Backed out changeset f11cad93ceee (bug 966992)
Backed out changeset c84d530c9a51 (bug 965237)
Backed out changeset 740b13866bac (bug 966992)
Backed out changeset 8c3420cc77d8 (bug 966992)
Backed out changeset 7ddfc587edda (bug 966992)
2014-02-19 13:28:33 -05:00
Mats Palmgren
d21237b53b Bug 965237 - Make overflow-clip-box:content-box be the default for <input type=text/password/number> and <textarea>. r=roc 2014-02-19 14:14:53 +00:00
Mats Palmgren
cf8fad51d8 Bug 966992 - Implement the overflow-clip-box property in the style system. r=cam 2014-02-19 14:14:52 +00:00
Mats Palmgren
4c31b88289 Bug 966992 - Add a CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS bit for properties that are enabled by a pref but that are always enabled in UA sheets. r=cam 2014-02-19 14:14:52 +00:00
Jonathan Watt
781eb8d055 Bug 932410 - Implement the focus ring for -moz-appearance:none styled <input type=range> in a different way so that content authors can change/remove it. r=bz 2014-02-18 23:35:07 +00:00
Jonathan Watt
6a6d2569a9 Bug 973344 - Remove workaround introduced by bug 947718 now that bug 946184 is fixed, especially since it causes crashes with the dom.forms.number pref disabled. r=ehsan 2014-02-17 20:06:45 +00:00
L. David Baron
b3bff6bf01 Bug 709014 patch 1: Honor margin-left and margin-right on elements in inline layout that have 0 width and/or height (commonly, inline-blocks). r=roc
Prior to this patch, we failed to honor:
 * margin-left on elements in inline layout with 0 width and 0 height
 * margin-right on elements in inline layout with 0 width
I think that was because the code in CanPlaceFrame to discard both
margins when the width was 0 was running after the left-margin was
applied, unless the later code in PlaceFrame (checking both width 0 and
height 0) un-applied that left margin.

The assertion count change in test_value_computation.html is due to 2
additional "bad width" assertions (I presume from honoring large
margins that were previously ignored).

The change to 538935-1-ref.html is to match an improvement in rendering
of the margins in the test, where both sides of the margin are now
honored.

The change to layout/reftests/text-overflow/marker-basic-ref.html is to
keep the reference (which uses margins) rendering the same way following
the changes to margin handling.

The new behavior (in the reftests added in layout/reftests/inline/)
matches at least Chromium; I didn't check any other browsers.
2014-02-17 20:07:45 -08:00
Maks Naumov
0593330a35 Bug 973187: Fix typo (checking mRadiusX twice and not checking mRadiusY) in nsStyleGradient::HasCalc(). r=dbaron 2014-02-16 16:05:10 -08:00
Daniel Holbert
589a38012f Bug 969460 part 3: regression tests for "display:flex" on root node. r=bz 2014-02-15 10:43:11 -08:00