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

353 Коммитов

Автор SHA1 Сообщение Дата
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
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 4ff105698b 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-02 19:37:47 -07:00
L. David Baron d2fe2e8c79 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-02 19:37:47 -07:00
L. David Baron 7e242b4acd Bug 996796 patch 8 - Pass the replacements through to ResolveStyleWithReplacement. r=heycam
This means ResolveStyleWithReplacement will replace only the rules in
the nsRestyleHint rather than always replacing both the animations rule
and the transitions rule.  (This will become even more useful later when
we add the ability to replace the style attribute rule.)
2014-08-02 19:37:44 -07:00
L. David Baron c7d4180816 Bug 996796 patch 7 - Add new restyle types that replace only the data from CSS transitions or animations. r=heycam
This is the start of a refactoring of the existing code in
CommonAnimationManager, nsTransitionManager, and nsAnimationManager,
which will be removed in later patches (after patches in between cause
this code to be used instead of the current code).

But it also handles interesting cases more correctly, such as cases
where style context parents are unusual.

FIXME: It would be nice to add tests for these cases, but they're mostly
pretty obscure (e.g., a transition of 'transform' that's affected by
inheriting 'transform' from ::first-line), so I'm not treating it as a
priority right now.
2014-08-02 19:37:43 -07:00
L. David Baron fea45deb80 Bug 996796 patch 6 - Adjust checks of restyle types to accomodate new types weaker than eRestyle_Self. r=heycam
FIXME: Adjust for eRestyle_Force if bug 931668 lands first.

Later patches will add such types that are like eRestyle_Self but that
only replace the style attribute, animation rule, or transition rule.
2014-08-02 19:37:43 -07:00
Robert O'Callahan 372f537079 Bug 1013054. Don't propagate non-repaint change hints to the canvas frame. r=mattwoodrow
--HG--
extra : rebase_source : c5e9613baf7a444dafbb1b9677cf7b4bd5381140
2014-07-22 01:57:52 +12: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
L. David Baron b7a521a812 Bug 996796 patch 1 - Perform a miniflush on both animations and transitions before processing restyles. r=birtles
This affects the correctness of transitions that take over from a
running animation.  (In the current code this can happen on a single
element; once the cascading changes in bug 960465 are complete it can
only happen via inheritance.)

This version of the patch changes to do the test using opacity rather
than transform, since testing using transforms encountered issues
related to bug 1031688:  the presence of phantom transitions due to the
interaction of the computed value rules for transforms distinguishing
between values that the interpolation rules consider identical.  (These
problems only appear after patch 24 in this bug changes the coalescing
order between a parent with animations and a child with transitions so
that the parent is handled before the child, instead of transitions
being handled before animations.)

The final two added tests fail without the patch and pass with the patch.
(With the opacity version, the third to last test also fails without the
patch, probably due to the value not having yet been sent to the layer.
This was not an issue pre-patch with the original test using transform,
though.  I haven't tested that this happened with patch 0, though, so it
might have been the issue patch 0 fixes.)
2014-07-24 21:35:33 -07:00
Simon Montagu c3b44c4dad Bug 789096 patch 9: use logical coordinates in nsHTMLReflowState available size. r=jfkthame 2014-07-24 01:28:46 -07:00
Chris Lord e999475d51 Bug 1038781 - Don't reflow/repaint frame when clip changes. r=roc
If an element's existing clip changes, just update overflow areas and let
DLBI handle invalidation.
2014-07-16 13:28:50 +02:00
L. David Baron cc63c0810a 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 58e46a1570 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
Susanna Bowen 64b0116f8b Bug 1025308 - Rename the variables associated with skipping style fixups for children element's based on parent display value. r=mats 2014-06-16 09:55:00 -04:00
Wes Kocher abf9a45351 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 dc169c8b48 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
Cameron McCormack 9a75e854c1 Bug 1017798 - Part 1: Make AncestorFilter and the TreeMatchContext style scope list include ancestors from following ShadowRoots up to the light tree. r=bzbarsky 2014-06-06 15:22:55 +10:00
Victor Porof 9ce7e9c089 Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj 2014-05-23 17:12:29 -04:00
Mats Palmgren 273ad272f1 Bug 508665 - part 3, Change GetContentInsertionFrame() to return a nsContainerFrame*, and return null for leaf frames. Deal with GetContentInsertionFrame() returning null in a couple of places. r=roc 2014-05-24 22:20:39 +00:00
Mats Palmgren 80e4743862 Bug 1008917 - part 15, make RestyleManager::StyleChangeReflow() return type 'void'. r=roc 2014-05-13 00:47:53 +00:00
Wes Kocher 42253715d7 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 c655633014 Bug 1008917 - part 15, make RestyleManager::StyleChangeReflow() return type 'void'. r=roc 2014-05-12 17:40:30 +00:00
Kearwood (Kip) Gilbert fd0c3de469 Bug 926728 - Only pass the first continuation or or-split-sibling of the sticky element to StickyScrollContainer::PositionContinuation. r=dbaron, r=corey
- RestyleManager::RecomputePosition now calls
  StickyScrollContainer::PositionContinuation with the first continuation
  or ib-split-sibling of the passed frame, as PositionContinuations will
  update all continuations at once, and expects the first continuation
  to be passed in.
