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

169 Коммитов

Автор SHA1 Сообщение Дата
Robert Longson dafe7ccae9 Bug 1067375 - Fix animateTransform in svg-as-image to invalidate properly. r=jwatt 2014-10-12 08:49:34 +01:00
L. David Baron 33003bece1 Bug 1047928 patch 5 - Pass restyle hint to RestyleManager::PostRebuildAllStyleDataEvent. r=bzbarsky
This patch is not intended to contain any changes in behavior.
2014-10-08 14:27:02 -07:00
L. David Baron acfd59047e Bug 1047928 patch 2 - Pass restyle hint to RestyleManager::RebuildAllStyleData. r=bzbarsky
This patch is not intended to contain any changes in behavior.
2014-10-08 14:26:57 -07:00
L. David Baron 57d0c0d658 Bug 1077849 - Use eRestyle_ForceDescendants for all cases of rebuilding the rule tree. r=heycam
Bug 931668 added the eRestyle_ForceDescendants case for all cases that
go through RebuildAllStyleData, but there is another case that calls
DoRebuildAllStyleData directly, and we should cover that too.

This is needed because when we're rebuilding the rule tree, we need to
create new style contexts for all frames.

I don't know of any bugs caused by this, but it seems worth fixing.
2014-10-04 16:59:47 -07:00
L. David Baron f8fdaf03f2 Bug 1075137 patch 7 - Remove old IsProcessingRestyles and IsProcessingAnimationStyleChange booleans. r=birtles 2014-10-02 21:53:24 -07:00
L. David Baron 313d94e669 Bug 1075137 patch 5 - Add new boolean to RestyleManager for whether we're currently processing animation restyles. r=birtles
This is just moving one bit of data from the pres context without any
logic change.  But given the other refactoring, it seems to make more
sense here now.
2014-10-02 21:53:24 -07:00
L. David Baron cafe8a4951 Bug 1075137 patch 2 - Add new booleans for whether to skip animation styles and whether to post animation restyles. r=birtles 2014-10-02 21:53:23 -07:00
L. David Baron dcaec160c5 Bug 1075137 patch 1 - Convert one use of IsProcessingRestyles that doesn't follow normal pattern to a debug-only member on the restyle manager. r=birtles 2014-10-02 21:53:23 -07:00
L. David Baron a1236de6d5 Bug 1074634 - Don't overwrite eRestyleResult_ContinueAndForceDescendants with eRestyleResult_Continue. r=heycam 2014-10-02 21:53:22 -07:00
Cameron McCormack c3dee3558d Bug 1072724 - Support showing more information about style structs in restyle logs. r=dbaron
The MOZ_DEBUG_RESTYLE_STRUCTS environment variable can be set to a comma-
separated list of style struct names.  When restyle logging is enabled,
this will cause the style context tree -- showing cached style struct
pointers for those structs specified -- to be logged before each
individual restyle is processed.  It will also show the struct pointer
values involved when swapping structs between style contexts.

For example, set MOZ_DEBUG_RESTYLE_STRUCTS=Font,UserInterface to show
the cached nsStyleFont and nsStyleUserInterface pointers on the style
contexts involved in the restyle process.
2014-10-01 09:13:57 +10:00
Cameron McCormack 8ffb3014ac Bug 1072130 - Don't swap structs when we're reusing a style context from a previous same-style continuation. r=dbaron 2014-09-25 15:51:43 +10:00
Cameron McCormack f5e6faa47e Bug 979133 - Add facility to log the restyle process. r=dbaron
Set the MOZ_DEBUG_RESTYLE environment variable and every restyle will have
detailed logging printed to stderr. By default, restyles for animations are
not logged; you can include them by also setting MOZ_DEBUG_RESTYLE_ANIMATIONS.

