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

1378 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 0023c0c92d Bug 1590185 Part 2 - Support paged mode layout in layout debugger. r=dbaron
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
2019-10-29 19:51:42 +00:00
Brad Werth 0d470caf2a Bug 1561227 Part 1: Make nsDocumentViewer send a new event before setting full zoom levels on the pres contexts. r=emilio
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
2019-10-25 21:05:42 +00:00
Ciure Andrei 706c89437b Backed out 8 changesets (bug 1561227) for causing browser_viewport_resizing_scrollbar.js to permafail CLOSED TREE
Backed out changeset aa00b1b62ea7 (bug 1561227)
Backed out changeset b22440a67078 (bug 1561227)
Backed out changeset 4776cec83ae8 (bug 1561227)
Backed out changeset ac88bbefb95f (bug 1561227)
Backed out changeset aef3cfa2f539 (bug 1561227)
Backed out changeset a3759e1a04e2 (bug 1561227)
Backed out changeset cfcf79794049 (bug 1561227)
Backed out changeset 97be65338edf (bug 1561227)

--HG--
rename : devtools/client/responsive/test/browser/browser_viewport_zoom_toggle.js => devtools/client/responsive/test/browser/browser_toggle_zoom.js
2019-10-26 00:00:48 +03:00
Brad Werth bd10652c59 Bug 1561227 Part 1: Make nsDocumentViewer send a new event before setting full zoom levels on the pres contexts. r=emilio
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
2019-10-24 23:42:50 +00:00
Csoregi Natalia a377414b6d Backed out 8 changesets (bug 1561227) for failures on browser_viewport_resizing_scrollbar.js. CLOSED TREE
Backed out changeset 8117cafb3a20 (bug 1561227)
Backed out changeset 635534927ffc (bug 1561227)
Backed out changeset 693b0dd88f2b (bug 1561227)
Backed out changeset 257bc09f49af (bug 1561227)
Backed out changeset 1b63d555c6c1 (bug 1561227)
Backed out changeset 677da957ddcb (bug 1561227)
Backed out changeset f8b8e593316f (bug 1561227)
Backed out changeset 849e1cf51a8f (bug 1561227)