2014-04-25 15:29:56 -07:00
Mats Palmgren 4933aef60a Bug 1000376 - part 3, s/FlexItemStyleFixup/FlexOrGridItemStyleFixup/ and corresponding comment changes. r=dholbert 2014-05-03 13:42:33 +00:00
L. David Baron 1cbc91a8da Bug 997506: Call CreateNeededFrames for all ProcessPendingRestyles calls rather than just most. r=tn
This is needed to avoid hitting the assertion "Why did this not get
handled while processing mRestyleRoots?" in CollectRestyles, because we
have a restyle posted for a frame that has the NEEDS_FRAME bit flag set.
2014-04-24 09:30:12 -07:00
Kearwood (Kip) Gilbert c0402875df Bug 984226 - Add parameter to OverflowChangedTracker::AddFrame to distingush between frames that need nsIFrame::UpdateOverflow called and frames that only have a transform that has changed. r=dbaron
- OverflowChangedTracker::AddFrame now accepts an enumerated type parameter to
  indicate if the overflow areas of children have changed (CHILDREN_CHANGED),
  the overflow areas of the children have changed and the parent have changed
  (CHILDREN_AND_PARENT_CHANGED), or if only the transform has changed
  (TRANSFORM_CHANGED).
- OverflowChangedTracker::Flush no longer falls back to calling
  nsIFrame::UpdateOverflow when a frame lacks a PreTransformOverflowAreas
  property.
- Added an additional change hint, nsChangeHint_ChildrenOnlyTransform, which
  results in TRANSFORM_CHANGED being passed in to
  OverflowChangedTracker::AddFrame.
- In nsIFrame::FinishAndStoreOverflow, the passed in overflow is now stored as
  the InitialTransformProperty for elements that are IsTransformed().
- Partially corrected Bug 926155, by only calling
  OverflowChangedTracker::AddFrame on parents of the sticky element during
  StickyScrollContainer::UpdatePositions, using CHILDREN_CHANGED.
2014-03-13 17:21:25 -07:00
Daniel Holbert 61204d781b Bug 996351: Rename nsPresShell::GetReferenceRenderingContext() to CreateReferenceRenderingContext(), to reduce implication of fallibility. r=roc 2014-04-14 21:30:25 -07:00
Ryan VanderMeulen abc7729b7a Backed out changeset 7be71c699b85 (bug 984226) for crashtest asserts. 2014-04-08 15:31:45 -04:00
Kearwood (Kip) Gilbert 74b70bdbd0 Bug 984226 - Add parameter to OverflowChangedTracker::AddFrame to distingush between frames that need nsIFrame::UpdateOverflow called and frames that only have a transform that has changed. r=dbaron
- OverflowChangedTracker::AddFrame now accepts an enumerated type parameter to
  indicate if the overflow areas of children have changed (CHILDREN_CHANGED) or
  if the transform has changed (TRANSFORM_CHANGED).
