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

1087 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 7e23a4287f Bug 1760836 - Support printing to an nsIOutputStream. r=jfkthame,jrmuizel,webdriver-reviewers,geckoview-reviewers,agi
The trickiest bits are the PrintTargetCG ones, the rest is just plumbing
and cleanups and tests, but let me know if you want those to be split
out, can do.

The GTK change to nsPrintSettingsGTK::GetResolution is a no-op (we only
read resolution on windows), but I did that because we assume that it
doesn't fail and GTK returns a sane default anyways.

Differential Revision: https://phabricator.services.mozilla.com/D142199
2022-03-30 18:51:58 +00:00
Iulian Moraru 7a3ed2ce2a Backed out changeset d42d7505c9cf (bug 1760836) for causing mochitest failures on browser_print_stream.js. CLOSED TREE 2022-03-29 23:32:39 +03:00
Emilio Cobos Álvarez b0fb172236 Bug 1760836 - Support printing to an nsIOutputStream. r=jfkthame,jrmuizel,webdriver-reviewers,geckoview-reviewers,agi
The trickiest bits are the PrintTargetCG ones, the rest is just plumbing
and cleanups and tests, but let me know if you want those to be split
out, can do.

The GTK change to nsPrintSettingsGTK::GetResolution is a no-op (we only
read resolution on windows), but I did that because we assume that it
doesn't fail and GTK returns a sane default anyways.

Differential Revision: https://phabricator.services.mozilla.com/D142199
2022-03-29 17:50:58 +00:00
Daniel Holbert 39e3163129 Bug 1758199: Add null-check for GetPresContext() in nsRefreshDriver::NotifyDOMContentLoaded. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D141054
2022-03-15 04:33:42 +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
Jonathan Watt 8d542d93ce Bug 1756445 - Stop saving print settings in platform code after printing. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D139291
2022-02-27 21:12:08 +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
Daniel Holbert 56596856cf Bug 1754111 part 3: Remove nsPrintJob.cpp's unused variable 'kPrintingPromptService', and a bunch of unused headers. r=emilio
This removal fixes the following non-fatal warning which (like some categories of warnings) only appears when you build in non-unified mode:
layout/printing/nsPrintJob.cpp:61:19: warning: unused variable 'kPrintingPromptService' [-Wunused-const-variable]

(Indeed, this variable was entirely unused.)

This patch also removes a bunch of surrounding #includes that looked
likely-unused to me as well. I did some spot-checks to be pretty-sure the
removed headers are all unused at this point, and (most importantly) I made
sure we still successfully build in non-unified mode.  This means that, if we
do actually depend on any of these removed includes, we're still getting them
indirectly via some other header, so these removals shouldn't really cause
trouble.

Depends on D138097

Differential Revision: https://phabricator.services.mozilla.com/D138098
2022-02-08 05:17:31 +00:00
Daniel Holbert e59129d620 Bug 1754111 part 2: Fix non-unified build errors in layout/printing, and mark it as safe to build in non-unified mode. r=emilio
The previous patch in this series fixed some sources of non-unified build errors for this directory, and this patch here fixes the only remaining one, which is:

layout/printing/nsPrintJob.cpp:584:22: error: use of undeclared identifier 'do_CreateInstance'

This API is provided by nsComponentManagerUtils.h, which is the include I'm adding here.

Depends on D138096

