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

87 Коммитов

Автор SHA1 Сообщение Дата
L. David Baron 4eedf5bf60 Bug 960465 patch 2 - Add method to return a modified version of a style context, with all or part of the animation data removed. r=birtles
This is used in patch 3.
2015-02-17 11:15:01 +13:00
L. David Baron c90d6e2a33 Bug 1110277 patch 7 - Call CreateNeededFrames from ~ReframingStyleContexts. r=bzbarsky
I don't have any tests that exercise this code, and I can't even find a
codepath that demonstrates that it's needed, since the lazy
reconstruction that happens during style-triggered frame reconstruction
all appears to go through PostRestyleEvent rather than
MaybeConstructLazily.

But I think we should either do this or add an assertion that it's not
needed, and given that it's one line, it seems like we may as well just
do it.  (Note also that we're currently calling CreateNeededFrames at
the start of style reresolution, in
RestyleManager::ProcessPendingRestyles; this adds a call at the end.)
2015-01-13 21:03:13 -08:00
L. David Baron 6a6e77a8d9 Bug 1110277 patch 5 - Move the AutoRestore into ReframingStyleContexts. r=heycam
This is just a little cleanup that follows from patch 4.
2015-01-13 21:03:13 -08:00
L. David Baron c85cb4876e Bug 1110277 patch 4 - Add a RestyleManager member to ReframingStyleContexts. r=heycam
This is needed for patch 7.
2015-01-13 21:03:13 -08:00
L. David Baron 20ed69a9ae Bug 1115812 patch 16 - Remove the now-unused DoRebuildAllStyleData. r=heycam 2015-01-13 21:03:12 -08:00
L. David Baron b8e6ffef57 Bug 1115812 patch 11 - Move the beginning part of the rebuild-all process to StartRebuildAllStyleData. r=heycam
Here we call StartRebuildAllStyleData from BeginProcessingRestyles (much
like patch 9 and EndProcessingRestyles).  But we will later also call it
from the code that handles a root element font size change when we have
'rem' units.  That's because it's fine to *start* the rebuild process in
the middle of processing the queue of pending restyles.  (We have to end
after the whole process is done, though, in order to avoid wanting to
destroy the old rule tree while we still have style contexts referencing
it.)

We only call StartRebuildAllStyleData in this case when we're processing
our primary restyle queue (mPendingRestyles), not the animation restyles
(to be removed in bug 960465) or the animation-only restyles, since a
rebuild-all should be processed (in terms of animation phases, or in
terms of having an animation-only update before it) like a normal
restyle.  (This isn't true for the 'rem' unit restyle, which could
happen during any sort of update.)
2015-01-13 21:03:12 -08:00
L. David Baron 9d5b480b41 Bug 1115812 patch 10 - Add RestyleTracker parameter to BeginProcessingRestyles. r=heycam
This is needed in patch 11.
2015-01-13 21:03:12 -08:00
L. David Baron 9815b54790 Bug 1115812 patch 9 - Move the end part of the rebuild-all process to RestyleManager::EndProcessingRestyles. r=heycam
This moves the code that finishes the rebuild-all process into
EndProcessingRestyles(), which is part of the main restyling codepath.

Patch 7 ensures that we'll always get to EndProcessingRestyles in this
case, when we're going through the normal ProcessPendingRestyles()
codepath rather than the special DoRebuildAllStyleData() codepath (which
will be removed later in this patch series).
2015-01-13 21:03:12 -08:00
L. David Baron 2b264a41d7 Bug 1115812 patch 7 - Always call DoProcessRestyles if mInRebuildAllStyleData. r=heycam
This is needed for patch 9 (once patch 9 is used via the
ProcessPendingRestyles() codepath in patch 13); it ensures that when we
use the new way of rebuilding, we don't bail out early because we think
we have nothing to do.
2015-01-13 21:03:12 -08:00
L. David Baron 61bcb1749a Bug 1115812 patch 6 - Move ProcessRestyles from RestyleTracker to RestyleManager. r=heycam
This is needed for the following patch, so that it can access a member
variable of RestyleManager.
2015-01-13 21:03:12 -08:00
L. David Baron e19772aa8e Bug 1115812 patch 5 - Store the state of whether we're currently rebuilding all style data in a member variable, to prepare for future merging of the rebuild into other code. r=heycam
This adds a member variable that is currently only used within a single
function, but that function will be split apart so that different parts
of it can be called from different places within ProcessPendingRestyles.
2015-01-13 21:03:12 -08:00
L. David Baron 1493ba39f8 Bug 1115812 patch 4 - Rename mRebuildAllStyleData to mDoRebuildAllStyleData. r=heycam
This is the variable that says we *need to* rebuild style data.  Since
the next patch will introduce a variable that says we're *currently*
rebuilding all style data, renaming this one makes things clearer.
2015-01-13 21:03:11 -08:00
L. David Baron a6b18a766a Bug 1115812 patch 3 - Pass the hints to DoRebuildAllStyleData via the member variables, in preparation for future refactoring. r=heycam
Part of this refactoring involves the ability to start the rebuild-all
process within the processing of restyles.  This means we can't pass
parameters directly from RebuildAllStyleData into DoRebuildAllStyleData.
So this continues storing the hints as member variables a little bit
deeper into the process.