If you wish to limit restyle logging to a particular change, you can call
nsPresContext::StartRestyleLogging() and nsPresContext::StopRestyleLogging()
at appropriate points. (You might want to add a couple of helper methods
temporarily on nsIDocument and then expose them to your page with Web IDL
to make them easier to call.) You do not need to have set MOZ_DEBUG_RESTYLE
for this to work.
2014-09-25 15:45:36 +10:00
Cameron McCormack 0770269478 Back out bug 1045895 for causing bug 1070759. 2014-09-25 15:30:18 +10:00
Phil Ringnalda 340fd10e38 Back out c0c410aed86f (bug 979133) for -wError bustage
CLOSED TREE
2014-09-24 21:06:22 -07:00
Cameron McCormack 2a28d6d5eb Bug 979133 - Add facility to log the restyle process. r=dbaron
Set the MOZ_DEBUG_RESTYLE environment variable and every restyle will have
detailed logging printed to stderr.  By default, restyles for animations are
not logged; you can include them by also setting MOZ_DEBUG_RESTYLE_ANIMATIONS.

If you wish to limit restyle logging to a particular change, you can call
nsPresContext::StartRestyleLogging() and nsPresContext::StopRestyleLogging()
at appropriate points.  (You might want to add a couple of helper methods
temporarily on nsIDocument and then expose them to your page with Web IDL
to make them easier to call.)  You do not need to have set MOZ_DEBUG_RESTYLE
for this to work.
2014-09-25 13:13:14 +10:00
Alexander Surkov d205486a00 Bug 1040735 - DOM node reinsertion under anonymous content may trigger a11y child adoption, r=bz, tbdaunde, davidb 2014-09-19 20:02:30 -04:00
Cameron McCormack 9e08b4d248 Bug 1041512 - Mark intrinsic widths dirty on a style change even if the frame hasn't had its first reflow yet. r=dbaron 2014-09-17 10:40:11 +10:00
Cameron McCormack 81ed1e8fa4 Bug 1045895 - Pass out provider frame from RestyleSelf to avoid calling GetParentStyleContextFrame again. r=dbaron 2014-09-10 14:42:03 +10:00
L. David Baron 0b5209fe1d Bug 977991 patch 4 - Ensure we don't try to use the style attribute optimization on pseudo-elements. r=birtles
This is needed because patch 1 and patch 3 did not add a mechanism that
allows restyling pseudo-elements, which would be substantially more work
and very little use (since the only case in which they have style
attributes is for our internal use on the ::-moz-color-swatch
pseudo-element).

RestyleUndisplayedChildren does not need the same fix because it's only
used on elements, and never on pseudo-elements or anonymous boxes.
2014-09-13 06:17:36 -07:00
Cameron McCormack 90dc98cfbe Bug 931668 - Part 24: Avoid copying RestyleData::mDescendants when modifying an existing entry. r=dbaron
--HG--
extra : rebase_source : 0b9905bdff6f9ceec823b2091aadc39f0ca467bc
2014-09-05 13:48:48 +10:00
Cameron McCormack a60c564803 Bug 931668 - Part 22: Clear cached structs on descendants of an old style context that had structs swapped, if it is staying around. r=dbaron
--HG--
extra : rebase_source : aa23c06a20214c72d971ab059ef4833846c769fb
2014-09-05 13:48:47 +10:00
Cameron McCormack d32c1d2bfc Bug 931668 - Part 21: Fix issue where not all pending-restyle descendants are restyled. r=dbaron
--HG--
extra : rebase_source : 824fe576885ec4f5ab086499dfaa6e95456afd50
2014-09-05 13:48:47 +10:00
Cameron McCormack 7f9178272f Bug 931668 - Part 20.2: Don't call AssertStructsNotUsedElsewhere on style contexts for :before/:after frames that are going away. r=dbaron
--HG--
extra : rebase_source : 7ff96443db553d564897d42870b81e10c2a78b53
2014-09-05 13:48:47 +10:00
Cameron McCormack 6c1e5df71c Bug 931668 - Part 20.1: Keep old structs on new style contexts, for those that are equal. r=dbaron
We don't do struct swapping if either the old or new style contexts are
shared, since we can't guarantee that such a change will be valid for
all frames that use the shared style context.

