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

1372 Коммитов

Автор SHA1 Сообщение Дата
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
Brindusan Cristian ba4f64421f Backed out changeset 7fa8e33635fc (bug 1534012) for wpt failures at promise-rejection-events.html. CLOSED TREE 2019-05-10 01:10:40 +03:00
Sean Feng 87884c39a6 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-09 14:43:40 +00:00
Jonathan Watt d9d54a06b9 Bug 1549844. DeCOMtaminate some nsPrintJob methods. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D30269

--HG--
extra : rebase_source : 4529c476a5f7acdd4c959417c6e6221e6c84f153
extra : amend_source : f589deac70ae533c2f4e7830c057f0f2c65b963e
2019-04-12 14:53:26 +01:00
Emilio Cobos Álvarez 98b4f62a61 Bug 1549691 - nsLayoutUtils::GetRealPrimaryFrameFor makes no sense. r=jwatt
The primary frame is always the out of flow frame.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 17:04:36 +00:00
Timothy Nikkel 9e00c372a5 Bug 1547277. If the size of the document as recorded in the frame/view tree and the document viewer diverge as a result of a call to GetContentSize make sure to invalidate when they converge again because what we draw is changing. r=mattwoodrow
The code comment mostly explains things.

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

--HG--
extra : moz-landing-system : lando
2019-05-05 03:21:41 +00:00
Randell Jesup 72921c7a42 Bug 1531926: move bfcache logging to MOZ_LOG (PageCache:N) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D21798

--HG--
extra : rebase_source : d9158d083137b27888be86a51b4f9774decea17a
2019-03-01 16:53:54 -05:00