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

87 Коммитов

Автор SHA1 Сообщение Дата
David Shin aab93348e9 Bug 1785046 - Part 3: Let `nsIDeviceContextSpec::EndDocument` & `nsDeviceContext::EndDocument` return `MozPromise`. r=nika,emilio,geckoview-reviewers,m_kato
All implementors currently simply resolve the promise right away, using
crutch code. Asynchronous usage will be added in the changeset that follows.

Differential Revision: https://phabricator.services.mozilla.com/D163508
2022-12-19 15:42:48 +00:00
David Shin 824e42a012 Bug 1785046 - Part 2: Ensure `RemotePrintJobParent` reports completion to its listeners at when all of its work is done. r=emilio,nika
Previously, we notified the listeners with a done event when `RemotePrintJobChild`
reported done, even if there is work left on the parent side.

Differential Revision: https://phabricator.services.mozilla.com/D163507
2022-12-19 15:42:47 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Emilio Cobos Álvarez 98d42ab61a Bug 1770372 - Notify with STATE_IS_DOCUMENT from RemotePrintJobParent. r=nika
This ensures we reject pending promises in PrintListenerAdapter.

Differential Revision: https://phabricator.services.mozilla.com/D147311
2022-05-25 20:56:01 +00:00
Dmitrij Feller ba3866a5fc Bug 370035 - Remove the aWidget parameter from nsIDeviceContextSpec::Init.r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D145841
2022-05-23 19:34:40 +00:00
Jonathan Watt 43e1613319 Bug 1754308 p1 - Stop sending nsIPrintSettings.toFileName to content processes. r=bobowen
This avoids exposing the path to potentially compromised content processes.

The roundtripping of the toFileName value from RemotePrintJobParent's
mPrintSettings to the content process and then back to
RemotePrintJobParent::InitializePrintDevice was silly anyway.

Differential Revision: https://phabricator.services.mozilla.com/D146867
2022-05-20 22:50:59 +00:00
Jonathan Watt ea773f7d3c Bug 1763989. Remove the PPrinting and nsPrintingProxy code. r=bobowen
Bug 1757395 basically removed the reason for PPrinting to exist. What remained
essentially just added an unnecessary layer of complexity/indirection to the
creation of PRmotePrintJob actors.

Differential Revision: https://phabricator.services.mozilla.com/D143330
2022-04-26 14:30:29 +00:00
Emilio Cobos Álvarez cc96c01559 Bug 1759494 - Remove some dead code introduced for PDFium. r=dholbert
IsSyncPagePrinting() only had one implementation which unconditionally
returned true.

So, any code that was conditioned on !IsSyncPagePrinting() is necessarily
dead/unreachable.

These are also crashing due to a null deref in mPrintTarget which might
happen if print is aborted.