--HG--
extra : rebase_source : 10f7c90422de23b119287ba478d36433423440da
2014-09-05 13:48:46 +10:00
Cameron McCormack 99097814d6 Bug 931668 - Part 20: Stop the recursive restyling process when we detect it is safe to do so. r=dbaron
--HG--
extra : rebase_source : 33eba29b1ef05b72c671dcc61d6a997ad492ceb1
2014-09-05 13:48:46 +10:00
Cameron McCormack 391b7d8d02 Bug 931668 - Part 19: Make RebuildAllStyleData use eRestyle_ForceDescendants so that it does rebuild the whole style tree. r=dbaron
--HG--
extra : rebase_source : 874f6c186d649c209235261f933e7ebd2853f294
2014-09-05 13:48:46 +10:00
Cameron McCormack 7130a6b300 Bug 931668 - Part 17: Handle eRestyleResult_Stop by moving a frame's style context to its new parent. r=dbaron
--HG--
extra : rebase_source : 50c6575821407b548ac0b805fa7f351e5ddbda53
2014-09-05 13:48:46 +10:00
Cameron McCormack 0c2afd3177 Bug 931668 - Part 16: Give ElementRestyler::RestyleSelf a return value that indicates how restyling should proceed. r=dbaron
--HG--
extra : rebase_source : e9bcb021f40bef402b7bcb00a097d18efa4a813b
2014-09-05 13:48:45 +10:00
Cameron McCormack 55da6bb01e Bug 931668 - Part 15: Pass equal struct bitfield back out of ElementRestyler::CaptureChange. r=dbaron
--HG--
extra : rebase_source : 70d70eeab3989a7991ae2a2abdeb21c0745b0398
2014-09-05 13:48:45 +10:00
Cameron McCormack 1e6847a108 Bug 931668 - Part 11: Add eRestyle_Force (and eRestyle_ForceDescendants) restyle hints to control whether the frame (and all of its descendants) must be assigned its new style context even if it had the same style data as the old style context. r=dbaron
--HG--
extra : rebase_source : f92a5b5033bb4cf424ee172611a58fe583aed87f
2014-09-05 13:48:45 +10:00
Cameron McCormack 5cf22e3dc6 Bug 931668 - Part 9 (no part 8): Make nsStyleContext::CalcStyleDifference compare all structs and return a bitfield of which changed. r=dbaron
--HG--
extra : rebase_source : 817e73531548183645c94ece67ad6a87c5de36c6
2014-09-05 13:48:44 +10:00
L. David Baron 7465178016 Bug 1057129 patch 3 - Post restyles from CheckAnimationRule directly to pseudo-elements. r=birtles
This matches patch 2, and also fixes an incorrect use of eRestyle_Self
on the parents of pseudo-elements in order to restyle those
pseudo-elements, where it would not previously have been effective.

This should all be temporary, since this code can go away with bug
960465, when animation phases are removed.
2014-08-24 21:48:22 -07:00
L. David Baron f96287c656 Bug 1057098 - Rename ElementRestyler::Restyle{Before,After}Pseudo to MaybeReframeFor{Before,After}Pseudo. r=bzbarsky 2014-08-24 21:48:21 -07:00
L. David Baron e425638f17 Bug 625289 patch 7 - Expose TryStartingTransition. r=heycam 2014-08-13 15:39:01 -07:00
L. David Baron 86de53b549 Bug 625289 patch 5 - Create a ReframingStyleContexts struct during restyling. r=heycam 2014-08-13 15:39:01 -07:00
L. David Baron c978ecaab8 Bug 625289 patch 4 - Add member variable to restyle manager for currently reframing style contexts. r=heycam 2014-08-13 15:39:01 -07:00
L. David Baron 8aa5af235c Bug 625289 patch 2 - Create wrapper function around the only calling pattern of ComputeStyleChangeFor. r=heycam 2014-08-13 15:39:00 -07:00
L. David Baron 9b2d455ea1 Bug 625289 patch 1 - Add comment about dependence on synchronous frame reconstruction. r=heycam 2014-08-13 15:39:00 -07:00
L. David Baron 79e9b7336f Bug 996796 patch 24 - Use a RestyleTracker for the coalescing in the animation-only style flush (miniflush). r=heycam
This changes the coalescing behavior during the animation-only style
flush by doing tree-based coalescing between the style updates required
by animations and those required by transitions, rather than doing
animations and transitions separately.

Note that both the old and the new code update all
animating/transitioning styles rather than only the throttled styles,
though we should fix that eventually as noted in the FIXME comment in
the code (but only for the existing caller, and not for the new one to
be introduced in bug 960465).

Note that this depends for its correctness on the previous patches to
make the restyling process exact.

