Commit Graph

69 Commits

Author SHA1 Message Date
L. David Baron
688f41fcb6 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
7e5641fdc0 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
25df7c71fc 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
cd74ed0fc8 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
ab6f8fb56c 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
a84c0301dc 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
df92baa4c2 Bug 1028497 - Part 24: Implement FontFaceSet.{ready,status} and dispatch events. r=jdaggett,bzbarsky 2014-10-02 12:32:09 +10:00
Cameron McCormack
f449c11e35 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
40fb431145 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
8cc28ad642 Back out bug 1045895 for causing bug 1070759. 2014-09-25 15:30:18 +10:00
Phil Ringnalda
14f9d99fc1 Back out c0c410aed86f (bug 979133) for -wError bustage
CLOSED TREE
2014-09-24 21:06:22 -07:00
Cameron McCormack
3483fb3f51 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
1e93de37df 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
a981d85cb7 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
e9bf81145d 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
d6795ceaf7 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
1b82ce196a 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
95a75d8cc2 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
L. David Baron
eac189105e 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
1b0226483c Bug 625289 patch 11 - Call RestyleManager::TryStartingTransition during frame construction. r=heycam 2014-08-13 15:39:02 -07:00
L. David Baron
b0f54ace4a Bug 625289 patch 7 - Expose TryStartingTransition. r=heycam 2014-08-13 15:39:01 -07:00
L. David Baron
124c99f785 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
590dd26954 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
88fff1692f 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
c04b04986e 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
e86e9d1a9b 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
96c3b8e582 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
0b7ed4e755 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
49b104a310 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
995eeb66e6 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
89ead0b4bb 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
ff6cc13ca8 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
L. David Baron
502b0ac364 Bug 1026768 - Pass the restyle hint through from ProcessOneRestyle to ComputeStyleChangeFor rather than converting it to a boolean and back. r=heycam
This was originally bug 996796 patch 6, but it's also needed bug 931668,
so I'm moving it into its own bug.
2014-06-18 17:07:26 -07:00
Susanna Bowen
4451470f2b Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-17 10:32:00 -04:00
Wes Kocher
b29250a3a3 Backed out 2 changesets (bug 727125) for reftest bustage on an otherwise CLOSED TREE
Backed out changeset 443361e2724a (bug 727125)
Backed out changeset 16c8d78df86e (bug 727125)
2014-06-16 13:34:50 -07:00
Susanna Bowen
de5185bcd2 Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-16 11:58:29 -07:00
Ryan VanderMeulen
3ed2bbef13 Backed out changesets d0ee7053aaf3 and c83f17cd74be (bug 727125) for B2G reftest failures.
CLOSED TREE
2014-06-12 14:45:40 -04:00
Daniel Holbert
4820eab88b Bug 1024084: Clean up forward declarations and #includes in nsFrameManager.h and nsFrameManagerBase.h. r=jwatt 2014-06-12 10:09:31 -07:00
Susanna Bowen
995cc74fd1 Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-09 15:00:00 -04:00
Robert O'Callahan
9170085906 Bug 1015664. Part 1: Remove NS_HIDDEN_() usage. r=bsmedberg 2014-06-03 00:08:21 +12:00
Mats Palmgren
b0d5def71c Bug 1008917 - part 15, make RestyleManager::StyleChangeReflow() return type 'void'. r=roc 2014-05-13 00:47:53 +00:00
Wes Kocher
4bfe3c39fd Backed out 11 changesets (bug 1008917) for apparently introducing an intermittent failure of B2G Crashtest-2 on a CLOSED TREE
Backed out changeset e2ab653f688a (bug 1008917)
Backed out changeset b52154d8d900 (bug 1008917)
Backed out changeset 2ab5b01da4de (bug 1008917)
Backed out changeset f7a38df1d44f (bug 1008917)
Backed out changeset 80304bb9a572 (bug 1008917)
Backed out changeset 10ed89a302e9 (bug 1008917)
Backed out changeset 161c41991d46 (bug 1008917)
Backed out changeset 25b2475d2368 (bug 1008917)
Backed out changeset b8000b31277c (bug 1008917)
Backed out changeset 9afa5e7715e1 (bug 1008917)
Backed out changeset 5c380c21351f (bug 1008917)
2014-05-12 15:47:41 -07:00
Mats Palmgren
091cebb52a Bug 1008917 - part 15, make RestyleManager::StyleChangeReflow() return type 'void'. r=roc 2014-05-12 17:40:30 +00:00
Masayuki Nakano
01ad44156b Bug 989212 Rename nsEventStates to mozilla::EventStates r=smaug
--HG--
rename : dom/events/nsEventStates.h => dom/events/EventStates.h
2014-04-03 13:18:36 +09:00
Daniel Holbert
1a5334960a Bug 984786 part 1: Add MOZ_FINAL and private destructors to some refcounted classes in layout. r=dbaron 2014-03-21 09:16:20 +08:00
L. David Baron
0754b253b8 Bug 828312 patch 11: Don't generate change hints for restyling of later continuations, since the handling of the change hints from the first continuation is required to do the necessary work. r=bzbarsky
This depends on bug 898333 in order to avoid causing:
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/chrome/test_focused_link_scroll.xul | Assertion count 1 is greater than expected range 0-0 assertions.
due to the assertion:
###!!! ASSERTION: Shouldn't be trying to restyle non-elements directly: '!aContent || aContent->IsElement()', file ../../../layout/base/nsStyleChangeList.cpp, line 62

