Permalink
Browse files

Backout bug 157681 in order to fix bug 775350 on Beta; a=lsblakk

  • Loading branch information...
1 parent 589fce8 commit d9198874e0b4884d09e8b9a066d4117383ebcd98 @ehsan ehsan committed Sep 26, 2012
Showing with 61 additions and 2,756 deletions.
  1. +1 −152 layout/base/nsCSSFrameConstructor.cpp
  2. +0 −5 layout/base/nsCSSFrameConstructor.h
  3. +1 −31 layout/base/nsChangeHint.h
  4. +4 −1 layout/base/nsFrameManager.cpp
  5. +29 −36 layout/generic/nsHTMLReflowState.cpp
  6. +5 −7 layout/generic/nsHTMLReflowState.h
  7. +0 −10 layout/reftests/position-dynamic-changes/handleprop.js
  8. +0 −62 layout/reftests/position-dynamic-changes/horizontal/animate.js
  9. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftA-widthA-rightN.html
  10. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftA-widthN-rightA.html
  11. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftA-widthN-rightN.html
  12. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftN-widthA-rightA-2.html
  13. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftN-widthA-rightA.html
  14. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftN-widthA-rightN-2.html
  15. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftN-widthA-rightN.html
  16. +0 −19 layout/reftests/position-dynamic-changes/horizontal/fromauto-leftN-widthN-rightA.html
  17. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftA-widthA-rightN-ref.html
  18. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftA-widthA-rightN.html
  19. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftA-widthN-rightA-ref.html
  20. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftA-widthN-rightA.html
  21. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftA-widthN-rightN-ref.html
  22. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftA-widthN-rightN.html
  23. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightA-2-ref.html
  24. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightA-2.html
  25. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightA-ref.html
  26. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightA.html
  27. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightN-2-ref.html
  28. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightN-2.html
  29. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightN-ref.html
  30. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftN-widthA-rightN.html
  31. +0 −15 layout/reftests/position-dynamic-changes/horizontal/leftN-widthN-rightA-ref.html
  32. +0 −19 layout/reftests/position-dynamic-changes/horizontal/leftN-widthN-rightA.html
  33. +0 −18 layout/reftests/position-dynamic-changes/horizontal/reftest.list
  34. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_border_abspos.list
  35. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_border_parent.list
  36. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_margin_abspos.list
  37. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_margin_parent.list
  38. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_padding_abspos.list
  39. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_padding_parent.list
  40. +0 −26 layout/reftests/position-dynamic-changes/horizontal/reftest_plain.list
  41. +0 −20 layout/reftests/position-dynamic-changes/horizontal/style.css
  42. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftA-widthA-rightN-ref.html
  43. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftA-widthA-rightN.html
  44. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftA-widthN-rightA-ref.html
  45. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftA-widthN-rightA.html
  46. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftA-widthN-rightN-ref.html
  47. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftA-widthN-rightN.html
  48. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightA-2-ref.html
  49. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightA-2.html
  50. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightA-ref.html
  51. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightA.html
  52. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightN-2-ref.html
  53. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightN-2.html
  54. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightN-ref.html
  55. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthA-rightN.html
  56. +0 −15 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthN-rightA-ref.html
  57. +0 −19 layout/reftests/position-dynamic-changes/horizontal/toauto-leftN-widthN-rightA.html
  58. +0 −10 layout/reftests/position-dynamic-changes/max-width-ref.html
  59. +0 −17 layout/reftests/position-dynamic-changes/max-width.html
  60. +0 −13 layout/reftests/position-dynamic-changes/min-width-ref.html
  61. +0 −20 layout/reftests/position-dynamic-changes/min-width.html
  62. +0 −21 layout/reftests/position-dynamic-changes/mixed-abspos-root/mixed-dimentionA-ref.html
  63. +0 −38 layout/reftests/position-dynamic-changes/mixed-abspos-root/mixed-dimentionA.html
  64. +0 −21 layout/reftests/position-dynamic-changes/mixed-abspos-root/mixed-dimentionN-ref.html
  65. +0 −38 layout/reftests/position-dynamic-changes/mixed-abspos-root/mixed-dimentionN.html
  66. +0 −18 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest.list
  67. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_border_abspos.list
  68. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_border_parent.list
  69. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_margin_abspos.list
  70. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_margin_parent.list
  71. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_padding_abspos.list
  72. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_padding_parent.list
  73. +0 −4 layout/reftests/position-dynamic-changes/mixed-abspos-root/reftest_plain.list
  74. +0 −22 layout/reftests/position-dynamic-changes/mixed-abspos-root/style.css
  75. +0 −23 layout/reftests/position-dynamic-changes/mixed/mixed-dimentionA-ref.html
  76. +0 −40 layout/reftests/position-dynamic-changes/mixed/mixed-dimentionA.html
  77. +0 −23 layout/reftests/position-dynamic-changes/mixed/mixed-dimentionN-ref.html
  78. +0 −40 layout/reftests/position-dynamic-changes/mixed/mixed-dimentionN.html
  79. +0 −18 layout/reftests/position-dynamic-changes/mixed/reftest.list
  80. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_border_abspos.list
  81. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_border_parent.list
  82. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_margin_abspos.list
  83. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_margin_parent.list
  84. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_padding_abspos.list
  85. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_padding_parent.list
  86. +0 −4 layout/reftests/position-dynamic-changes/mixed/reftest_plain.list
  87. +0 −22 layout/reftests/position-dynamic-changes/mixed/style.css
  88. +0 −15 layout/reftests/position-dynamic-changes/multiple-changes-ref.html
  89. +0 −23 layout/reftests/position-dynamic-changes/multiple-changes.html
  90. +0 −10 layout/reftests/position-dynamic-changes/reftest.list
  91. +0 −32 layout/reftests/position-dynamic-changes/relative/animate.js
  92. +0 −12 layout/reftests/position-dynamic-changes/relative/move-right-bottom-ref.html
  93. +0 −13 layout/reftests/position-dynamic-changes/relative/move-right-bottom-table-ref.html
  94. +0 −17 layout/reftests/position-dynamic-changes/relative/move-right-bottom-table.html
  95. +0 −16 layout/reftests/position-dynamic-changes/relative/move-right-bottom.html
  96. +0 −12 layout/reftests/position-dynamic-changes/relative/move-top-left-ref.html
  97. +0 −13 layout/reftests/position-dynamic-changes/relative/move-top-left-table-ref.html
  98. +0 −17 layout/reftests/position-dynamic-changes/relative/move-top-left-table.html
  99. +0 −16 layout/reftests/position-dynamic-changes/relative/move-top-left.html
  100. +0 −2 layout/reftests/position-dynamic-changes/relative/reftest.list
  101. +0 −9 layout/reftests/position-dynamic-changes/relative/style.css
  102. +0 −24 layout/reftests/position-dynamic-changes/shrink-wrap-ref.html
  103. +0 −17 layout/reftests/position-dynamic-changes/shrink-wrap.html
  104. +0 −61 layout/reftests/position-dynamic-changes/vertical/animate.js
  105. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topA-heightA-bottomN.html
  106. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topA-heightN-bottomA.html
  107. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topA-heightN-bottomN.html
  108. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topN-heightA-bottomA-2.html
  109. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topN-heightA-bottomA.html
  110. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topN-heightA-bottomN-2.html
  111. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topN-heightA-bottomN.html
  112. +0 −19 layout/reftests/position-dynamic-changes/vertical/fromauto-topN-heightN-bottomA.html
  113. +0 −18 layout/reftests/position-dynamic-changes/vertical/reftest.list
  114. +0 −12 layout/reftests/position-dynamic-changes/vertical/reftest.listbackup
  115. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_border_abspos.list
  116. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_border_parent.list
  117. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_margin_abspos.list
  118. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_margin_parent.list
  119. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_padding_abspos.list
  120. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_padding_parent.list
  121. +0 −20 layout/reftests/position-dynamic-changes/vertical/reftest_plain.list
  122. +0 −19 layout/reftests/position-dynamic-changes/vertical/style.css
  123. +0 −15 layout/reftests/position-dynamic-changes/vertical/toauto-topA-heightA-bottomN-ref.html
  124. +0 −19 layout/reftests/position-dynamic-changes/vertical/toauto-topA-heightA-bottomN.html
  125. +0 −15 layout/reftests/position-dynamic-changes/vertical/toauto-topA-heightN-bottomA-ref.html
  126. +0 −19 layout/reftests/position-dynamic-changes/vertical/toauto-topA-heightN-bottomA.html
  127. +0 −15 layout/reftests/position-dynamic-changes/vertical/toauto-topA-heightN-bottomN-ref.html
  128. +0 −19 layout/reftests/position-dynamic-changes/vertical/toauto-topA-heightN-bottomN.html
  129. +0 −15 layout/reftests/position-dynamic-changes/vertical/toauto-topN-heightA-bottomA-ref.html
  130. +0 −19 layout/reftests/position-dynamic-changes/vertical/toauto-topN-heightA-bottomA.html
  131. +0 −15 layout/reftests/position-dynamic-changes/vertical/toauto-topN-heightA-bottomN-ref.html
  132. +0 −19 layout/reftests/position-dynamic-changes/vertical/toauto-topN-heightA-bottomN.html
  133. +0 −15 layout/reftests/position-dynamic-changes/vertical/toauto-topN-heightN-bottomA-ref.html
  134. +0 −19 layout/reftests/position-dynamic-changes/vertical/toauto-topN-heightN-bottomA.html
  135. +0 −15 layout/reftests/position-dynamic-changes/vertical/topA-heightA-bottomN-ref.html
  136. +0 −19 layout/reftests/position-dynamic-changes/vertical/topA-heightA-bottomN.html
  137. +0 −15 layout/reftests/position-dynamic-changes/vertical/topA-heightN-bottomA-ref.html
  138. +0 −19 layout/reftests/position-dynamic-changes/vertical/topA-heightN-bottomA.html
  139. +0 −15 layout/reftests/position-dynamic-changes/vertical/topA-heightN-bottomN-ref.html
  140. +0 −19 layout/reftests/position-dynamic-changes/vertical/topA-heightN-bottomN.html
  141. +0 −15 layout/reftests/position-dynamic-changes/vertical/topN-heightA-bottomA-ref.html
  142. +0 −19 layout/reftests/position-dynamic-changes/vertical/topN-heightA-bottomA.html
  143. +0 −15 layout/reftests/position-dynamic-changes/vertical/topN-heightA-bottomN-ref.html
  144. +0 −19 layout/reftests/position-dynamic-changes/vertical/topN-heightA-bottomN.html
  145. +0 −15 layout/reftests/position-dynamic-changes/vertical/topN-heightN-bottomA-ref.html
  146. +0 −19 layout/reftests/position-dynamic-changes/vertical/topN-heightN-bottomA.html
  147. +0 −4 layout/reftests/reftest.list
  148. +1 −9 layout/style/nsStyleContext.cpp
  149. +20 −25 layout/style/nsStyleStruct.cpp
