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
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.
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.
(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.)
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.
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.
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.
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.)