Differential Revision: https://phabricator.services.mozilla.com/D138097
2022-02-08 05:17:30 +00:00
Daniel Holbert 0793f3c7b0 Bug 1754111 part 1: Move nsPagePrintTimer constructor definition (and its nsPrintObject.h include) to the .cpp file. r=emilio
This fixes a non-unified build error for nsPagePrintTimer's mDocument
member-var being initializated (and getting AddRef'ed) in the constructor's
init list, without its type being defined yet.  The .cpp file has the type
definition, so let's just move the constructor definition over there and leave
the header file relatively clean.

While I'm here, I'm also moving nsPagePrintTimer's include for nsPrintObject.h
into its .cpp file, since the header file only needs a forward declaration.

Differential Revision: https://phabricator.services.mozilla.com/D138096
2022-02-08 05:17:30 +00:00
Jonathan Watt dff729bc6d Bug 1704178. Remove platform print.tab_modal.enabled=false code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D136736
2022-01-28 15:52:51 +00:00
Ting-Yu Lin 1ab64170cd Bug 1748277 - Use fresh nsReflowStatus when reflowing nsMathMLTokenFrame's children. r=dholbert
The root cause of the assertion count bump is bug 1751260.

Differential Revision: https://phabricator.services.mozilla.com/D136408
2022-01-20 22:44:21 +00:00
Daniel Holbert 080e18fa47 Bug 1663722: Make nsPageSequenceFrame gracefully handle SizeToContent calls. r=emilio
nsPageSequenceFrame does a thing where it grows its desired size to fit the
AvailableISize and ComputedBSize (under the assumption that those are the
actual dimensions of our scrollport, which it wants to make maximal use of).

This behavior causes trouble when it's reflowed under the privileged
'sizeToContent' JS API.  That API makes us reflow with nscoord_MAX as the
viewport's ComputedBSize(), and this nscoord_MAX value gets passed down to be
the nsPageSequenceFrame's ComputedBSize as well.  When we reach the code in
question, we dutifully grow the desired size to that bogus huge value, which is
clearly wrong.

This patch addresses this issue by simply declining to grow the desired size in
the scenario where ComputedBSize() is unconstrained.  This leaves us with
reasonable values for our desired size (which are actually based on the
content, which makes it the right thing to do for the purpose of a
SizeToContent() call).

Differential Revision: https://phabricator.services.mozilla.com/D135762
2022-01-13 06:08:51 +00:00
Jonathan Watt 7e25ffb0ec Bug 1749003 - Remove unnecessary includes and other mentions of nsIWebBrowserPrint. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D135339
2022-01-07 14:46:30 +00:00
Jonathan Watt 2a9a0b264a Bug 1702501 - Remove print.tab_modal.enabled pref and old frontend print preview code. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D134699
2022-01-06 18:55:38 +00:00
Jonathan Watt aa2ac44e41 Bug 1748188 - Remove nsIPrintSettings.setupSilentPrinting. r=emilio
The background we have on why this exists is in the code comments of the code
that's being removed, and in:
https://bugzilla.mozilla.org/show_bug.cgi?id=193001#c91

It seems very unlikely that this code is necessary. It's run for silent
printing when the new UI is enabled and E10s is disabled. If it was really
necessary it seems likely we'd have seen breakage in our much more common use
cases.

Differential Revision: https://phabricator.services.mozilla.com/D134936
2022-01-03 10:55:04 +00:00
Butkovits Atila 55298cf924 Backed out changeset 1de6f3bfb971 (bug 1748188) for causing bustages at nsPrintSettingsGTK.cpp. CLOSED TREE 2022-01-03 03:54:41 +02:00
Jonathan Watt fc360db2bb Bug 1748188 - Remove nsIPrintSettings.setupSilentPrinting. r=emilio
The background we have on why this exists is in the code comments of the code
that's being removed, and in:
https://bugzilla.mozilla.org/show_bug.cgi?id=193001#c91

It seems very unlikely that this code is necessary. It's run for silent
printing when the new UI is enabled and E10s is disabled. If it was really
necessary it seems likely we'd have seen breakage in our much more common use
cases.

Differential Revision: https://phabricator.services.mozilla.com/D134936
2022-01-03 01:33:18 +00:00
Butkovits Atila cc93f2d729 Backed out changeset fe90fc6b12b5 (bug 1741698) for causing failures at delayed_window_print.html. CLOSED TREE 2021-12-24 00:31:23 +02:00
Jonathan Watt 3133373f5c Bug 1741698 - Revert 1fb0f7dc84a9 (part of bug 1669149) since it broke silent printing. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D134621
2021-12-23 18:32:40 +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
Masayuki Nakano 82e2013683 Bug 1735446 - part 4: Make `Selection::GetRangeAt()` take `uint32_t` instead of `int32_t` r=smaug
It's an internal API corresponding to `Selection.getRangeAt` DOM API.
I think that it should use `uint32_t` rather than `size_t` because of the
consistency with the DOM API and `Selection::RangeCount()`.

This patch fixes all callers of `GetRangeAt()`, and rewrites it with ranged-
loops unless original ones do not refer `RangeCount()` every time and may run
script in the loop.

Differential Revision: https://phabricator.services.mozilla.com/D128848
2021-12-09 07:35:09 +00:00
Bob Owen c5214a2110 Bug 1669149 p3: Never go back to the parent for print settings with tab modal print UI. r=jwatt
Depends on D105824

Differential Revision: https://phabricator.services.mozilla.com/D99806
2021-11-16 08:17:03 +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
Dsmith b91abefc3c Bug 1732383 Removing unused assignment in DoCommonPrint function from fx-scan-build list. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126559
2021-09-29 09:46:14 +00:00
Emily McDonough 9f54655566 Bug 1721265 Part 3 - Use page-size orientation information in print preview r=emilio,emalysz
When a page-size that is not auto or square exists the print preview will use
the orientation of this page-size when doing initial reflow. The frontend
applies the orientation to the print settings without updating settings and
causing a second reflow, and the orientation selector is hidden.

Differential Revision: https://phabricator.services.mozilla.com/D124976
2021-09-21 16:38:54 +00:00
Emily McDonough 4f6abc1d13 Bug 1721265 Part 2 - Send information about CSS page-size values to the print frontend through FinishPrintPreview r=emilio
This adds an optional paper orientation to PrintPreviewResultInfo populates it
from the CSS page size when finishing print preview. The value is then placed
in the PrintPreviewSuccessInfo to be sent to the frontend.

Differential Revision: https://phabricator.services.mozilla.com/D124248
2021-09-21 16:38:53 +00:00
Nika Layzell 66e5b6b669 Bug 1729092 - Remove dead nsPrintObject::mDidCreateDocShell, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124511
2021-09-07 14:22:42 +00:00
Emilio Cobos Álvarez ec922d3f90 Bug 1721952 - Don't let nsTextFragment::IsBidi get out of sync even if the document has already enabled bidi. r=smaug
It's not a sound optimization in presence of adoption.

Differential Revision: https://phabricator.services.mozilla.com/D123524
2021-08-25 11:07:40 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Gijs Kruitbosch d90c0bb57f Bug 1724718 - skip some XUL-y tests on android, r=emilio,agi
Depends on D122663

Differential Revision: https://phabricator.services.mozilla.com/D122664
2021-08-19 12:13:01 +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
Emilio Cobos Álvarez 9db2aa0440 Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-13 09:16:53 +00:00
Dorel Luca 71abb3ab93 Backed out changeset 43a82597dade (bug 1699837) for Crashtest in layout/printing/crashtests/1671503.html. CLOSED TREE 2021-06-11 19:48:10 +03:00
Emilio Cobos Álvarez 7af763acbe Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-11 13:07:55 +00:00
Emilio Cobos Álvarez d455c7de64 Bug 1712130 - Make print.print_via_parent a static pref. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D115612
2021-05-20 17:05:33 +00:00
Emma Malysz d2b69538dd Bug 1675965, do not store file name in preference value for save to pdf printers r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D113413
2021-04-29 17:42:54 +00:00
Emilio Cobos Álvarez 8c1efa7251 Bug 1707977 - Null-check print data in nsPrintJob::DoPrint. r=layout-reviewers,dholbert
It's unclear how this can happen (the caller also null-checks, but then
again it also reconstructs a bunch of stuff, so...).

Differential Revision: https://phabricator.services.mozilla.com/D113815
2021-04-29 17:03:00 +00:00
Joel Maher 78eb68ea37 Bug 1703894 - s/requestIdleCallback/setTimeout/ for frequent OSX timeouts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112984
2021-04-21 19:50:34 +00:00
Bob Owen 87882aa75a Bug 1697344 p3: Don't hold the GradientStops object on CanvasGradient. r=jrmuizel
In the DrawTargetRecording case we create new GradientStopsRecording each time
and holding onto them in the content process can mean they take a very large
amount of memory in the GPU process, if a script deliberately creates lots of
unique stops.
In the non-recording case then the GradientStops are cached in the content
process anyway.

Differential Revision: https://phabricator.services.mozilla.com/D109792
2021-03-29 12:12:21 +00:00
Simon Giesecke a598a0c7c5 Bug 1679522 - Use <> style for including windows system headers. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98895
2021-03-25 10:19:44 +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