@@ -85,8 +85,6 @@
#include "mozilla/dom/Element.h"
#include "FrameLayerBuilder.h"
#include "nsAutoLayoutPhase.h"
-#include "nsCSSRenderingBorders.h"
-#include "nsRenderingContext.h"
#include "nsStyleStructInlines.h"
#ifdef MOZ_XUL
@@ -8045,7 +8043,6 @@ nsCSSFrameConstructor::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
while (0 <= --index) {
nsIFrame* frame;
nsIContent* content;
- bool didReflowThisFrame = false;
nsChangeHint hint;
aChangeList.ChangeAt(index, frame, content, hint);
@@ -8098,25 +8095,17 @@ nsCSSFrameConstructor::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
if (hint & nsChangeHint_NeedReflow) {
StyleChangeReflow(frame, hint);
didReflow = true;
- didReflowThisFrame = true;
}
if (hint & (nsChangeHint_RepaintFrame | nsChangeHint_SyncFrameView |
nsChangeHint_UpdateOpacityLayer | nsChangeHint_UpdateTransformLayer |
nsChangeHint_ChildrenOnlyTransform)) {
ApplyRenderingChangeToTree(presContext, frame, hint);
didInvalidate = true;
}
- if ((hint & nsChangeHint_RecomputePosition) && !didReflowThisFrame) {
- // It is possible for this to fall back to a reflow
- if (!RecomputePosition(frame)) {
- didReflow = true;
- didReflowThisFrame = true;
- }
- }
NS_ASSERTION(!(hint & nsChangeHint_ChildrenOnlyTransform) ||
(hint & nsChangeHint_UpdateOverflow),
"nsChangeHint_UpdateOverflow should be passed too");
- if ((hint & nsChangeHint_UpdateOverflow) && !didReflowThisFrame) {
+ if ((hint & nsChangeHint_UpdateOverflow) && !didReflow) {
if (hint & nsChangeHint_ChildrenOnlyTransform) {
// When we process restyle events starting from the root of the frame
// tree, we start at a ViewportFrame and traverse down the tree from
@@ -12420,143 +12409,3 @@ Iterator::DeleteItemsTo(const Iterator& aEnd)
delete item;
} while (*this != aEnd);
}
-
-bool
-nsCSSFrameConstructor::RecomputePosition(nsIFrame* aFrame)
-{
- // Don't process position changes on table frames, since we already handle
- // the dynamic position change on the outer table frame, and the reflow-based
- // fallback code path also ignores positions on inner table frames.
- if (aFrame->GetType() == nsGkAtoms::tableFrame) {
- return true;
- }
-
- // Don't process position changes on frames which have views or the ones which
- // have a view somewhere in their descendants, because the corresponding view
- // needs to be repositioned properly as well.
- if (aFrame->HasView() ||
- (aFrame->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW)) {
- StyleChangeReflow(aFrame, nsChangeHint_NeedReflow);
- return false;
- }
-
- const nsStyleDisplay* display = aFrame->GetStyleDisplay();
- // Changes to the offsets of a non-positioned element can safely be ignored.
- if (display->mPosition == NS_STYLE_POSITION_STATIC) {
- return true;
- }
-
- // For relative positioning, we can simply update the frame rect
- if (display->mPosition == NS_STYLE_POSITION_RELATIVE) {
- nsIFrame* cb = aFrame->GetContainingBlock();
- const nsSize size = cb->GetSize();
- const nsPoint oldOffsets = aFrame->GetRelativeOffset();
- nsMargin newOffsets;
-
- // Invalidate the old rect
- aFrame->InvalidateOverflowRect();
-
- // Move the frame
- nsHTMLReflowState::ComputeRelativeOffsets(
- cb->GetStyleVisibility()->mDirection,
- aFrame, size.width, size.height, newOffsets);
- NS_ASSERTION(newOffsets.left == -newOffsets.right &&
- newOffsets.top == -newOffsets.bottom,
- "ComputeRelativeOffsets should return valid results");
- aFrame->SetPosition(aFrame->GetPosition() - oldOffsets +
- nsPoint(newOffsets.left, newOffsets.top));
-
- // Invalidate the new rect
- aFrame->InvalidateFrameSubtree();
-
- return true;
- }
-
- // For absolute positioning, the width can potentially change if width is
- // auto and either of left or right are not. The height can also potentially
- // change if height is auto and either of top or bottom are not. In these
- // cases we fall back to a reflow, and in all other cases, we attempt to
- // move the frame here.
- // Note that it is possible for the dimensions to not change in the above
- // cases, so we should be a little smarter here and only fall back to reflow
- // when the dimensions will really change (bug 745485).
- const nsStylePosition* position = aFrame->GetStylePosition();
- if (position->mWidth.GetUnit() != eStyleUnit_Auto &&
- position->mHeight.GetUnit() != eStyleUnit_Auto) {
- // For the absolute positioning case, set up a fake HTML reflow state for
- // the frame, and then get the offsets from it.
- nsRefPtr<nsRenderingContext> rc = aFrame->PresContext()->GetPresShell()->
- GetReferenceRenderingContext();
-
- // Construct a bogus parent reflow state so that there's a usable
- // containing block reflow state.
- nsIFrame *parentFrame = aFrame->GetParent();
- nsSize parentSize = parentFrame->GetSize();
-
- nsFrameState savedState = parentFrame->GetStateBits();
- nsHTMLReflowState parentReflowState(aFrame->PresContext(), parentFrame,
- rc, parentSize);
- parentFrame->RemoveStateBits(~nsFrameState(0));
- parentFrame->AddStateBits(savedState);
-
- NS_WARN_IF_FALSE(parentSize.width != NS_INTRINSICSIZE &&
- parentSize.height != NS_INTRINSICSIZE,
- "parentSize should be valid");
- parentReflowState.SetComputedWidth(NS_MAX(parentSize.width, 0));
- parentReflowState.SetComputedHeight(NS_MAX(parentSize.height, 0));
- parentReflowState.mComputedMargin.SizeTo(0, 0, 0, 0);
- parentSize.height = NS_AUTOHEIGHT;
-
- parentReflowState.mComputedPadding = parentFrame->GetUsedPadding();
- parentReflowState.mComputedBorderPadding =
- parentFrame->GetUsedBorderAndPadding();
-
- nsSize availSize(parentSize.width, NS_INTRINSICSIZE);
-
- nsSize size = aFrame->GetSize();
- nsSize cbSize = aFrame->GetContainingBlock()->GetSize();
- const nsMargin& parentBorder =
- parentReflowState.mStyleBorder->GetComputedBorder();
- cbSize -= nsSize(parentBorder.LeftRight(), parentBorder.TopBottom());
- nsHTMLReflowState reflowState(aFrame->PresContext(), parentReflowState,
- aFrame, availSize, cbSize.width,
- cbSize.height);
-
- // If we're solving for 'left' or 'top', then compute it here, in order to
- // match the reflow code path.
- if (NS_AUTOOFFSET == reflowState.mComputedOffsets.left) {
- reflowState.mComputedOffsets.left = cbSize.width -
- reflowState.mComputedOffsets.right -
- reflowState.mComputedMargin.right -
- size.width -
- reflowState.mComputedMargin.left;
- }
-
- if (NS_AUTOOFFSET == reflowState.mComputedOffsets.top) {
- reflowState.mComputedOffsets.top = cbSize.height -
- reflowState.mComputedOffsets.bottom -
- reflowState.mComputedMargin.bottom -
- size.height -
- reflowState.mComputedMargin.top;
- }
-
- // Invalidate the old rect
- aFrame->InvalidateFrameSubtree();
-
- // Move the frame
- nsPoint pos(parentBorder.left + reflowState.mComputedOffsets.left +
- reflowState.mComputedMargin.left,
- parentBorder.top + reflowState.mComputedOffsets.top +
- reflowState.mComputedMargin.top);
- aFrame->SetPosition(pos);
-
- // Invalidate the new rect
- aFrame->InvalidateFrameSubtree();
-
- return true;
- }
-
- // Fall back to a reflow
- StyleChangeReflow(aFrame, nsChangeHint_NeedReflow);
- return false;
-}
@@ -1642,11 +1642,6 @@ class nsCSSFrameConstructor : public nsFrameManager
nsresult StyleChangeReflow(nsIFrame* aFrame, nsChangeHint aHint);
- // Returns true if this function managed to successfully move a frame, and
- // false if it could not process the position change, and a reflow should
- // be performed instead.
- bool RecomputePosition(nsIFrame* aFrame);
-
//----------------------------------------
// Methods support :first-letter style
@@ -90,42 +90,12 @@ enum nsChangeHint {
nsChangeHint_ChildrenOnlyTransform = 0x1000,
/**
- * The frame's offsets have changed, while its dimensions might have
- * changed as well. This hint is used for positioned frames if their
- * offset changes. If we decide that the dimensions are likely to
- * change, this will trigger a reflow.
- *
- * Note that this should probably be used in combination with
- * nsChangeHint_UpdateOverflow in order to get the overflow areas of
- * the ancestors updated as well.
- */
- nsChangeHint_RecomputePosition = 0x2000,
-
- /**
* Behaves like ReconstructFrame, but only if the frame has descendants
* that are absolutely or fixed position. Use this hint when a style change
* has changed whether the frame is a container for fixed-pos or abs-pos
* elements, but reframing is otherwise not needed.
*/
- nsChangeHint_AddOrRemoveTransform = 0x4000,
-
- /**
- * We have an optimization when processing change hints which prevents
- * us from visiting the descendants of a node when a hint on that node
- * is being processed. This optimization does not apply in some of the
- * cases where applying a hint to an element does not necessarily result
- * in the same hint being handled on the descendants.
- *
- * If you're adding such a hint, you should add your hint to this list.
- */
- nsChangeHint_NonInherited_Hints =
- nsChangeHint_UpdateTransformLayer |
- nsChangeHint_UpdateEffects |
- nsChangeHint_UpdateOpacityLayer |
- nsChangeHint_UpdateOverflow |
- nsChangeHint_ChildrenOnlyTransform |
- nsChangeHint_RecomputePosition |
- nsChangeHint_AddOrRemoveTransform
+ nsChangeHint_AddOrRemoveTransform = 0x2000
};
// Redefine these operators to return nothing. This will catch any use
@@ -1040,7 +1040,10 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
// We need to generate a new change list entry for every frame whose style
// comparision returns one of these hints. These hints don't automatically
// update all their descendant frames.
- aMinChange = NS_SubtractHint(aMinChange, nsChangeHint_NonInherited_Hints);
+ aMinChange = NS_SubtractHint(aMinChange, nsChangeHint_UpdateTransformLayer);
+ aMinChange = NS_SubtractHint(aMinChange, nsChangeHint_UpdateOpacityLayer);
+ aMinChange = NS_SubtractHint(aMinChange, nsChangeHint_UpdateOverflow);
+ aMinChange = NS_SubtractHint(aMinChange, nsChangeHint_UpdateEffects);
// It would be nice if we could make stronger assertions here; they
// would let us simplify the ?: expressions below setting |content|
Oops, something went wrong.

0 comments on commit d919887

Please sign in to comment.