--HG--
rename : devtools/client/responsive/test/browser/browser_viewport_zoom_toggle.js => devtools/client/responsive/test/browser/browser_toggle_zoom.js
2019-10-25 02:35:11 +03:00
Brad Werth 5338c8acbb Bug 1561227 Part 1: Make nsDocumentViewer send a new event before setting full zoom levels on the pres contexts. r=emilio
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
2019-10-24 16:48:14 +00:00
Emilio Cobos Álvarez 725a18fe38 Bug 1585778 - Validate the input of nsDocumentViewer::GetContentSize to not violate the precondition of PresShell::ResizeReflow. r=dholbert
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
2019-10-12 16:11:32 +00:00
Emilio Cobos Álvarez 848d89d65f Bug 1583534 - Further simplify PresShell::ResizeReflow. r=botond
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
2019-09-25 19:12:44 +00:00
Andrew Creskey 7134be5031 Bug 1575938 Convert dom/JSEnvironment GC timing constants to StaticPref r=edgar
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
2019-08-26 15:51:01 +00:00
Timothy Nikkel 2a4e690cf4 Bug 1574016. Fix logic error in patch from bug 1547277. r=bradwerth
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
2019-08-15 01:28:11 +00:00
Brendan Dahl b474db77c6 Bug 1551344 - Part 1: Remove XULDocument code. r=smaug,Jamie
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
2019-08-09 19:57:50 +00:00
Nika Layzell 143941e2d4 Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-08-08 16:07:12 +00:00
Emilio Cobos Álvarez cd0cc4ccd7 Bug 1570721 - Add a content viewer API to emulate color scheme. r=heycam
MANUAL PUSH: Reordering stacks is a pain (https://bugzilla.mozilla.org/show_bug.cgi?id=1481539)

Differential Revision: https://phabricator.services.mozilla.com/D40250
2019-08-02 15:18:41 +02:00
Emilio Cobos Álvarez 01044d2184 Bug 1570721 - Remove a bit of duplication in nsDocumentViewer.cpp. r=bzbarsky
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
2019-08-02 15:18:30 +02:00
Emilio Cobos Álvarez e288006e4e Bug 1570721 - Simplify emulated medium setup in nsPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D40246
2019-08-02 15:18:19 +02:00
Emilio Cobos Álvarez ef68a372a3 Bug 1570721 - Make nsDocumentViewer::CallChildren callbacks get an nsDocumentViewer rather than an nsIContentViewer. r=bzbarsky
It's the only implementation, and this will simplify future patches.

Differential Revision: https://phabricator.services.mozilla.com/D40279
2019-08-02 15:18:15 +02:00
Timothy Nikkel 674fb7f25d Bug 1565922. When the document viewer loses it prescontext pointer we need to make sure that any potential subdocument display items get rebuilt. r=mattwoodrow
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
2019-07-29 09:56:14 +00:00
Kannan Vijayan 3fb6190ec6 Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D39378

--HG--
extra : moz-landing-system : lando
2019-07-26 16:48:31 +00:00
Ciure Andrei c0756f3389 Backed out 10 changesets (bug 1523638) for causing high frequency Android 7.0 mochitests failures CLOSED TREE
Backed out changeset 644ceb2fe568 (bug 1523638)
Backed out changeset 27647ee7a927 (bug 1523638)
Backed out changeset 96f1ccb95570 (bug 1523638)
Backed out changeset b60a17ea716a (bug 1523638)
Backed out changeset 507e63186c5f (bug 1523638)
Backed out changeset 33255408ca61 (bug 1523638)
Backed out changeset d97b2d223616 (bug 1523638)
Backed out changeset eba2a0514cde (bug 1523638)
Backed out changeset d7065174c5c4 (bug 1523638)
Backed out changeset c21b361e175d (bug 1523638)
2019-07-23 05:13:32 +03:00
Nika Layzell 83236ff0f4 Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:22 +00:00
Bogdan Tara ca45889546 Backed out 9 changesets (bug 1523638) for browser_contextmenu.js failures CLOSED TREE
Backed out changeset 0a584a07b696 (bug 1523638)
Backed out changeset 8c5af2289900 (bug 1523638)
Backed out changeset 40ed1bd64b09 (bug 1523638)
Backed out changeset 9a99a0391979 (bug 1523638)
Backed out changeset 07fb4748b91a (bug 1523638)
Backed out changeset 49047c3ebae9 (bug 1523638)
Backed out changeset d606d072126c (bug 1523638)
Backed out changeset 76dc1937fc77 (bug 1523638)
Backed out changeset c784c14b5d5d (bug 1523638)
2019-07-16 23:40:47 +03:00
Nika Layzell 89d26ca7eb Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-16 18:47:56 +00:00
Sylvestre Ledru e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D38057

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Emilio Cobos Álvarez c17be889ab Bug 1218456 - Remove nsILinkHandler. r=smaug
Interfaces with just one implementation don't seem very useful.

Differential Revision: https://phabricator.services.mozilla.com/D37406
2019-07-09 23:08:05 +02:00
Emilio Cobos Álvarez 28801c9e84 Bug 1218456 - Allow navigating when there's no pres context. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37404
2019-07-09 23:07:29 +02:00
Dorel Luca 9925ca654c Backed out 5 changesets (bug 1218456) for Crashtest failures on dom/l10n/tests/mochitest/dom_localization/test_overlay.html. CLOSED TREE
Backed out changeset 31afe89c2d42 (bug 1218456)
Backed out changeset 8bd57ebc4528 (bug 1218456)
Backed out changeset e5d37afff36a (bug 1218456)
Backed out changeset e3da86278ecf (bug 1218456)
Backed out changeset 343046089f8e (bug 1218456)

--HG--
extra : rebase_source : f092d903c8c80581d187493e036b1875d8668b3d
2019-07-09 22:04:13 +03:00
Emilio Cobos Álvarez 23a7cb7a68 Bug 1218456 - Remove nsILinkHandler. r=smaug
Interfaces with just one implementation don't seem very useful.

Differential Revision: https://phabricator.services.mozilla.com/D37406

--HG--
extra : moz-landing-system : lando
2019-07-09 16:17:47 +00:00
Emilio Cobos Álvarez d5db3842a0 Bug 1218456 - Allow navigating when there's no pres context. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37404

--HG--
extra : moz-landing-system : lando
2019-07-09 16:17:27 +00:00
Sylvestre Ledru 131d0c6a02 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35622

--HG--
extra : moz-landing-system : lando
2019-07-06 08:18:28 +00:00
Sean Feng 99863c0a1c Bug 1560328 - Fix a bug where mDocument could be null to cause crashes r=smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D35567

--HG--
extra : moz-landing-system : lando
2019-06-24 15:05:36 +00:00
Dorel Luca fe1531cfc1 Merge mozilla-inbound to mozilla-central. a=merge 2019-06-12 15:05:58 +03:00
Sean Feng 36865676e1 Bug 1512388 - Add loading cross domain iframes in background r=smaug
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
2019-06-11 20:43:40 +00:00
Jonathan Watt d46e1691fe Bug 1558349. Stop calling SetIsPrintPreview in nsDocumentViewer::PrepareToStartLoad. r=bobowen
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
2019-06-04 22:53:09 +01:00
Jonathan Watt 9ff8f044a3 Bug 1558071. Rename nsIWebBrowserPrint.printPreviewNavigate to printPreviewScrollToPage. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34297

--HG--
extra : rebase_source : 58343bee2ce7e2761fcc93b8e842051a14cf3684
extra : amend_source : ff72ab52d1274f0bcfad59f30c43364af05a0310
2019-06-03 12:48:21 +01:00
Jonathan Watt 02015da744 Bug 1558072. Inline the nsDocumentViewer::ReturnToGalleyPresentation code to its single caller. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34296

--HG--
extra : rebase_source : 51d3d47d6c2e24ae49247cc8496afa5924ab9eda
extra : amend_source : 6cdc328683a450001ca50f783c803d865483e219
2019-06-03 10:10:42 +01:00
Jonathan Watt 88526e9eac Bug 1557878. Replace nsIWebBrowserPrint::enumerateDocumentNames with a getter for the top document's name. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34260

--HG--
extra : rebase_source : cbac94e78d57371ec1f4bdfcd1739367fb79f864
2019-05-30 11:43:16 +01:00
Jonathan Watt 09d6c311f9 Bug 1557681. Rename nsPrintJob::Cancelled() to Cancel(). r=bobowen
"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
2019-05-29 07:14:46 +01:00
Jonathan Watt 5cd2b5b11e Bug 1557104. Merge nsIPageSequenceFrame and nsSimplePageSequenceFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D33817

--HG--
rename : layout/generic/nsSimplePageSequenceFrame.cpp => layout/generic/nsPageSequenceFrame.cpp
rename : layout/generic/nsSimplePageSequenceFrame.h => layout/generic/nsPageSequenceFrame.h
extra : rebase_source : e75b043af4dbfe4c108f2bfc0e234fd20c5af315
2019-05-22 13:01:33 +01:00
Mihai Alexandru Michis d07d090c31 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-06-05 12:59:10 +03:00
sotaro 3d0c73c202 Bug 1537586 - Address build failure with --disable-printing r=bobowen,froydnj
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
2019-06-05 01:25:36 +00:00
Jonathan Watt 39945059b3 Bug 1552785. Remove printing related isFramesetDocument and isFramesetFrameSelected code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33696

--HG--
extra : rebase_source : 2e7f854a808059b4955ffaad425fe8b68263883e
2019-05-21 23:25:57 +01:00
Edgar Chen 800499a9f9 Bug 1554122 - Rename nsAutoPopupStatePusher* to AutoPopupStatePusher; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32457

--HG--
extra : moz-landing-system : lando
2019-05-24 12:42:29 +00:00
Jonathan Watt a7b3640083 Bug 1553081. Set nsPrintJob::mDisallowSelectionPrint during Initialize(). r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31975

--HG--
extra : rebase_source : 57b72312d1c25b62b3c5ebd6818f2010eddfefec
extra : amend_source : 9f8a0f0e30fefccd3a9296b6d91e74f7b6589676
2019-05-10 16:01:33 +01:00
Jonathan Watt e0e310caed Bug 1552969. Pass the document to print through to nsPrintJob::Print. r=bobowen
...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
2019-05-10 09:38:11 +01:00
Daniel Varga f7e7132f8f Merge mozilla-central to mozilla-inbound 2019-05-21 07:22:34 +03:00
Sean Feng 170e44e58f Bug 1534012 - Use a low priority ThrottledEventQueue for postMessages during page load r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27386

--HG--
extra : moz-landing-system : lando
2019-05-16 19:35:30 +00:00
Jonathan Watt 21321fb45e Bug 1552880 p1. Pass a document to nsPrintJob::PrintPreview instead of a window. r=bobowen
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
2019-05-09 10:40:12 +01:00
Jonathan Watt f3060a6671 Bug 1552449. Make the nsIDocShell interface to print preview less susceptible to inadvertent misuse. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31598

--HG--
extra : rebase_source : 843908736fcaaab29bd16033d1c077850423521a
2019-05-07 14:12:44 +01:00
Timothy Nikkel d205113458 Bug 1552104. Need to clear display items when we remove a document from the view tree but it sticks around. r=mattwoodrow
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
2019-05-16 21:14:19 +00:00
Jonathan Watt e811a45220 Bug 1551688. Make it clearer that nsIContentViewer.setPageMode() is for testing only by renaming it. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31126

--HG--
extra : rebase_source : 8365f296ef575e6632b27d06617d197f0fc50cff
2019-04-29 14:53:25 +01:00