(I tried to move in a different direction in this patch queue, and store
these hints in mPendingRestyles, for the root element.  But that broke
layout/style/test/test_counter_style.html and
layout/style/test/test_font_loading_api.html, and I didn't want to
figure out why.  It would be somewhat better in the long run, since
currently these hints will get processed if we do a rebuild-all on a
RestyleTracker other than mPendingRestyles, which can happen if we have
'rem' units and have a root element font size change in the
animation-only update or in mPendingAnimationRestyles.)
2015-01-13 21:03:11 -08:00
Mats Palmgren b0f013a10d Bug 907396 - Make RestyleManager::RestyleElement and nsCSSFrameConstructor::MaybeRecreateFramesForElement deal with display:contents elements. r=bzbarsky 2014-11-20 18:24:10 +00:00
Mats Palmgren 49c85139e6 Bug 907396 - Implement RestyleUndisplayedDescendants that restyles diplay:none children and display:contents descendants. r=bzbarsky 2014-11-20 18:24:10 +00:00
Mats Palmgren 96ad0f2c46 Bug 907396 - Frame constructor changes for display:contents. r=bzbarsky 2014-11-20 18:24:09 +00:00
Brian Birtles d5678b7ad6 Bug 1073336 part 14b - Make ElementRestyler detect changes to the animation generation; r=dbaron
For some kinds of changes we need to update the layer tree even though there is
no change to style. For example, if an animation is paused via the Web
Animations API, we need to remove the animation from the layer even though the
style will not change.

This patch detects such changes by making ElementRestyler check for an
out-of-date animation generation on layers. This is complicated by the fact that
we currently maintain *two* animation generation numbers: one for the set of
animations and one for the set of transitions, but we only have *one* animation
generation number on each layer. This is a known issue (bug 847286).

As a result, until bug 847286 is fixed, we need to be careful to compare against
the greater of the two numbers.
2014-11-17 13:46:00 +09:00
Brian Birtles dc417c2fec Bug 1073336 part 14a - Update animation generation when changing animations via the API; r=dbaron 2014-11-17 13:45:59 +09: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 988fa3f5c4 Bug 1075137 patch 6 - Convert remaining IsProcessingAnimationStyleChange calls to call the method on the RestyleManager. 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
Cameron McCormack 1ea00788ea Bug 1028497 - Part 24: Implement FontFaceSet.{ready,status} and dispatch events. r=jdaggett,bzbarsky 2014-10-02 12:32:09 +10: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 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
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
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 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 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
Ehsan Akhgari 60360fc645 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04: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 70c4a5a6b9 Bug 625289 patch 11 - Call RestyleManager::TryStartingTransition during frame construction. r=heycam 2014-08-13 15:39:02 -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 ebafb4f9b6 Bug 625289 patch 6 - Store style contexts being reframed in the ReframingStyleContexts struct. 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 2f980c8522 Bug 625289 patch 3 - Add types for storing the style contexts of elements currently being reframed. 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 57a0eac1db Bug 996796 patch 25 - Remove the old (now-unused) miniflush code (preserving one of the header comments). r=heycam 2014-08-06 22:58:44 -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 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 0d56159446 Bug 996796 patch 25 - Remove the old (now-unused) miniflush code (preserving one of the header comments). r=heycam 2014-08-02 19:37:49 -07:00
L. David Baron 9babce67c7 Bug 996796 patch 20 - Make restyling exact - Avoid rerunning selector matching on everything when the basis of rem units changes. r=heycam 2014-08-02 19:37:47 -07:00
L. David Baron 364d06998b Bug 996796 patch 3 - Move the knowledge of when we last updated main-thread-suppressed animation styles into the restyle manager rather than have two separate but always equal timestamps for animations and transitions. r=birtles 2014-07-24 21:35:34 -07:00
L. David Baron fe9af3ff1f Bug 996796 patch 2 - Change the public API to updating main-thread-suppressed animation styles (miniflush) in preparation for refactoring how it works. r=birtles
Later patches will combine the coalescing of restyling between the
miniflush performed for animations and for transitions into a single
RestyleTracker, which will coalesce the work better.  This patch changes
the API exposed for doing that so that the coalescing patch will contain
only the internals.
2014-07-24 21:35:34 -07:00