This patch adds a menu item in "Toggle" -> "Paged Mode". If the item is
toggled, after finishing loading the document, the document will be
forced into paged mode.
The print settings in `nsLayoutDebuggingTools::SetPagedMode()` are
similar to `setupPrintMode()` in reftest-content.js.
Remove the hack in nsDocumentViewer::InitInternal() because we don't
want to set a new document when mIsPageMode = false.
Differential Revision: https://phabricator.services.mozilla.com/D49993
--HG--
extra : moz-landing-system : lando
The PreFullZoomChange event gives listeners an opportunity to capture
state before the viewport full zoom changes. Responsive Design Mode uses
this to save and later restore the resolution of the RDM pane.
Differential Revision: https://phabricator.services.mozilla.com/D48621
--HG--
extra : moz-landing-system : lando
The PreFullZoomChange event gives listeners an opportunity to capture
state before the viewport full zoom changes. Responsive Design Mode uses
this to save and later restore the resolution of the RDM pane.
Differential Revision: https://phabricator.services.mozilla.com/D48621
--HG--
extra : moz-landing-system : lando
The PreFullZoomChange event gives listeners an opportunity to capture
state before the viewport full zoom changes. Responsive Design Mode uses
this to save and later restore the resolution of the RDM pane.
Differential Revision: https://phabricator.services.mozilla.com/D48621
--HG--
extra : moz-landing-system : lando
For huge sizes we may end up with an unconstrained isize. Just avoid sizing the
window to that.
Differential Revision: https://phabricator.services.mozilla.com/D49062
--HG--
extra : moz-landing-system : lando
In particular, not let ResizeReflow take the old and new size. Most of the
callers pass dummy values anyway.
Instead, use the old size of the layout viewport. This ensures we fire resize
events only if the layout viewport actually changes.
This is important because the first resize of the mobile viewport manager
after a navigation has an "old size" of 0x0, even though the layout viewport
is initialized on presshell initialization to the right size.
Thus, we fire resize events unnecessarily in that case, which is the root cause
for bug 1528052.
To do this, we need to shuffle a bit of code in nsDocumentViewer that deals with
delayed resizes, to set the visible area _and_ invalidate layout, rather than
setting the visible area and _then_ relying on doing a resize reflow.
Further cleanup is possible, though not required for my android resizing fix, so
will do separately.
Differential Revision: https://phabricator.services.mozilla.com/D46944
--HG--
extra : moz-landing-system : lando
Converted the following to StaticPrefs so that we can easily test variations:
NS_GC_DELAY
NS_SHRINK_GC_BUFFERS_DELAY
NS_FIRST_GC_DELAY
NS_FULL_GC_DELAY
NS_INTERSLICE_GC_DELAY
NS_USER_INTERACTION_INTERVAL
Differential Revision: https://phabricator.services.mozilla.com/D43112
--HG--
extra : moz-landing-system : lando
The fixed still worked because we get another SetBounds call right after with the same bounds. But it does mean we are doing some useless invalidation.
Differential Revision: https://phabricator.services.mozilla.com/D42059
--HG--
extra : moz-landing-system : lando
All .xul files have been loading as HTMLDocuments for a few weeks now, so
it should be safe to remove the XULDocument implementation.
Differential Revision: https://phabricator.services.mozilla.com/D41238
--HG--
extra : moz-landing-system : lando
Not happy with all these void pointer stuff, but I think this is slightly nicer
to read.
Also not happy with what clang-format has done to my code ;)
I've removed the comment about zoom because it's not clear to me it is still
relevant, but I've preserved the order because, should we have similar stuff
going on, it seems slightly better, and I'm moderately sure the rest of the
callers don't really care.
I think closures coerced to function pointers are nicer (I considered putting
this on a template or using std::function, maybe, this was less code specially
given some callers of EnumerateExternalResources may or may not be hot...),
but if you want me to keep stuff out of line, or move the whole thing to
std::function<> or templates let me know.
Differential Revision: https://phabricator.services.mozilla.com/D40249
If the subdocument display item gets created when the subdocument doesn't have a root frame it'll be based on the subdocument frame in the parent document. This means that the prescontext pointer on the document viewer of the subdocument can go away without the subdocument display item getting any kind of invalidation. So we make sure the subdocument display item gets rebuilt if that happens. The reason the prescontext pointer is important is that is what nsSubDocumentFrame::GetSubdocumentPresShellForPainting uses (via nsDocShell::GetPresShell) to get the subdocument presshell. So it will fail to get a presshell and RetainedDisplayListBuilder::IncrementSubDocPresShellPaintCount will crash.
Differential Revision: https://phabricator.services.mozilla.com/D39310
--HG--
extra : moz-landing-system : lando
This patch adds the ability to load cross domain iframes in the
background to make the top level documents finish earlier.
This is an experiment feature that we'll keep it disabled by default.
Differential Revision: https://phabricator.services.mozilla.com/D24938
--HG--
extra : moz-landing-system : lando
This code predates our use of a static clone to print. Nowadays we never
navigate in the (dedicated) print preview tab.
Differential Revision: https://phabricator.services.mozilla.com/D34433
--HG--
extra : rebase_source : f4b8c03e0dde5b96e2e848892623e6f88a365095
"Cancelled" sounds like it's a query and should return a bool. In fact this
method sets state in response to a nsIWebBrowserPrint.cancel() being called.
Differential Revision: https://phabricator.services.mozilla.com/D34137
--HG--
extra : rebase_source : 97797d906b84ed18a258881a31722179d50943f7
extra : amend_source : c0e1b61f13b2a8ccaec7cc995841948deabbe041
Make nsIWebBrowserPrint included unconditionally for addressing nsIDocShell.rs build failure.
Remove direct_call of PPrinting and PRemotePrintJob. Their ipdl are built unconditionally, but their derived classes are not built with --disable-printing.
Differential Revision: https://phabricator.services.mozilla.com/D33391
--HG--
extra : moz-landing-system : lando
...and have nsPrintJob::Print use that instead of mOriginalDoc, which we want
to get rid of.
When nsPrintJob::Print is called and mPrtPreview is nullptr, we know that we
have been called to print a page directly without print preview. In that case
we know that we're printing the nsPrintJob's docViewer's document. I.e. the
document of the caller of nsPrintJob::Print. So in this case mOriginalDoc and
the passed doc are always the same thing.
Differential Revision: https://phabricator.services.mozilla.com/D31874
--HG--
extra : rebase_source : 54f3afd8dc51d02ccd19436d39b570f66fa242d7
extra : amend_source : 49fa445dff1d19eb4faee868ddacda76916af778
This stops nsPrintJob::PrintPreview from duplicating work done in
nsDocumentViewer::PrintPreview.
Differential Revision: https://phabricator.services.mozilla.com/D31811
--HG--
extra : rebase_source : 062cbac323a2a1a0bcc85039b3671c650c408efa
extra : amend_source : 39d5b8c316f518aa72d560ae4eeec171561ab8fd
This happens in one test on try server that has some iframes that navigate.
I audited everywhere else that we change the view tree, this seems like the only place it can happen.
Differential Revision: https://phabricator.services.mozilla.com/D31399
--HG--
extra : moz-landing-system : lando