- OverflowChangedTracker::Flush no longer falls back to calling
  nsIFrame::UpdateOverflow when a frame lacks a PreTransformOverflowAreas
  property.
- Added an additional change hint, nsChangeHint_ChildrenOnlyTransform, which
  results in TRANSFORM_CHANGED being passed in to
  OverflowChangedTracker::AddFrame.
- In nsIFrame::FinishAndStoreOverflow, the passed in overflow is now stored as
  the InitialTransformProperty for elements that are IsTransformed().
- Partially corrected Bug 926155, by only calling
  OverflowChangedTracker::AddFrame on parents of the sticky element during
  StickyScrollContainer::UpdatePositions, using CHILDREN_CHANGED.
2014-03-13 17:21:25 -07:00
Masayuki Nakano 3cc4e99fc0 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
L. David Baron 3d27ca2dd2 Bug 828173 bustage fix for non-unified builds: add using declaration. 2014-03-04 21:05:18 -08:00
L. David Baron 31c94b630e Bug 828173 patch 5: Call AddAnimationsAndTransitionsToLayer when we choose not to repaint when handling an UpdateTransformLayer hint, so that any new animations resulting from the style change get sent to the layer. r=mattwoodrow 2014-03-04 20:13:22 -08:00
L. David Baron fb58fa1a66 Bug 978612: Ignore changes to offsets of static-positioned elements when they or their descendants have views. r=dholbert
We get slightly better optimization, and no loss of function, by putting
these checks in the opposite order.
2014-03-03 00:54:39 -08:00
L. David Baron d31701cad1 Bug 91419 patch 9: Fix comments and debugging output referring to "special" frames. r=mats 2014-02-06 17:45:33 -08:00
L. David Baron 09c9451bd3 Bug 91419 patch 6: Rename everything with IBSplitSpecialPrevSibling to IBSplitPrevSibling. r=mats 2014-02-06 17:45:31 -08:00
L. David Baron 82503f4eca Bug 91419 patch 5: Rename everything with SpecialSibling to IBSplitSibling. r=mats 2014-02-06 17:45:31 -08:00
L. David Baron 1841dbc18e Bug 91419 patch 3: Rename everything with IBSplitSpecialSibling to IBSplitSibling. r=mats 2014-02-06 17:45:30 -08:00
L. David Baron c5c5881d3f Bug 91419 patch 1: Rename NS_FRAME_IS_SPECIAL to NS_FRAME_PART_OF_IBSPLIT. r=mats 2014-02-06 17:45:28 -08:00
Cameron McCormack a8f3bdbb72 Bug 962427 - Make RestyleManager.cpp's GetNextBlockInInlineSibling static. r=dbaron 2014-01-23 15:24:22 +11:00
L. David Baron 096a8e10cf Bug 945105 patch 3: Replace changes to ComputeStyleChangeFor with a check of GetPrevContinuationWithSameStyle to avoid the duplication in a way that still doesn't break direct restyling of an element whose continuations have different styles. r=heycam 2014-01-19 11:04:56 -08:00
L. David Baron e421987df1 Bug 945105 patch 2: Convert RestyleManager::ComputeStyleChangeFor from while loops to for loops to make it easier to add continue statements to it. r=heycam 2014-01-19 11:04:56 -08:00
L. David Baron c7347c2369 Bug 945105 patch 1: Revert the changes to RestyleManager::ComputeStyleChangeFor from bug 898333, patch 2, since they cause skipping (in addition to the desired skipping) of continuations that do need restyling, in the case of directly restyling an element where continuations have different styles. r=heycam 2014-01-19 11:04:56 -08:00
Robert O'Callahan d3685fbd39 Bug 960277. Part 1: Don't optimize away frame reconstruction for 'transform' add/remove if the element has complex abs-pos container structure. r=mats
--HG--
extra : rebase_source : 4a1b57df9146a31ce8e25a7b215d2eb1edb09a55
2014-01-16 14:39:30 +13:00
Jonathan Kew 954a119d07 bug 735577 - pt 3.2 - update the rest of layout code to use the new accessors on nsHTMLReflowState. r=smontagu 2013-12-27 17:59:21 +00:00
Robert Longson 2b4ee5d7ba Bug 940193 - rename nsSVGTextFrame2 to SVGTextFrame. r=dholbert
--HG--
rename : layout/svg/nsSVGTextFrame2.cpp => layout/svg/SVGTextFrame.cpp
rename : layout/svg/nsSVGTextFrame2.h => layout/svg/SVGTextFrame.h
2013-12-20 16:38:51 +00:00
Arnaud Bienner 05277c264b Bug 938334 - Use PseudoElementSupportsStyleAttribute(Type) when it makes sense to do so and remove now unnecessary nsCSSPseudoElements functions. r=dbaron 2013-12-02 22:38:45 +01:00
William Chen ad649152bc Bug 929885 - Implement web components ShadowRoot style sheet behavior. r=mrbkap 2013-12-02 02:26:12 -08:00
Cameron McCormack 7e881fe646 Bug 922669 - Part 9: Restyle pseudo-elements when their content state changes. r=bz 2013-11-28 17:46:40 +11:00
Cameron McCormack c350837b66 Bug 922669 - Part 4: Pass in anonymous content nodes when restyling any pseudo-elements that can match user action pseudo-classes. r=bz 2013-11-28 17:46:38 +11:00
Cameron McCormack b22badd223 Bug 943746 - Choose a better default element when calling ElementForStyleContext for a pseudo-element. r=bz 2013-11-28 12:22:20 +11:00
Jonathan Watt f8dfb4d33f Bug 635240 - Implementation of the layout and anonymous shadow tree portion of <input type=number>. r=dholbert 2013-09-04 11:30:36 +01:00
Jonathan Watt 99e5777279 Bug 889736, part 2 - Remove nsSVGTextPathFrame. r=heycam 2013-11-18 14:29:52 +00:00
Jonathan Watt a2e2acfb91 Bug 889736, part 1 - Remove nsSVGTextFrame and nsSVGGlyphFrame. r=heycam 2013-11-18 14:29:51 +00:00
Robert O'Callahan 8cf17406d8 Bug 876321. Track restyling of top/left/right/bottom and treat such nodes as active scrolled roots. r=mattwoodrow
--HG--
extra : rebase_source : 24e7900efdb476a0533808956b9604d144e4db89
2013-09-09 17:08:41 -07:00
Cameron McCormack 2a2711ccb3 Bug 933044 - Push style scopes even if we would skip pushing ancestors when there is no ancestor filter. r=bz 2013-11-17 17:51:04 +11:00
Corey Ford 1da3373a87 Bug 925259: Avoid sticky positioning inner table elements. r=dholbert 2013-11-12 12:46:47 -08:00
Robert O'Callahan 676f5de36e Backout changeset 3fb9ea77d858 for bug 876321 due to test failures (CLOSED TREE)
--HG--
extra : rebase_source : 6b21bf36f9a8bd73bdd72ddfb5fe8c25e7854071
2013-11-03 23:14:26 -08:00
Robert O'Callahan e16db34522 Bug 876321. Track restyling of top/left/right/bottom and treat such nodes as active scrolled roots. r=mattwoodrow
--HG--
extra : rebase_source : f92bcf0b60cadefa0197cdffcd6dd9b4eaa6b2d5
2013-09-09 17:08:41 -07:00
Robert O'Callahan 9e62a53158 Bug 745485. Optimize positioning offset changes whenever the computed size does not change. r=dholbert
--HG--
extra : rebase_source : 16388d3cb0c6ee9acc1416ca0d27b2a53b0062ee
2013-09-09 17:08:41 -07:00
Robert O'Callahan 62b7c5862c Bug 911889. Part 2: Refactor MarkLayersActive code into its own class and be much more explicit about what it does. r=mattwoodrow
This also changes the functionality a little bit to track independent
per-property mutation counts and independent "content active" status.
2013-09-04 23:30:57 +12:00
Phil Ringnalda fb73812f4a Back out 0a88dee3b92b:dc5cc7d7b84d (bug 911889) for beaucoup unexpected assertions
--HG--
extra : rebase_source : a2a13633b6028c99a3c732dbbafe8c800bc32071
2013-10-28 23:38:02 -07:00
Robert O'Callahan 7633c2c898 Bug 911889. Part 2: Refactor MarkLayersActive code into its own class and be much more explicit about what it does. r=mattwoodrow
This also changes the functionality a little bit to track independent
per-property mutation counts and independent "content active" status.