The test changes are because the effects of bug 1031688 are changed by
the change in coalescing.  In the old code, we updated transition styles
before animation styles; in the new code we do a single pass over the
tree, which for the relevant test means updating animations on the
parent before transitions on the child, which changes the effects of the
bug.
2014-08-06 22:58:44 -07:00
L. David Baron 3f05e60f5c Bug 996796 patch 23 - Make transition manager ignore StyleContextChanged notifications during an animation-only style update. r=heycam
This will be necessary when we use the restyle tracker for the
animation-only style flush.
2014-08-06 22:58:44 -07:00
L. David Baron 90d4d003d2 Bug 996796 patch 22 - Make restyling exact - only call RestyleBeforePseudo and RestyleAfterPseudo when we have an eRestyle_Subtree hint. r=heycam 2014-08-03 13:11:55 -07:00
L. David Baron 638868ad96 Bug 996796 patch 21 - Make restyling exact - Only call MaybeRecreateFramesForElement when we have a nonzero restyle hint. r=heycam 2014-08-03 13:11:55 -07:00
L. David Baron 9c23ec99b9 Bug 996796 patch 20 - Make restyling exact - Avoid rerunning selector matching on everything when the basis of rem units changes. r=heycam 2014-08-03 13:11:55 -07:00
L. David Baron 1f200c6e83 Bug 996796 patch 19 - Avoid reresolution for extra style contexts when the restyle hint is not eRestyle_Self or eRestyle_Subtree. r=heycam
This is part of making reresolution not touch style that it was not
asked to touch, so that we can use it for the animation-only restyle.
2014-08-03 13:11:55 -07:00
L. David Baron f7374aad6e Bug 996796 patch 18 - Fix RestyleTracker to handle restyle hints exactly rather than pessimistically when restyling continuations with varying styles (e.g., spans inside ::first-line or ::first-letter). r=heycam
This will be necessary when we use the restyle tracker for the
animation-only style flush, because animation-only style flushes need to
update *only* the animation style data and no other style data.  Thus
using the RestyleTracker for animation-only style flushes requires that
we do this.
2014-08-03 13:11:55 -07:00
L. David Baron a39da5881c Back out bug 996796 patch 18 through patch 25 (changesets fbe97c2db729 through 9719c08c3144) to fix 50%-of-the-time Android 4.0 debug orange from single assertion ("Why did this not get handled while processing mRestyleRoots?", layout/base/RestyleTracker.cpp, line 87) in gfx/tests/crashtests/815489.html . 2014-08-03 01:22:07 -07:00
L. David Baron 3fc788efdb Bug 996796 patch 24 - Use a RestyleTracker for the coalescing in the animation-only style flush (miniflush). r=heycam
This changes the coalescing behavior during the animation-only style
flush by doing tree-based coalescing between the style updates required
by animations and those required by transitions, rather than doing
animations and transitions separately.

Note that both the old and the new code update all
animating/transitioning styles rather than only the throttled styles,
though we should fix that eventually as noted in the FIXME comment in
the code (but only for the existing caller, and not for the new one to
be introduced in bug 960465).

Note that this depends for its correctness on the previous patches to
make the restyling process exact.

The test changes are because the effects of bug 1031688 are changed by
the change in coalescing.  In the old code, we updated transition styles
before animation styles; in the new code we do a single pass over the
tree, which for the relevant test means updating animations on the
parent before transitions on the child, which changes the effects of the
bug.
2014-08-02 19:37:49 -07:00
L. David Baron 986f645557 Bug 996796 patch 23 - Make transition manager ignore StyleContextChanged notifications during an animation-only style update. r=heycam
This will be necessary when we use the restyle tracker for the
animation-only style flush.
2014-08-02 19:37:48 -07:00
L. David Baron e7c9303e63 Bug 996796 patch 22 - Make restyling exact - only call RestyleBeforePseudo and RestyleAfterPseudo when we have an eRestyle_Subtree hint. r=heycam 2014-08-02 19:37:48 -07:00
L. David Baron 8aa0a176e2 Bug 996796 patch 21 - Make restyling exact - Only call MaybeRecreateFramesForElement when we have a nonzero restyle hint. r=heycam 2014-08-02 19:37:48 -07:00