Commit Graph

400951 Commits

Author SHA1 Message Date
L. David Baron
f290869b5e Bug 1110277 patch 6 - Make the lifetime of the ReframingStyleContexts object longer. r=heycam
This makes the ReframingStyleContexts live across the lifetime of the
processing of a full queue of posted restyles.

This depends on bug 1115812 to behave sensibly (and not assert) when
rebuilding the rule tree (RebuildAllStyleData, etc.).

This handles the form of lazy frame construction that is done in
nsCSSFrameConstructor::RecreateFramesForContent, which posts a restyle.
Patch 7 handles any use of the lazy frame construction mechanism.

This patch (with patches 4 and 5 under it, but without patches 1-3)
fixes the original testcase in bug 1110277, except for some flashing of
the final position as the transition starts.

Also fixes bug 1111451.
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
f1332e99f1 Bug 1115812 patch 20 - Add assertions that mDoRebuildAllStyleData and mInRebuildAllStyleData are false by the end of restyle processing. r=heycam
These assertions are as requested in comment 30 in the bug.

(If the first one doesn't fire, it's possible we could even get rid of
the handling of mDoRebuildAllStyleData that it's within.)
2015-01-13 21:03:13 -08:00
L. David Baron
7bc8463f0e Bug 1115812 patch 19 - Avoid bad kungFuDeathGrip pattern. r=heycam
If we need a strong reference to the pres shell, we may as well do it
the first time rather than bothering with an extra variable.
2015-01-13 21:03:12 -08:00
L. David Baron
0e8362d05a Bug 1115812 patch 18 - We only need to call ProcessPendingRestyles recursively, rather than RebuildAllStyleData. r=heycam
If we discover that we've set mDoRebuildAllStyleData in the middle of
ProcessPendingRestyles(), now that ProcessPendingRestyles() fully
handles mDoRebuildAllStyleData, we only need to make a recursive call to
ProcessPendingRestyles, rather than calling RebuildAllStyleData to call
ProcessPendingRestyles.
2015-01-13 21:03:12 -08:00
L. David Baron
a998c7bd03 Bug 1115812 patch 17 - Do animation-only update properly for a rebuild all. r=heycam
This fixes another pre-existing bug in the rebuild-all codepath; it
didn't handle the animation-only update correctly, which could have
caused bugs in transitions with OMT animations enabled.
2015-01-13 21:03:12 -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
f9abbf6ae0 Bug 1115812 patch 15 - Change the rebuild-all that we do for 'rem' unit changes to use the new way. r=heycam
This means that instead of recurring into DoRebuildAllStyleData, we'll
call StartRebuildAllStyleData in the middle of processing the restyle
queue (which is fine).  StartRebuildAllStyleData will move the old rule
tree out of the way and immediately do a full-tree restyle, before
returning to any queue processing that might be left (the full-tree
restyle should have consumed all remaining restyle hints, but might have
posted some new ones for handling reframes that require reframing
ancestors).  And, more importantly, the EndReconstruct() call to get rid
of the old rule tree won't happen until after we're done processing the
containing RestyleTracker's queue of restyles, which reduces the risk of
having dangling old style contexts and makes it easier (in bug 1110277)
to have a ReframingStyleContexts with the right lifetime.
2015-01-13 21:03:12 -08:00
L. David Baron
eed121aaa9 Bug 1115812 patch 14 - For rem unit change handling, repost min hint to root just like change hint. r=heycam
This changes what was probably a silly design choice when I wrote the
code for 'rem'-basis handling; we shouldn't try continuing through the
rest of RestyleElement() here, but instead repost the hint to the
rebuild-all process.
2015-01-13 21:03:12 -08:00
L. David Baron
6dc93cb14d Bug 1115812 patch 13 - Make RebuildAllStyleData use the normal ProcessPendingRestyles() codepath. r=heycam
This switches RebuildAllStyleData() to the normal
ProcessPendingRestyles() manner of restyle processing.  This means a
rebuild-all going through this codepath (the main rebuild-all codepath)
only sets up for non-animation restyle processing once rather than doing
it twice (and potentially having reframes posted in
DoRebuildAllStyleData() that don't get processed until
ProcessPendingRestyles(), which causes a variant of bug 1110277 with
transitions on reframed elements failing to start because it doesn't
match the lifetime of the ReframingStyleContexts).
2015-01-13 21:03:12 -08:00
L. David Baron
504d9a46e0 Bug 1115812 patch 12 - Null-check the root frame in StartRebuildAllStyleData. r=heycam
In the new way of doing a rebuild-all, StartRebuildAllStyleData might be
called directly from ProcessPendingRestyles rather than from
RebuildAllStyleData (which null-checks the root frame) or from within
processing restyles (which can only happen when there's a root frame).
This means it needs its own null-check of the root frame.
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
4991382cc8 Bug 1115812 patch 8 - Call BeginProcessingRestyles and EndProcessingRestyles from DoRebuildAllStyleData. r=heycam
This fixes one of the omissions in the rebuild-all codepaths (where it
incorrectly differs from the regular ProcessPendingRestyles codepath).
Note that the explicit FlushOverflowChangedTracker() is no longer needed
because that's part of EndProcessingRestyles.

(This will all get refactored more substantially in the following
patches.)
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
L. David Baron
5d1c7926f6 Bug 1115812 patch 2 - Move the eRestyle_ChangeAnimationPhaseDescendants hint in DoRebuildAllStyleData so that the new rebuild-all codepaths will keep it. r=heycam
The patches in this series refactor the process of rebuilding all style
data (RestyleManager::RebuildAllStyleData and
RestyleManager::DoRebuildAllStyleData) so that the process of rebuilding
all style data uses the existing restyle processing loops in
ProcessPendingRestyles.  (Rebuilding all style data is what we do when
we need to throw away the rule tree because something has invalidated
the cached data in it.)  This removes (increasing, especially with bug
960465 coming) code duplicated between the two codepaths, fixes some
omissions from the separate rebuild-all codepath, and (more immediately)
allows fixing lifetime issues of ReframingStyleContexts objects in bug
1110277 so that we can have a single ReframingStyleContexts for all of
the restyle processing in each restyle processing operation.  In other
words, the goal is to change the rebuild-all process from a separate
codepath to a few variables that modify the way ProcessPendingRestyles
works (and make it do the extra work).

This is just a small first step in that process, which moves one piece
of code from a chunk of duplicated and to-be-removed code into a chunk
of code that will be preserved.
2015-01-13 21:03:11 -08:00
L. David Baron
c18ac3eff2 Bug 1115812 patch 1 - Remove obsolete comment that was fixed by bug 1047928. r=heycam 2015-01-13 21:03:11 -08:00
L. David Baron
58c2e564c7 Bug 908987 - Honor mIsActive more aggressively to avoid calling IsVisibleConsideringAncestors. r=roc
This means that we avoid an O(N^2) calling pattern of IsVisible when we
call IsVisible for all tabs of a tabbrowser, since in a tabbrowser
(which uses an nsDeckFrame), IsVisibleConsideringAncestors is O(N) in
number of earlier tabs.
2015-01-13 21:03:11 -08:00
Anthony Jones
6c9a65317c Bug 1116056 - Change MOZ_ASSERT() to NS_WARNING() in Box::Read(); r=jya 2015-01-14 16:57:14 +13:00
Mason Chang
b53a58c873 Bug 1121065 - Ensure Software Vsync TimeStamp is never in the future. r=kats 2015-01-13 19:30:29 -08:00
Nicholas Nethercote
21ff49fc61 Bug 1120257 (part 2) - Remove some duplicated inline string methods. r=jandem.
Some of the inline string methods have a templated and a non-templated version,
e.g. lengthFits() and init(). Others don't, e.g. NewInlineString(). Having both
seems unnecessary, so this patch removes the non-templated versions.

--HG--
extra : rebase_source : 311db9edc75e4b91df8d59ff5ba1d7c53f0caf4d
2015-01-13 14:25:37 -08:00
Nicholas Nethercote
06998dfadf Bug 1120257 (part 1) - Clarify inline string naming by adding JSThinInline. r=jandem.
This patch introduces a new sub-class of JSInlineString called
JSThinInlineString, and moves the operations specific to thin inline strings
into it. JSInlineString now clearly subsumes both of JS{Thin,Fat}InlineString,
and "inling string" now clearly subsumes both of "thin inline string" and "fat
inline string". Despite adding yet another JSString subclass, I think it makes
things clearer :)

The patch also renames a bunch of things accordingly, and removes the dead
resetLength() declaration.

--HG--
extra : rebase_source : e966f5d1ab05e36c5846c6df445fb09a82d80a86
2015-01-13 14:25:36 -08:00
Chris Manchester
8473d61d23 Bug 1120630 - Skip tests failing with e10s enabled.;r=jgriffin 2015-01-13 21:27:26 -05:00
Chris Manchester
7059c5b81b Bug 1120630 - Add --e10s to turn on electrolysis for marionette tests.;r=jgriffin 2015-01-13 21:27:25 -05:00
Wes Kocher
5c2408216d Merge m-c to inbound a=merge 2015-01-13 17:45:46 -08:00
Wes Kocher
b3151d95ae Merge fx-team to m-c a=merge 2015-01-13 17:44:56 -08:00
Wes Kocher
3f23ab427f Merge b2g-inbound to m-c a=merge 2015-01-13 17:38:53 -08:00
Wes Kocher
1b6efd5f54 Merge inbound to m-c a=merge 2015-01-13 16:52:16 -08:00
Jonathan Griffin
d79b0ce885 Bug 1116187 - Add in-tree config for B2G mochitest-chrome, r=gbrown 2015-01-13 16:31:41 -08:00
Daniel Holbert
df61000207 Bug 1121256: Remove commented-out debugging printfs from 1998, in nsSubDocumentFrame::Reflow. (comment-only, no review, DONTBUILD) 2015-01-13 16:30:32 -08:00
Steve Fink
2126630e3a Bug 1117768 - unified bustage followup on a CLOSED TREE
--HG--
extra : amend_source : c25ad4b2133fdaf6ef4429f2d875af7e0e5af5aa
2015-01-13 15:44:14 -08:00
Steve Fink
dbad37981b Bug 1117768 - Fix assertion in AutoStopVerifyingBarriers and add tests, r=terrence
--HG--
extra : rebase_source : 8e2b252621fa09f01e01db55f4145e97ef802e04
2015-01-13 14:01:42 -08:00
Geoff Brown
55df9a3b9f Bug 1105388 - Avoid robocop shutdown crashes with longer wait; r=mfinkle 2015-01-13 15:42:06 -07:00
B2G Bumper Bot
88a2b4233c Bumping manifests a=b2g-bump 2015-01-13 13:42:01 -08:00
B2G Bumper Bot
d07dbd9f69 Bumping gaia.json for 5 gaia revision(s) a=gaia-bump
========

https://hg.mozilla.org/integration/gaia-central/rev/6d459c49070f
Author: Kevin Grandon <kevingrandon@yahoo.com>
Desc: Bug 1117976 - Disable intermittent statusbar_test.js | First Time Use > statusbar icons should change r=kgrandon

========

https://hg.mozilla.org/integration/gaia-central/rev/ac7e82619758
Author: Kevin Grandon <kevingrandon@yahoo.com>
Desc: Merge pull request #27355 from KevinGrandon/bug_1120712_bump_gaia_modules

Bug 1120712 - Bump gaia node modules for marionette file manager bump

========

https://hg.mozilla.org/integration/gaia-central/rev/2122c02dbc9f
Author: Kevin Grandon <kevingrandon@yahoo.com>
Desc: Bug 1120712 - Bump gaia node modules for marionette file manager bump r=kgrandon

========

https://hg.mozilla.org/integration/gaia-central/rev/34f9b9fe5dfc
Author: Kevin Grandon <kevingrandon@yahoo.com>
Desc: Merge pull request #27334 from KevinGrandon/bug_1104704_intermittent_browser_chrome_share_web_result_test

Bug 1104704 - Intermittent browser_chrome_share_web_result_test.js | Browser Chrome - Share Web Result share web result via e-mail r=cwiiis r=daleharvey

========

https://hg.mozilla.org/integration/gaia-central/rev/c3be5fca78a2
Author: Kevin Grandon <kevingrandon@yahoo.com>
Desc: Bug 1104704 - Intermittent browser_chrome_share_web_result_test.js | Browser Chrome - Share Web Result share web result via e-mail
2015-01-13 13:36:49 -08:00
Dave Hylands
088b97b45b Bug 1082290 - Add memory cgroup support to FxOS process control. r=gsvelto 2015-01-13 12:12:32 -08:00
Kartikaya Gupta
421e78dd67 Bug 1107009. r=BenWa 2015-01-13 13:26:26 -05:00
Ben Hearsum
1fc5654b4c bug 1121015: Dolphin non-engineering nightlies are broken. r=callek, a=bustage 2015-01-13 12:26:23 -05:00
B2G Bumper Bot
1392a3aeff Bumping manifests a=b2g-bump 2015-01-13 08:38:38 -08:00
Carsten "Tomcat" Book
db958a2de5 merge fx-team to mozilla-central a=merge 2015-01-13 14:27:06 +01:00
Carsten "Tomcat" Book
f3a2dc46bd merge mozilla-inbound to mozilla-central a=merge 2015-01-13 14:24:21 +01:00
Eddy Bruël
a8c8dc1004 Bug 1105652 - Handle uncaught promise rejections in the style editor;r=bgrins 2015-01-13 10:50:20 +01:00
Eddy Bruël
3004465c29 Bug 1118806 - Handle uncaught promise rejections in the storage inspector;r=pbrosset 2015-01-13 10:05:20 +01:00
Xidorn Quan
a910edbc6b Bug 1115262 - Fix position of ruby annotation when writing mode is vertical-rl. r=jfkthame
--HG--
extra : source : ec2b2922a741fc5a62bc76c716529eda1b7fe5d0
extra : amend_source : 95bc6d9805f2c0cb9c4d76fcebb5defdd6c69660
2015-01-13 20:04:41 +11:00