--HG--
extra : rebase_source : e69b8e7a95d36720bd38d74f0789ede603e58a09
2013-09-04 23:30:57 +12:00
Daniel Holbert cfc09cb4b1 Bug 875275 part 3: Make nsColorControlFrame inherit from nsHTMLButtonControlFrame instead of nsBlockFrame. r=jwatt f=arnaud.bienner 2013-10-22 17:29:20 +02:00
Arnaud Bienner 574b47d090 Bug 875275 part 1: Implement layout support for <input type="color">. r=dbaron,dholbert 2013-07-10 00:25:27 +02:00
Ehsan Akhgari 77b5078c36 Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1782 to 1582.
2013-10-01 17:00:38 -04:00
Ehsan Akhgari 290feb1ade Bug 921876 - Stop #including nsIFrame.h in nsLayoutUtils.h; r=roc
This patch does the following:
* Move nsIFrame::IntrinsicSize to mozilla::IntrinsicSize so that it can
  be forward-declared.
* Move a number of templated inline nsLayoutUtils methods to nsIFrame.
* Use mozilla::layout::FrameChildListID instead of the
  nsIFrame::ChildListID typedef in nsLayoutUtils.h.
* Move nsReflowFrameRunnable to its only user, nsProgressMeterFrame.cpp.
* Make a number of functions requiring nsIFrame.h out-of-line.
* Remove the nsIFrame.h #include from nsLayoutUtils.h and add it to the
  places which require it implicitly.