Differential Revision: https://phabricator.services.mozilla.com/D140988
2022-03-14 23:18:22 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell 91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
Jonathan Watt ac90ddff59 Bug 1745452 - Remove the print progress dialog code. r=mstriemer,bobowen,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133500
2021-12-16 15:12:33 +00:00
Butkovits Atila 7d46682c0e Backed out changeset 51d7c5d96ceb (bug 1745452) for causing failures at browser_all_files_referenced.js. CLOSED TREE 2021-12-16 15:13:34 +02:00
Jonathan Watt f2d22001b0 Bug 1745452 - Remove the print progress dialog code. r=mstriemer,bobowen,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133500
2021-12-16 11:45:59 +00:00
Jens Stutte cbe7d5cb29 Bug 1731564: Use motivated SpinEventLoopUntil inside layout/*. r=emilio
Depends on D127226

Differential Revision: https://phabricator.services.mozilla.com/D127230
2021-10-07 08:06:13 +00:00
Marian-Vasile Laza 18fb16c542 Backed out 18 changesets (bug 1731564) for causing build bustages on SpinEventLoopUntil. CLOSED TREE
Backed out changeset 0464dbdc8584 (bug 1731564)
Backed out changeset 0d996df13545 (bug 1731564)
Backed out changeset 5630a0e7a109 (bug 1731564)
Backed out changeset 37b41d187cdb (bug 1731564)
Backed out changeset d37700fa60b6 (bug 1731564)
Backed out changeset b0ce7db44b99 (bug 1731564)
Backed out changeset aa5ec3aa1535 (bug 1731564)
Backed out changeset 73b648f1fa70 (bug 1731564)
Backed out changeset bb8fb0f9833e (bug 1731564)
Backed out changeset 0d8905144f5d (bug 1731564)
Backed out changeset 2cfb094a1ec3 (bug 1731564)
Backed out changeset 78d3b0257a6a (bug 1731564)
Backed out changeset e9d32926e93c (bug 1731564)
Backed out changeset 874cab520ce5 (bug 1731564)
Backed out changeset d8071cc32bd9 (bug 1731564)
Backed out changeset 283c5393cbbc (bug 1731564)
Backed out changeset 317bc38e3de5 (bug 1731564)
Backed out changeset 53e3f4862439 (bug 1731564)
2021-10-07 00:09:19 +03:00
Jens Stutte 3cbb575b9e Bug 1731564: Use motivated SpinEventLoopUntil inside layout/*. r=emilio
Depends on D127226

Differential Revision: https://phabricator.services.mozilla.com/D127230
2021-10-06 19:45:14 +00:00
Matt Woodrow ec9b5dd838 Bug 1720152 - Recurse into replay for dependencies, rather than using a temp surface. r=jrmuizel,bobowen,emilio
Differential Revision: https://phabricator.services.mozilla.com/D120050
2021-08-09 22:07:36 +00:00
Dorel Luca d51c69b246 Backed out changeset de2e92cbb94d (bug 1720152) for WPT failures in html/browsers/windows/iframe-cross-origin-print.sub.html. CLOSED TREE 2021-07-29 05:52:23 +03:00
Matt Woodrow 63077e7c59 Bug 1720152 - Recurse into replay for dependencies, rather than using a temp surface. r=jrmuizel,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D120050
2021-07-29 01:34:04 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Simon Giesecke 79fddefe02 Bug 708901 - Migrate to nsTHashSet in gfx/ipc. r=jrmuizel
Depends on D109316

Differential Revision: https://phabricator.services.mozilla.com/D109317
2021-03-23 10:36:37 +00:00
Mats Palmgren 6adb31f151 Bug 1698235 - Add some error handling when using RemotePrintJobChild which may be destroyed. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D108711
2021-03-18 19:39:09 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Matt Woodrow 92c3e52975 Bug 1662336 - Pass print recording dependency list across to parent process and use CrossProcessPaint to resolve it. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D90807
2020-10-08 08:40:15 +00:00
Matt Woodrow 2786819db1 Bug 1662336 - Make PRemotePrintJob refcounted. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D90806
2020-10-08 19:19:51 +00:00
Bob Owen 1cd21daff6 Bug 1662938: Notify RemotePrintJobParent's listeners of the error when we fail to initialize the print. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D89490
2020-09-08 20:50:02 +00:00
Simon Giesecke 8aa47bcfb7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016

--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00: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
Alex Gaynor 0f01791ffc Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Ehsan Akhgari 4137a92662 Bug 1514340 - Part 2: Break out the content blocking related notifications into nsIWebProgressListener.onContentBlockingEvent(); r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D16052
2019-01-21 09:58:50 -05:00
Ehsan Akhgari 0dcf936804 Bug 1510911 - Part 2: Backout changeset f8849239da42 (bug 1493563 - Part 5) for regressing performance 2018-12-03 14:27:53 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jonathan Watt 4c1b207664 Bug 1510116. Fix some unified build issues in layout code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13039

--HG--
extra : rebase_source : f0b6516484ed97ed52b92e04617f89e4ee8189ff
2018-11-12 22:20:52 +00:00
Ehsan Akhgari 5f0be07390 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 14:46:02 -04:00
Noemi Erli 4419e20e14 Backed out 12 changesets (bug 1493563) for failures in test_css-logic-getCssPath.html CLOSED TREE
Backed out changeset d2e83655082f (bug 1493563)
Backed out changeset 1ce58f004593 (bug 1493563)
Backed out changeset 344298c73ee7 (bug 1493563)
Backed out changeset 02b8b073f7d7 (bug 1493563)
Backed out changeset 3ef707008502 (bug 1493563)
Backed out changeset bb2720a401fe (bug 1493563)
Backed out changeset ce0211be57a1 (bug 1493563)
Backed out changeset 83d6c2bf8dc6 (bug 1493563)
Backed out changeset 1844af4cc25b (bug 1493563)
Backed out changeset c8ab17addb7a (bug 1493563)
Backed out changeset a1ff0cd62563 (bug 1493563)
Backed out changeset 932b41e211e0 (bug 1493563)
2018-09-28 21:31:18 +03:00
Ehsan Akhgari f0108e78c2 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 13:24:41 -04:00
Tiberius Oros 70e8d3a299 Backed out 11 changesets (bug 1493563) for failures on dom/workers/test/test_sharedworker_event_listener_leaks.html on a CLOSED TREE
Backed out changeset 0bb55b604bfd (bug 1493563)
Backed out changeset 8e25c301675a (bug 1493563)
Backed out changeset 4f608b8801d4 (bug 1493563)
Backed out changeset f58d0b1ca088 (bug 1493563)
Backed out changeset eae105f2bf6d (bug 1493563)
Backed out changeset 7a8a0d1cfd69 (bug 1493563)
Backed out changeset dbba8451aab1 (bug 1493563)
Backed out changeset a6141dbd0328 (bug 1493563)
Backed out changeset f4ca3d8fa90e (bug 1493563)
Backed out changeset 56bab7fae64d (bug 1493563)
Backed out changeset 66787e603401 (bug 1493563)
2018-09-26 06:16:22 +03:00
Ehsan Akhgari 4ced8fedcb Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-25 21:02:51 -04:00
Tiberius Oros 8acb878ef1 Backed out 11 changesets (bug 1493563) for failures on browser_blockingCookies.js on a CLOSED TREE
Backed out changeset d755b96837ac (bug 1493563)
Backed out changeset 651f87dca51f (bug 1493563)
Backed out changeset 68de8f0866d0 (bug 1493563)
Backed out changeset 205d69890f50 (bug 1493563)
Backed out changeset 5f922cd6c21e (bug 1493563)
Backed out changeset 84dc54c1a9c1 (bug 1493563)
Backed out changeset 287666ecdd17 (bug 1493563)
Backed out changeset c64a2ea15b7b (bug 1493563)
Backed out changeset 9085269938cd (bug 1493563)
Backed out changeset de06604fefcb (bug 1493563)
Backed out changeset f9bac5e73bd4 (bug 1493563)
2018-09-25 23:12:03 +03:00
Ehsan Akhgari 59e50ba2d0 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-25 13:51:47 -04:00
Jonathan Watt 88c85e4536 Bug 499025 - Don't open an error pop-up if the user cancels printing. r=bobowen
This fixes PrintTargetWindows::BeginPrinting to detect when the
user cancels and have it return NS_ERROR_ABORT in that case.

The rest of the changes are simply making sure that the various
call points up the call stack don't print a warning message if
NS_ERROR_ABORT is returned up from
PrintTargetWindows::BeginPrinting.

MozReview-Commit-ID: 6xZ5SPje6TT
2018-02-06 20:14:47 +00:00
Jonathan Watt 176a890dbf Bug 1432409 part 2 - Make RemotePrintJobChild::OnStatusChange no-op if initialization failed. r=dholbert
After the part 1 fix, we can still (asynchronously) call some generic cleanup
code that tries to let the parent process's RemotePrintJobParent know that
printing failed under the stack:

  RemotePrintJobChild::OnStatusChange
  nsPrintData::DoOnStatusChange
  nsPrintJob::FirePrintingErrorEvent
  nsPrintJob::CleanupOnFailure

We crash on trying to use the RemotePrintJobChild to message the parent process
since the delete message from the parent has been processed.  This change makes
RemotePrintJobChild::OnStatusChange check that it's initialized before trying
to send any messages.

Pushing to CLOSED TREE since this passed a full Try build and is a topcrash
we want to land for beta ASAP.

MozReview-Commit-ID: FfizRMj2s2m
2018-02-19 23:25:30 +00:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Mantaroh Yoshinaga b43ceba6b4 Bug 1419775 - Part 2.Notify closing IPC connection to PrintProgressService. r=bobowen
If the content process which is printing target content is closed
during printing, PrintProgressService will continue to display
progress dialog even if Cancel is clicked.

This patch will:
 * If IPC connection is closed, notify to PrintProgressService via
   nsIWebProgressListener.

MozReview-Commit-ID: DoOfJjnk1wJ

--HG--
extra : rebase_source : 861d36fca15fe156645235cdc77bc9461363a0b0
2018-01-10 09:02:45 +09:00
Jonathan Watt f239219d4f Bug 1425178 - Rename nsPrintEngine to nsPrintJob. r=bobowen
MozReview-Commit-ID: 2HCNmeOLPd3

--HG--
rename : layout/printing/nsPrintEngine.cpp => layout/printing/nsPrintJob.cpp
rename : layout/printing/nsPrintEngine.h => layout/printing/nsPrintJob.h
2017-12-04 11:44:17 -06:00
cku 1d858e08d2 Bug 1399787 - Part 14. Prevent RemotePrintJobChild using ipc calls after the channel was destroyed. r=jwatt
If in the future nsDeviceContextSpecWin::BeginDocument was to return
NS_ERROR_FAILURE, then the channel between RemotePrintJobParent and
RemotePrintJobChild will be close at [1]. RemotePrintJobChild keep using ipc
calls after the channel is broken and hits assertions.

PS:
We always hits this assertion by forcing nsDeviceContextSpecWin::BeginDocument
returning NS_ERROR_FAILURE. It's not relative to the change we made in
previous patches.

[1]
https://hg.mozilla.org/mozilla-central/file/b186fddce27f/layout/printing/ipc/RemotePrintJobParent.cpp#l44
MozReview-Commit-ID: 79mZBf301nb

--HG--
extra : rebase_source : 58076a18be56d7eea37ea2f5a147db0048e3493f
extra : intermediate-source : 88df2caad42694dd77f2a518ea8d460d6c88b8c6
extra : source : b920088860904c5d28f3dd2f6eda790dc09be003
2017-10-23 15:57:18 +08:00
cku 7f167d3fc5 Bug 1399787 - Part 11.c. Add assertions to make sure no page-done callback from the PrintTarget after the print job done. r=jwatt
MozReview-Commit-ID: FsDqjpy2wtR

--HG--
extra : rebase_source : 76a77c2f1f1ca54e3b8dec53581e1ba9a0e71b03
2017-11-30 11:55:12 +08:00
cku 3654a24e84 Bug 1399787 - Part 11.a. Use PrintTargetEMF to print content documents. r=jwatt
Before we introduce PrintTargetEMF, all PrintTargets finish page printing task
before the end of PrintTarget::EndPage(). Unlike others, a page printing
in PrintTargetEMF is done after receiving an async callback from the pdfium
process. So we have both async and sync page printing behavior now. This patch
is trying to make both of them work correctly while priting a content document.

MozReview-Commit-ID: 2PHJToFlvtu

--HG--
extra : rebase_source : 9d2d7cf7330a157a0e5c6a414c75de94ca3fb5a1
extra : source : f61eb00f83acf45511d8448922212dccb12b05aa
2017-11-05 04:36:37 +08:00
Cosmin Sabou 79d933ec34 Backed out 22 changesets (bug 1399787) for shutdown leaks on windows 7 debug tc-M without e10s r=backout on a CLOSED TREE
Backed out changeset 463d676df5da (bug 1399787)
Backed out changeset fc9776a2605d (bug 1399787)
Backed out changeset 2e91a90dfbc3 (bug 1399787)
Backed out changeset e82ab72f71ee (bug 1399787)
Backed out changeset d7fef200e8b9 (bug 1399787)
Backed out changeset a7d70f7f3335 (bug 1399787)
Backed out changeset 2800f9d20d96 (bug 1399787)
Backed out changeset 9dfa404abf9d (bug 1399787)
Backed out changeset 09b3c172a01e (bug 1399787)
Backed out changeset f9fd3e750636 (bug 1399787)
Backed out changeset 01284c55bf8a (bug 1399787)
Backed out changeset c2ab1b454283 (bug 1399787)
Backed out changeset e7bfa51404c5 (bug 1399787)
Backed out changeset 3fd2a734f887 (bug 1399787)
Backed out changeset ef21f295db3f (bug 1399787)
Backed out changeset c186893ce0fc (bug 1399787)
Backed out changeset 323da3bddaaa (bug 1399787)
Backed out changeset 3b89f189edff (bug 1399787)
Backed out changeset a47bd86c35ee (bug 1399787)
Backed out changeset 558526301a4c (bug 1399787)
Backed out changeset baa99fb50ba9 (bug 1399787)
Backed out changeset 6d82ed0ba805 (bug 1399787)
2017-12-08 13:09:56 +02:00