This patch:
- Creates an anon-box pseudo-style for PrintedSheetFrame, in part so that it
can co-opt the styles that we formerly gave to page-frames in ua.css, to draw
the sheet of paper and the shadow in Print Preview.
- Adjusts nsCSSFrameConstructor to create a PrintedSheetFrame as the parent of
nsPageFrame (inserting between it and its nsPageSequenceFrame container, in
the frame tree).
- Fleshes out out a simple BuildDisplayList() implementation for
PrintedSheetFrame (taking the responsibility for "paper"-drawing from
nsPageFrame).
- Fleshes out a simple Reflow implementation for PrintedSheetFrame, just
placing the child page (assuming there's only one for now) at the origin.
- Adjusts nsPageFrame and nsPageSequenceFrame to account for the fact that
there's another layer between them now.
Note that PrintedSheetFrame needs to implement AppendDirectlyOwnedAnonBoxes()
(just as nsSimplePageSequence and nsPageFrame do), since it owns anonymous
nsPageFrame instances. This implementation only needs to append the first
child, as explained in the code-comment and in
https://bugzilla.mozilla.org/show_bug.cgi?id=1374761#c9 (and of course, for
now, PrintedSheetFrame only has one child at a time anyway.)
Differential Revision: https://phabricator.services.mozilla.com/D83457
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.
Differential Revision: https://phabricator.services.mozilla.com/D83140
We were dealing with it correctly when switching display from e.g. block
to inline, or such. But we were not dealing with it when the node was
undisplayed.
Handle it properly, and free one frame bit while at it. We can't really
do this for ManualNAC (the editor resizers) because they request a
reframe explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D76679
Both PresShell() and PresContext() are cached in nsIFrame. This
simplifies the setup for the callers to
nsCSSFrameConstructor::CreateContinuingFrame().
Differential Revision: https://phabricator.services.mozilla.com/D66600
--HG--
extra : moz-landing-system : lando
There is no way this ever properly worked, as we always passed null for
`aFrameState`.
So it'd only work if we reframed the document element or such... Which is not
amazing.
For simpler test-cases, when we don't construct the scrollframe via
PresShell::Initialize, but via the regular frame constructor updates
(ContentAppended, etc...), those end up working because we go through lazy frame
construction, which ends up in RecreateFramesForContent, which passes
mTempFrameTreeState.
Differential Revision: https://phabricator.services.mozilla.com/D59569
--HG--
extra : moz-landing-system : lando
For BeginBuildingColumns, returning nsBlockFrame, i.e. the original
NS_NewColumnSetWrapperFrame's return type, should be sufficient since no
other caller in frame constructor needs to call ColumnSetWrapper's
methods.
Differential Revision: https://phabricator.services.mozilla.com/D58398
--HG--
extra : moz-landing-system : lando
The only caller SetRootElementFrameAndConstructCanvasAnonContent()
already passes nsContainerFrame* to aFrame.
A minor cleanup discovered while working on this bug.
Differential Revision: https://phabricator.services.mozilla.com/D48943
--HG--
extra : moz-landing-system : lando
I'm not happy about all the SVG text / disallow out of flow complexity sprinkled
during frame construction... :(
Maybe we should add some kind of more generic mechanism to disallow some
children for particular kinds of frames, or something.
Co-authored-by: Mats Palmgren <mats@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D44808
--HG--
extra : moz-landing-system : lando
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.
Depends on D45612
Differential Revision: https://phabricator.services.mozilla.com/D45613
--HG--
extra : moz-landing-system : lando
Also move the duplicate logic for reframing MathML in ContentAppended()
and ContentRangeInserted() into WipeInsertionParent().
Differential Revision: https://phabricator.services.mozilla.com/D38417
--HG--
extra : moz-landing-system : lando
I thought I was going to need it but turns out I don't. Still this is worth it I
think.
Differential Revision: https://phabricator.services.mozilla.com/D31987
--HG--
extra : moz-landing-system : lando
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead. So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).
Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.
Differential Revision: https://phabricator.services.mozilla.com/D27476
--HG--
extra : moz-landing-system : lando
In order to get rid of nsFrameItems::AddChild() and use
nsFrameList::AppendFrame() instead, we need to keep table captions'
parent to be nsTableFrame when they're created (no adjust in
ConstructFramesFromItem) so that their parent remain the same as other
frames in the table when appending into the temporary aFrameItems.
We then adjust captions' parent right before we call
SetInitialChildList()/AppendFrames/InsertFrames().
Also, pass nullptr to AppendFrames() in
nsTableWrapperFrame::AppendFrames() because callers should already set
captions' parent frame properly. No need to reparent them again.
Differential Revision: https://phabricator.services.mozilla.com/D25335
--HG--
extra : moz-landing-system : lando
After supporting column-span, the top-level container for multicol
layout is no longer the ColumnSetFrame, so remove the "SET" suffix from
FCDATA_ALLOW_GRID_FLEX_COLUMNSET bit to make it sound more general.
Also, update the document and add an assertion.
Differential Revision: https://phabricator.services.mozilla.com/D24394
--HG--
extra : moz-landing-system : lando
aFrameList can contain placeholder frames. If we decide to nuke
aFrameList, we need to destroy the out-of-flow frames gracefully.
In this case, out-of-flow frames are still in nsFrameConstructorState's
absolute item lists. To rely on nsPlaceholderFrame::DestroyFrom() to
remove its out-of-flow frame properly, we manually flush all the frame
insertions for all the lists in aState before destroying aFrameList.
Differential Revision: https://phabricator.services.mozilla.com/D19460
--HG--
extra : moz-landing-system : lando
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.
This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.
Can't wait for XUL trees to die.
Depends on D19001
Differential Revision: https://phabricator.services.mozilla.com/D19002
--HG--
extra : moz-landing-system : lando