2013-09-30 17:26:04 -04:00
L. David Baron d01753dad0 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 36acc15f31 Bug 828312 patch 10: Add assertions to check that handling of nsChangeHint_ChildrenOnlyTransform doesn't need to check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:08 -07:00
L. David Baron 4e703ff333 Bug 828312 patch 9b: Make handling of RecomputePosition hint check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:08 -07:00
L. David Baron 95e754510e Bug 828312 patch 8: Make handling of UpdateEffects hint check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:07 -07:00
L. David Baron 82151d1958 Bug 828312 patch 7: Use more typical loop structure and don't mutate |frame| in UpdateOverflow hint handling. r=bzbarsky 2013-09-25 12:28:07 -07:00
L. David Baron b741eb1e7b Bug 828312 patch 6: Make early transform handling check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:07 -07:00
L. David Baron ee558d6e79 Bug 828312 patch 5: Don't handle UpdateCursor more than once per round of style change processing, since it's global. r=bzbarsky
(This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.  In this case, however, the
change hint only needs to apply once, globally.)
2013-09-25 12:28:07 -07:00
L. David Baron e1a486d3f2 Bug 898209 patch 16: Move a comment that should have been moved in patch 15. No review. 2013-09-25 12:28:07 -07:00
L. David Baron c18e1d2515 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
L. David Baron 38a76e02ae Bug 898333, patch 1: Restyle the :after pseudo-element after the content children. r=bzbarsky 2013-09-25 12:28:07 -07:00
Corey Ford 7597b90beb Bug 904197 - Use the union of continuations' rects in sticky positioning calculations. r=dholbert
Reftest inline-3.html fails because handling the sticky element's margin correctly will take more work; similarly, border/padding on containing-block continuations won't be handled quite right. Reftest column-contain-1a fails because some of the anonymous blocks inside an nsColumnSetFrame have 0 height.
2013-09-13 16:53:48 -07:00
Corey Ford fecfb82b09 Bug 886646 - Part 6: Implement sticky positioning, calculated on reflow and scroll. r=dbaron, r=dholbert 2013-09-06 09:35:16 -04:00
Ms2ger 682a633069 Bug 901269 - Part b: Stop including nsContentUtils.h in Element.h; r=jlebar 2013-08-14 08:55:46 +02:00
Corey Ford 9adda71475 Bug 898794 - Store normal frame position before applying relative positioning. r=dbaron 2013-08-08 17:20:17 -07:00
Cameron McCormack ad5ce3ee02 Bug 899894 - Don't null check nsStyleSet::ResolveBlah return values. r=dbaron 2013-08-03 14:11:06 +10:00
Alex Xu 8a51ad6d90 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 4630a79d76 Bug 898329 patch 10: Fix wrapping of comment that I just reintended. r=heycam 2013-07-30 17:36:12 -07:00
L. David Baron e858f28bd5 Bug 898329 patch 9: Fix indentation from previous patches. r=heycam 2013-07-30 17:36:12 -07:00
L. David Baron d65b631606 Bug 898329 patch 8: Use for loops instead of while loops for iterating extra style contexts. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron 15b84a4c52 Bug 898329 patch 7: Split ElementRestyler::Restyle into multiple functions. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron 8a822d1d0f Bug 898329 patch 6: Avoid using pseudoTag outside of what will be in RestyleManager::RestyleSelf. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron 20d571f36c Bug 898329 patch 5: Create and use ElementRestyler::mResolvedChild. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron fe162ae7d7 Bug 898329 patch 4: Avoid using newContext outside of what will be in RestyleManager::RestyleSelf. r=heycam
This replaces newContext with mFrame->StyleContext(), which is a valid
replacement since all of the replacements are inside a test that we
don't have a framechange hint.  If we have a framechange hint, then
mFrame still has its old style context.
2013-07-30 17:36:11 -07:00
L. David Baron bc4b860554 Bug 898329 patch 3.5: Don't check undisplayed content if we're going to reframe. r=heycam
This avoids doing work that is unnecessary; if we're going to reframe
anyway, the frame destruction will clear the undisplayed content list,
and we'll then rebuild it when we recreate the frame (if needed).

