Commit Graph

13284 Commits

Author SHA1 Message Date
JerryShih
c39c465850 Bug 1092978 - Handle VsyncRefreshTimer creation for nuwa. r=bent,cyu 2015-01-19 02:28:00 +01:00
Nicholas Nethercote
8bd1f6f072 Bug 1123151 (part 2) - Add PLDHashTable::IsInitialized(). r=froydnj.
This encapsulates most of the uses of PLDHashTable::ops.

--HG--
extra : rebase_source : 7760ce8e46a37e87dcfe590e809a21df01fe510f
2015-01-19 16:11:34 -08:00
Nicholas Nethercote
bd573c9b9c Bug 1123151 (part 1) - Set PLDHashTable::ops consistently. r=froydnj.
Currently the setting of PLDHashTable::ops is very haphazard.

- PLDHashTable has no constructor, so it's not auto-nulled, so lots of places
  null it themselves.

- In the fallible PLDHashTable::Init() function, if the entry storage
  allocation fails we'll be left with a table that has |ops| set -- indicating
  it's been initialized -- but has null entry storage. I'm not certain this can
  cause problems but it feels unsafe, and some (but not all) callers of Init()
  null it on failure.

- PLDHashTable does not null |ops| in Finish(), so some (but not all) callers
  do this themselves.

This patch makes things simpler.

- It adds a constructor that zeroes |ops|.

- It modifies Init() so that it only sets |ops| once success is ensured.

- It zeroes |ops| in Finish().

- Finally, it removes all the now-unnecessary |ops| nulling done by the users
  of PLDHashTable.

--HG--
extra : rebase_source : bb34979c218d152562a2f9c7e5215256c111cc5b
2015-01-19 16:01:24 -08:00
Trevor Saunders
85227ffecb bug 1122065 - use MOZ_OVERRIDE more in gfxish things r=jrmuizel 2015-01-19 17:41:12 -05:00
Jeremy Chen
a276a30c08 Bug 1110917 - v3 Part 2: Fix focus not changing while selecting word. r=roc 2015-01-15 22:46:00 +01:00
Jeremy Chen
31bef005d4 Bug 1110917 - Part 1 - Add test cases for selectioncaret changes. r=dburns 2014-12-31 14:40:39 +08:00
Surabhi Anand
98a481bdeb Bug 1120203 - Transitioning mPresShellResolution field of FrameMetrics to use getters/setters. r=kats 2015-01-16 16:15:52 -05:00
Nicholas Nethercote
69fe655b04 Bug 1121304 (part 2, attempt 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj.
--HG--
extra : rebase_source : bc119bd0d3b6944e8c5a000950e0c4052cb70aef
2015-01-14 14:35:56 -08:00
L. David Baron
e15cc37014 Bug 1122240 - Check mIsActive before calling the somewhat-expensive GetRootPresContext. r=roc
I noticed the GetRootPresContext call being expensive in a profile that
involved painting in a (non-e10s) window with around 400-500 tabs.
Moving the mIsActive test (most likely to be false) first should fix
that.
2015-01-15 18:14:44 -08:00
L. David Baron
eb5285b396 Bug 1121327 patch 2 - Update reftest and crashtest manifests for new OSX variable in condition sandbox. r=ted.mielczarek 2015-01-15 15:07:50 -08:00
Kartikaya Gupta
79146a788a Bug 1121033 - Respect mozpasspointerevents when building event regions. r=roc 2015-01-15 10:37:54 -05:00
Ehsan Akhgari
e5d0719afd Bug 1121499 - Make the textarea in the test case for bug 664087 three rows tall so that we don't get a scrollbar on OSX 10.10; r=roc 2015-01-15 08:04:02 -05:00
Jonathan Kew
8699f8544e Bug 1113216 - Avoid assertions/crashes by treating enumerated block-size values as auto, pending proper implementation of all the values. r=dbaron 2015-01-15 11:56:51 +00:00
JerryShih
f7e80df874 Bug 1121331 - Part3: VsyncChild actor and VsyncRefreshTimer creation. r=roc r=bent 2015-01-14 00:38:00 +01:00
JerryShih
5d843b5eb7 Bug 1121331 - Part2: Vsync aligned refresh timer. r=roc r=mchang 2015-01-14 00:38:00 +01:00
Xidorn Quan
b6f10f748e Bug 1055667 part 6 - Fix border/padding of ruby frame. r=dbaron
--HG--
extra : source : 42391b99e060a7b3c4e281ce2a4fda77cb3e4efc
2015-01-15 20:02:11 +11:00
Xidorn Quan
1bf1df7b1e Bug 1055667 part 2 - Remove unnecessary param of SetBSizeFromFontMetrics. r=dbaron
--HG--
extra : source : aa79c8cebf3e2ab0fd4335eaa3c630a43dbe81f2
2015-01-15 20:02:11 +11:00
Phil Ringnalda
e39f0adeca Backed out 2 changesets (bug 1121304) for consistent b2g hangs in webgl-color-test.html?frame=1&__&preserve&premult&_____
Backed out changeset 20651ac19549 (bug 1121304)
Backed out changeset 758afec77c95 (bug 1121304)
2015-01-14 22:02:23 -08:00
Nicholas Nethercote
e9735966fa Bug 1121304 (part 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj. 2015-01-14 14:35:56 -08:00
Nicholas Nethercote
47221bc7f9 Bug 1120476 (part 4) - Remove PLDHashTableOps::finalize. r=froydnj.
--HG--
extra : rebase_source : b14dda8cdd5cd896d1e32950e38b2a9f7da4d99e
2015-01-13 19:02:35 -08:00
Nicholas Nethercote
c7538c9776 Bug 1120476 (part 3) - Remove PLDHashTable::data. r=froydnj.
--HG--
extra : rebase_source : 24d10af3dbce3ada5252503bc80bb1a4e31bc1c9
2015-01-13 16:42:13 -08:00
Gregor Wagner
eddcc4cfca Backout bug 1110917 for Gij red. 2015-01-14 11:25:38 -08:00
Gregor Wagner
f22a627b9b Backout bug 1110917 for Gij red. 2015-01-14 11:25:15 -08:00
David Anderson
02248cee29 Fix classic scrollbars getting occluded with containerless scrolling. (bug 1100756, r=roc)
--HG--
extra : rebase_source : fcf95ab0c435d9c29a6a3552fe05d7f1ad3bc0ec
2015-01-13 23:55:17 -08: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
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
Mats Palmgren
2acb3c8961 Bug 1120198 part 2 - Optimize RebuildImageVisibility[DisplayList]() using nsTHashtable::SwapElements. r=tn 2015-01-13 14:44:33 +00:00