The assertion count change in layout/generic/crashtests/571995.xhtml is
expected because it changes us from having 7 of:
###!!! ASSERTION: Shouldn't be trying to restyle non-elements directly: '!aContent || aContent->IsElement()', file ../../../layout/base/nsStyleChangeList.cpp, line 62
with the stack:
  mozilla::ElementRestyler::CaptureChange(nsStyleContext*, nsStyleContext*, nsChangeHint) [layout/base/nsChangeHint.h:191]
  mozilla::ElementRestyler::RestyleSelf(nsRestyleHint) [layout/base/RestyleManager.cpp:2304]
to only having one.  This is expected since this patch changes
RestyleSelf to only call CaptureChange for the first continuation or
block-in-inline sibling.
2013-09-25 12:28:08 -07:00
L. David Baron
de0fdd8b25 Bug 898333, patch 2: Change RestyleManager::Restyle's tree traversal to reach next-continuations (and same-display block-in-inline siblings) from their prev-continuation rather than from their parent. r=bzbarsky
This patch fundamentally makes three changes:

 (1) Change the way RestyleSelf is used so that it is called in a loop,
     over all of the same-style continuations and block-in-inline
     siblings.
     (I had a note here reminding myself:
       TODO: Don't set hints for descendants!
     but I no longer remember what it meant.)

 (2) Change the traversal of children to traverse all of the children of
     the items traversed in (1).

 (3) When traversing children, skip children that are continuations,
     since we already reached them in (1) and (2).

A later patch will change the RestyleSelf loop to copy for the later
continuations rather than repeating the work.  This will mean reverting
many of the RestyleSelf changes contained here.

Some of the pieces marked temporary will be removed in bug 828312 patch
11, and the rest should hopefully be removed in bug 918064.
2013-09-25 12:28:07 -07:00
Alex Xu
3bb4b7a43b Bug 900284: Use #ifdef ACCESSIBILITY around member variables only used inside #ifdef ACCESSIBILITY, to avoid clang warnings (and reduce object size with --disable-accessibility). r=dbaron 2013-07-31 19:15:19 -07:00
L. David Baron
98a4c2fb01 Bug 898329 patch 7: Split ElementRestyler::Restyle into multiple functions. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
710616ca5c Bug 898329 patch 5: Create and use ElementRestyler::mResolvedChild. r=heycam 2013-07-30 17:36:11 -07:00