It is also a prerequisite for patch 4, which replaces some uses of
newContext with mFrame->StyleContext().  These are the same as long as
we don't have a framechange hint, since when we do have a framechange
hint we leave the old style context on the frame to avoid violating
invariants.  This patch ensures that all such uses replaced in patch 4
are actually inside a check that we don't have a framechange hint.
(Most of them already were.)
2013-07-30 17:36:11 -07:00
L. David Baron 099ddebdb4 Bug 898329 patch 3: Create and use ElementRestyler::mWasFrameVisible. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron 08f05b299b Bug 898329 patch 2: Fix indentation in ReParentStyleContext from patch 1. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron c6b0925b11 Bug 898329 patch 1: Remove null-checks on oldContext and newContext and avoid manual reference counting. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron f14c99b5b7 Bug 898209 patch 15: Use constructor flags on ElementRestyler's regular constructor to avoid manipulating mHintsHandled from the outside. r=heycam
This is the second of two patches added on top to address review
comments on patch 2.
2013-07-30 17:36:10 -07:00
L. David Baron 2483ea2e02 Bug 898209 patch 14: Add constructor flags to ElementRestyler's regular constructor so we can avoid manipulating mHintsHandled from the outside. r=heycam
This is the first of two patches added on top to address review comments
on patch 2.
2013-07-30 17:36:10 -07:00
L. David Baron 7b58599cf0 Bug 898209 patch 13: Create and use ElementRestyler::mTreeMatchContext. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron 404c7c2333 Bug 898209 patch 12: Create and use ElementRestyler::mVisibleKidsOfHiddenElement. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron cdecdd4413 Bug 898209 patch 11: Create and use member variables for accessibility notifications. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron 53a139827c Bug 898209 patch 10: Create and use ElementRestyler::mRestyleTracker. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron bec12fb9f3 Bug 898209 patch 9: Create and use ElementRestyler::mParentFrameHintsNotHandledForDescendants and mHintsNotHandledForDescendants. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron 82a0a650a6 Bug 898209 patch 8: Create and use ElementRestyler::mChangeList. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron 8340d616ac Bug 898209 patch 7: Fix remaining variable shadowing warning. r=heycam 2013-07-30 17:36:10 -07:00
L. David Baron d81ab3552b Bug 898209 patch 6: Create and use ElementRestyler::mParentContent and mContent. r=heycam 2013-07-30 17:36:09 -07:00
L. David Baron 9925459f0e Bug 898209 patch 5: Remove the localContent variable in favor of writing mFrame->GetContent(). r=heycam 2013-07-30 17:36:09 -07:00
L. David Baron a413b968a0 Bug 898209 patch 4: Remove aPresContext parameter to ElementRestyler::Restyle. r=heycam 2013-07-30 17:36:09 -07:00
L. David Baron 9b61f8671b Bug 898209 patch 3: Create and use ElementRestyler::mFrame. r=heycam 2013-07-30 17:36:09 -07:00
L. David Baron ca739cf173 Bug 898209 patch 2: Create and use ElementRestyler::mHintsHandled. r=heycam 2013-07-30 17:36:09 -07:00
L. David Baron 6b056b0c80 Bug 898209 patch 1: Add ElementRestyler class to begin refactoring ReResolveStyleContext. r=heycam 2013-07-30 17:36:09 -07:00
L. David Baron ffe927da2c Bug 896138 patch 10: Move beginning and ending of ProcessPendingRestyles into helper functions on the RestyleManager. r=heycam 2013-07-30 17:36:08 -07:00
Ehsan Akhgari 2824b29025 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Corey Ford 7df9a3d1f1 Bug 894629 - Reference containing block's content box for relatively positioned elements in RestyleManager::RecomputePosition. r=dbaron 2013-07-22 09:28:31 -07:00
Robert O'Callahan 7a84d00a9a Fix bustage for bug 886295 2013-07-22 16:30:18 +12:00
Robert O'Callahan 55bf3f0888 Bug 886295. Backout fix for bug 880854 to fix regression. r=mats
--HG--
extra : rebase_source : 66bc089c3ece4dbe4f6533fce97a902abdd4871a
2013-07-22 14:04:46 +12:00
L. David Baron a643510184 Bug 896138 patch 9: Move RecomputePosition to a more logical place in the .cpp file, near other hint handling implementations. No review. 2013-07-20 12:14:25 -07:00
L. David Baron 2e0c82c9c0 Bug 896138 patch 7: Remove unused aFrameManager parameters to some functions. r=heycam 2013-07-20 12:14:25 -07:00
L. David Baron 539703de44 Bug 896138 patch 6: Move restyle management code from nsFrameManager to RestyleManager. r=heycam
This is the second of two big chunks of code moved into the new
RestyleManager class from another sources.

Note that the undisplayed map remains in nsFrameManager, although it
could perhaps have moved.
2013-07-20 12:14:25 -07:00
L. David Baron a7c8d44db9 Bug 896138 patch 4: Move restyle management code from nsCSSFrameConstructor to RestyleManager. r=heycam
This moves restyling management out of nsCSSFrameConstructor (thus
reducing its size), and keeps the restyling code closer together.

This is the first of two big chunks of code moved in this patch series.
A later patch in this series will move related code from nsFrameManager
into the same destination file.
2013-07-20 12:14:25 -07:00
L. David Baron 62621bb025 Bug 896138 patch 2: Add a RestyleManager class. r=heycam
The later patches in this series will move restyling code into this file
from nsCSSFrameConstructor and nsFrameManager.
2013-07-20 12:14:24 -07:00