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

851 Коммитов

Автор SHA1 Сообщение Дата
Mantaroh Yoshinaga 8ecd3aa6bd Bug 1246883 - Load UA Stylesheet when printing the SVG document. r=jwatt
Currently, Gecko load only minimal-xul.css if the document is the SVG[1].
In the case of printing SVG document, gecko should load ua.css for using style
which related to print.

This patch will load ua.css when printing the SVG document.

[1] http://searchfox.org/mozilla-central/rev/67f38de2443e6b613d874fcf4d2cd1f2fc3d5e97/layout/base/nsDocumentViewer.cpp#2472

MozReview-Commit-ID: JtdaEvX8QTw

--HG--
extra : rebase_source : 6208827fce6639f6175a875b93d3a0371281b35a
2017-12-13 08:58:05 +09: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 a545e475c8 Bug 1399787 - Part 12. Delay dispatching FinalizePrint message until the last page was processed. r=jwatt
For the last page, here is the final three messages sent between the content
process, RemotePrintJobChild, and the chrome process, RemotePrintJobParent, for
printing:
1. The content process sends *ProcessPage* to the chrome process via
   SendProcessPrint to request the chrome process print the last page.
2. The content process sends *FinalizePrint* to the chrome process via
   SendFinalizePrint to notify the chrome that there are no more outstanding
   print requests, and that the chrome process can release interal resource
   now.
3. The content process receive PageProcessed message from the chrome process.

This calling sequence is fine for sync style PrintTarget (even though the
FinalizePrint message is sent out a bit ealy). Since a sync PrintTarget
completes its print task right after receiving *ProcessPage* message in #1,
sending FinalizePrint before getting PageProcessed response is harmless.

But this message dispatching sequence does cause a problem for async style
PrintTargetEMF. After getting a message sent in #2, PrintTargetEMF release all
resources before getting a EMF conversion response from the PDFium process. So
the last page can not be printed correctly. This patch reorder the #2 and #3
message, that is to send FinalizePrint after the content process received
PageProcessed message of the last page.

MozReview-Commit-ID: 9ZVSrFnuHBU

--HG--
extra : rebase_source : a54b264998abeeeb0814768e1dd3f6749de97def
extra : source : 70ce23becf8840408cd72e7f933a167090519c09
2017-11-06 16:28:51 +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 1162cb1de7 Bug 1399787 - Part 11.b. Use PrintTargetEMF to print chrome documents. r=jwatt
MozReview-Commit-ID: 9BjQ8PIZAWL

--HG--
extra : rebase_source : 510632b481a066e59b1ca8bd254e76afefa3b1a7
extra : source : 2091394a5746d40eec9bfd1acc2741b19f9a54e6
2017-11-13 15:29:32 +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
cku 843516539c 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 : a2de88bb45bc2fe8cbe9a0ca5327f09268a34b6d
extra : intermediate-source : 88df2caad42694dd77f2a518ea8d460d6c88b8c6
extra : source : b920088860904c5d28f3dd2f6eda790dc09be003
2017-10-23 15:57:18 +08:00
cku 3e848a98ac Bug 1399787 - Part 12. Delay dispatching FinalizePrint message until the last page was processed. r=jwatt
For the last page, here is the final three messages sent between the content
process, RemotePrintJobChild, and the chrome process, RemotePrintJobParent, for
printing:
1. The content process sends *ProcessPage* to the chrome process via
   SendProcessPrint to request the chrome process print the last page.
2. The content process sends *FinalizePrint* to the chrome process via
   SendFinalizePrint to notify the chrome that there are no more outstanding
   print requests, and that the chrome process can release interal resource
   now.
3. The content process receive PageProcessed message from the chrome process.

This calling sequence is fine for sync style PrintTarget (even though the
FinalizePrint message is sent out a bit ealy). Since a sync PrintTarget
completes its print task right after receiving *ProcessPage* message in #1,
sending FinalizePrint before getting PageProcessed response is harmless.

But this message dispatching sequence does cause a problem for async style
PrintTargetEMF. After getting a message sent in #2, PrintTargetEMF release all
resources before getting a EMF conversion response from the PDFium process. So
the last page can not be printed correctly. This patch reorder the #2 and #3
message, that is to send FinalizePrint after the content process received
PageProcessed message of the last page.

MozReview-Commit-ID: 9ZVSrFnuHBU

--HG--
extra : rebase_source : 2b4f9efa1352f7255576ae7c688c5a3750b7db42
extra : source : 70ce23becf8840408cd72e7f933a167090519c09
2017-11-06 16:28:51 +08:00
cku 9d58eb170e 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 : 3c1db998b483e7eaea3c6ffae8fdea139fed32b7
2017-11-30 11:55:12 +08:00
cku 8914207153 Bug 1399787 - Part 11.b. Use PrintTargetEMF to print chrome documents. r=jwatt
MozReview-Commit-ID: 9BjQ8PIZAWL

--HG--
extra : rebase_source : 934d6952ee59dfa1329b808fe0f43ba16e31d99c
extra : source : 2091394a5746d40eec9bfd1acc2741b19f9a54e6
2017-11-13 15:29:32 +08:00
cku 8d5d5ad437 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 : ee691497bd439c6505f1f92898a667a9e972fff3
extra : source : f61eb00f83acf45511d8448922212dccb12b05aa
2017-11-05 04:36:37 +08:00
Bogdan Tara e882c9b394 Backed out 22 changesets (bug 1399787) for failing on mozmake.EXE r=backout a=backout on a CLOSED TREE
Backed out changeset 0afbd07d8219 (bug 1399787)
Backed out changeset 80c062fd58fb (bug 1399787)
Backed out changeset b1457eabd34e (bug 1399787)
Backed out changeset d875e45f591e (bug 1399787)
Backed out changeset 8f600ac930ec (bug 1399787)
Backed out changeset c478fb75f5cb (bug 1399787)
Backed out changeset c995f4e18724 (bug 1399787)
Backed out changeset 0b75ef19e695 (bug 1399787)
Backed out changeset 2382a348a6c1 (bug 1399787)
Backed out changeset 93f9a5e253d8 (bug 1399787)
Backed out changeset 5c50bbde0950 (bug 1399787)
Backed out changeset 67e530c129c7 (bug 1399787)
Backed out changeset 682c60e52749 (bug 1399787)
Backed out changeset ff1436ae1ef7 (bug 1399787)
Backed out changeset cb3ae1dc20b2 (bug 1399787)
Backed out changeset bc52b1781641 (bug 1399787)
Backed out changeset d165846cb5e1 (bug 1399787)
Backed out changeset 185368267354 (bug 1399787)
Backed out changeset c385d0f60f8a (bug 1399787)
Backed out changeset 364b5b44932b (bug 1399787)
Backed out changeset 98758e79710d (bug 1399787)
Backed out changeset d56497aa5390 (bug 1399787)
2017-12-07 19:16:08 +02:00
cku 2f6efc5efb 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 : 6b84da35fdc96ae8161552fe5d0764b0c2c0f3ee
extra : intermediate-source : 88df2caad42694dd77f2a518ea8d460d6c88b8c6
extra : source : b920088860904c5d28f3dd2f6eda790dc09be003
2017-10-23 15:57:18 +08:00
cku 13a48506ea Bug 1399787 - Part 12. Delay dispatching FinalizePrint message until the last page was processed. r=jwatt
For the last page, here is the final three messages sent between the content
process, RemotePrintJobChild, and the chrome process, RemotePrintJobParent, for
printing:
1. The content process sends *ProcessPage* to the chrome process via
   SendProcessPrint to request the chrome process print the last page.
2. The content process sends *FinalizePrint* to the chrome process via
   SendFinalizePrint to notify the chrome that there are no more outstanding
   print requests, and that the chrome process can release interal resource
   now.
3. The content process receive PageProcessed message from the chrome process.

This calling sequence is fine for sync style PrintTarget (even though the
FinalizePrint message is sent out a bit ealy). Since a sync PrintTarget
completes its print task right after receiving *ProcessPage* message in #1,
sending FinalizePrint before getting PageProcessed response is harmless.

But this message dispatching sequence does cause a problem for async style
PrintTargetEMF. After getting a message sent in #2, PrintTargetEMF release all
resources before getting a EMF conversion response from the PDFium process. So
the last page can not be printed correctly. This patch reorder the #2 and #3
message, that is to send FinalizePrint after the content process received
PageProcessed message of the last page.

MozReview-Commit-ID: 9ZVSrFnuHBU

--HG--
extra : rebase_source : d12161e1c8ac6469fc1ecb9514939bd35979d573
extra : source : 70ce23becf8840408cd72e7f933a167090519c09
2017-11-06 16:28:51 +08:00
cku f07e4b883f 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 : 40b66df0674e5a571e647e17957032c6bfedd28e
2017-11-30 11:55:12 +08:00
cku 25c71788a4 Bug 1399787 - Part 11.b. Use PrintTargetEMF to print chrome documents. r=jwatt
MozReview-Commit-ID: 9BjQ8PIZAWL

--HG--
extra : rebase_source : e23b7fc8df2495ede00f3b6747933b4d57266a72
extra : source : 2091394a5746d40eec9bfd1acc2741b19f9a54e6
2017-11-13 15:29:32 +08:00
cku bfe3b297fb 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 : 3531dd6a100e9518d8cb9904326250a8318cdad2
extra : source : f61eb00f83acf45511d8448922212dccb12b05aa
2017-11-05 04:36:37 +08:00
Alex Gaynor 8cb6e552a8 Bug 1414834 - re-land print IPC changes from bug 1319423; r=bobowen
With this patch print IPC no longer requires the child process to create files.
Instead files are opened by the parent and a file descriptor is sent to the
child. This will allow us to sandbox child processes more aggressively.

MozReview-Commit-ID: GQWTYLV01kj

--HG--
extra : rebase_source : 9b91e9b01708d73915a49684c2cec96457650e45
2017-11-03 14:37:15 -04:00
Bob Owen 6ea1901fa9 Bug 1419739 Part 2: Clean up resulting (and some existing) unused printing code. r=jwatt 2017-11-29 07:58:49 +00:00
Bob Owen e17357eb20 Bug 1419739 Part 1: Change selection printing to remove unselected nodes and then print as normal. r=jwatt
Prior to this change, we would print a selection by:
* reflowing the whole document into one infinitely long page
* position at the top of the selection to print the first page
* move the position down by a page length each time to print subsequent pages

This has several shortcomings, detailed in the bug.

This approach uses the original document selection to create an inverted
selection in the document cloned for printing, adding an ellipsis when ranges
start or end in text nodes, then deletes that selection from the document prior
to printing.
2017-11-29 07:58:48 +00:00
Alex Gaynor c8aadb27c8 Bug 1417939 - do not crash in release builds when a PRFileDescStream is closed twice; r=bobowen
This makes it API compatible with std::ostream, which it replaced. This silences a rare crash.

MozReview-Commit-ID: JoNo1qRCb0n

--HG--
extra : rebase_source : bcdce5d57fd0620610a5c797045d95b44fbc9099
2017-11-16 13:38:33 -05:00
Alex Gaynor 016a127546 Bug 1412643 - revert part 3 of the changes from 1319423 to fix print selection; r=bobowen
This will be re-landed with a real fix for print-selection after we branch for 58.

MozReview-Commit-ID: JjhBEiEviVB

--HG--
extra : rebase_source : 15b9a2eccdc5ce001bacb776e15f98f4d368c436
2017-11-03 14:03:02 -04:00
Alex Gaynor abe0912713 Bug 1411984 - Use buffered IO in the content process when writing print data for IPC; r=haik
MozReview-Commit-ID: DJuOP2wtku5

--HG--
extra : rebase_source : b14c2e67adb0c4802297013ea80ec068fb7196c4
2017-10-26 15:08:39 -04:00
Ryan VanderMeulen 37d7c47eef Backed out changeset 8e247550d6cf (bug 1411984) for bustage. 2017-11-01 16:47:19 -04:00
Alex Gaynor 62bc81b4d1 Bug 1411984 - Use buffered IO in the content process when writing print data for IPC; r=haik
MozReview-Commit-ID: DJuOP2wtku5

--HG--
extra : rebase_source : a1b03b1bd85b2bbe073e93c3cd1643c43d449e0c
2017-10-26 15:08:39 -04:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Alex Gaynor bf64667f76 Bug 1409768 - Don't call fsync repeatedly when printing; r=bobowen
Usage of sync was a mistake when porting from the previous std::ostream code.

MozReview-Commit-ID: HwbFVlZMu6t

--HG--
extra : rebase_source : 86d251a9b73013356e4cc9323d35121839fafba9
2017-10-25 14:16:12 -04:00
Nicholas Nethercote 0e8c1cb1b7 Bug 1410288 - Change nsIPrintProgressParams' attributes from wstring to AString. r=bobowen.
It makes the C++ code nicer.

--HG--
extra : rebase_source : 773d52f787eafd7bf9d5b6b0d84f0c96692d3924
2017-10-19 11:32:37 +11:00
Sebastian Hengst 32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Kris Maglione 663e9cb7fa Bug 1404198: Part 2e - Switch to NS_NewTimer* in layout. r=njn
MozReview-Commit-ID: 2WxyAXpJ3Fg

--HG--
extra : rebase_source : 4166c82c86558f79a4b41566a9997584e5fc94cf
2017-10-15 23:13:31 -07:00
Alex Gaynor e6c660f838 Bug 1319423 - Part 3 - Change the print IPC to not require the content process to create a temporary file; r=bobowen
MozReview-Commit-ID: GLhTbfREk0n

--HG--
extra : rebase_source : f8f94b222fffa16ab973d07c940bfd64b5407440
2017-10-03 16:34:18 -04:00
Alex Gaynor b00c32c807 Bug 1319423 - Part 2 - Switch away from std::ifstream to PRFileDesc in PrintTranslator; r=jrmuizel
MozReview-Commit-ID: 6ucwbGkqOQ0

--HG--
extra : rebase_source : ab0540e2b7d61108c8c550d8bf8b8a594364f90a
2017-10-03 13:23:57 -04:00
Alex Gaynor 41d8032290 Bug 1319423 - Part 1 - Introduce DrawEventRecorderPRFileDesc to allow switching away from std::ofstream in printing; r=jrmuizel
MozReview-Commit-ID: 1gn8J2fhejS

--HG--
extra : rebase_source : 02b6224c2788964c375092e58174efbacfdbdba5
2017-10-03 12:29:15 -04:00
Kyle Machulis 1cc8b01353 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo

--HG--
extra : rebase_source : 29854f1374c6ad318da0b5b68be23507667c3be4
2017-10-06 13:27:23 -07:00
Nicholas Nethercote c0a1cf9b49 Bug 1407103 - Convert wstring attributes to AString in widget/nsIPrint*.idl. r=bobowen.
This avoids a lot of mismatches between nsAString and char16_t*, thus removing
many getter_Copies() and ToNewUnicode() and get() calls, and generally making
things simpler.

Note: the patch removes GetDefaultPrinterNameFromGlobalPrinters() by simply
inlining it at its two callsites, which is easy with the changed types.

--HG--
extra : rebase_source : 9ab9b3694f093fc9b22c7f8e2394a98674d76c11
2017-10-09 10:08:09 +11:00
Kyle Machulis 669ff05b49 Bug 1406525 - Remove nsIDOMHTMLLinkElement; r=bz
MozReview-Commit-ID: 4xUSQ8SiIqX
2017-10-09 16:09:38 -07:00
Sebastian Hengst b834f0d177 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Kyle Machulis 2090426dc0 Bug 1405792 - Remove nsIDOMHTMLIFrameElement r=bz
MozReview-Commit-ID: 1u9C66X8j59

--HG--
extra : rebase_source : 5d87fe933170e32fbb44e24ec843623e143164d2
2017-10-04 20:41:24 -07:00
Kyle Machulis e54a4653ba Bug 1404079 - Remove nsIDOMHTMLFrameElement; r=bz
MozReview-Commit-ID: GSvMwRpl7g4

--HG--
extra : rebase_source : a5e8ee45bae90eaa9ecdcc6f0bac0c9dac0ce2c8
2017-09-28 19:06:14 -07:00
Kyle Machulis e6d0a7ad13 Bug 1402180 - Remove nsIDOMHTMLAreaElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAreaElement, replacing it
with binding class usage.

MozReview-Commit-ID: IaX4JFTPZn6

--HG--
extra : rebase_source : 79f9200c6ff9e081a5d9bc21eaa605f88caa99e9
2017-09-21 17:52:28 -07:00
Kyle Machulis a3876f104a Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-26 11:41:28 -07:00
Sebastian Hengst 5ed0b93c50 Backed out changeset 26805294a547 (bug 1389650) 2017-09-26 10:47:41 +02:00
Kyle Machulis e2ace7d91f Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-25 23:12:44 -07:00
Kyle Machulis 9b4ac7e03f Bug 1402102 - Remove nsIDOMHTMLObjectElement; r=bz
Removes the nsIDOMHTMLObjectElement XPCOM interface, replacing it with
HTMLObjectElement and FromContent conversion usage.

MozReview-Commit-ID: dmsjSO97uh

--HG--
extra : rebase_source : 9b2c25b8681f754bc34233afccdb6fc5d38f0804
2017-09-22 17:05:12 -07:00
L. David Baron 98d3342e92 Bug 1405875 - Remove unneeded QueryInterface to nsIContentViewerFile. r=mats
nsDocumentViewer is the only implementation of both nsIContentViewer and
of nsIContentViewerFile.

This helps to make nsIContentViewerFile unused so that we can remove it
later in this patch series.

MozReview-Commit-ID: EgsgrXfTmx1
2017-10-05 11:15:57 -07:00
L. David Baron 70c24e3e54 Bug 1405875 - Remove debug file mechanism from printing. r=mats
This was used only by nsRegressionTester::DumpFrameModel, which was
removed in the previous patch.

MozReview-Commit-ID: I8fS7vzlFQw
2017-10-05 11:15:57 -07:00
Makoto Kato 6454f3ca73 Bug 1263503 - memory leak of filename into layout/printing/nsPrintEngine.cpp. r=mantaroh
"fileNameStr = fileName;" will be fileNameStr.Assign(fileName), so this causes small memory leak.  We should use Adopt, getter_copies, or AString parameter instead.

MozReview-Commit-ID: 5VTgttj2LdK

--HG--
extra : rebase_source : b372f04b210655e754b35fe4ebb2b8a32a19d6bf
2017-09-11 10:42:22 +09:00
Masayuki Nakano 4ce89d8f61 Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug
With previous change, KeyboardEvent is dispatched even when invisible window
has focus.  However, nsRootWindow::GetControllerForCommand() returns controller
for focused window even when the window is invisible because it uses
nsFocusManager::GetFocusedDescendant() to retrieve focused window.

Perhaps, we can assume that users won't expect to do something with invisible
window when they type some keys.  Then, nsRootWindow::GetControllerForCommand()
should return controller for visible ancestor window if focused window is
invisible.

This patch makes nsFocusManager::GetFocusedDescendant() can return only visible
descendants.  However, it already has a bool argument.  Therefore, it should
have a flag instead of adding new flag.  Most changes of this patch is replacing
its callers.

Then, nsRootWindow::GetControllerForCommand() and nsRootWindow::GetControllers()
should have a bool flag if it should return controller(s) for visible window.
This patch adds a bool flag for it.  Fortunately, the interface isn't scriptable.

Finally, this patch makes nsXBLPrototypeHandler::DispatchXBLCommand() and
EventStateManager::DoContentCommandEvent() retrieve controller for visible
window since they are always handles user input.

MozReview-Commit-ID: GygttTHuKRm

--HG--
extra : rebase_source : 1341273c4606298cb9b890b9312d9f5c8a75d144
2017-09-07 22:54:49 +09:00
Masayuki Nakano b3926cc517 Bug 1391645 - Make nsPrintEngine::SetupToPrintContent() proceed with the print even when mPrt->mPrintObject->mPresShell and mPrt->mPrintObject->mPresContext are nullptr but mIsCreatingPrintPreview is false r=dholbert
Bug 1376693 added a null-check to bail from print operations if
mPresShell/mPresContext are null, to avoid some null-deref crashes.  However,
it turns out it's possible for these variables to be null under normal
conditions -- for example, when nsPrintEngine is printing documents,
mPrt->mPrintObject->mPresShell and mPrt->mPrintObject->mPresShell can be nullptr
if the document has <frameset> element and it's printing only content of a
<frame> element or all <frame> elements separately.

This special frameset-printing mode can cause these variables to be null;
however, the crash occurred only when mIsCreatingPrintPreview is true.  So,
we should check the variables only when it's true.

Fortunately:
    * the null-deref crashes that Bug 1376693 wanted to avoid were all in code
      that we only visit when mIsCreatingPrintPreview is true (i.e. during print
      preview).
    * this special frameset-printing mode (which causes these variables to be
      null) _cannot be used during print preview_.

So, we can avoid the print-preview-specific crashes without breaking
frameset-printing by simply making our null-check bail-out conditional on
mIsCreatingPrintPreview.

MozReview-Commit-ID: FJ3ynrXTxnI

--HG--
extra : rebase_source : 788ab55840c725dc401007b605c035c053049edf
2017-08-21 14:56:07 +09:00
Masatoshi Kimura 5f035965ac Bug 1390209 - Remove unused nsIDOMHTML*Element interfaces. r=qdot
MozReview-Commit-ID: DagD3IHhRZy

--HG--
extra : rebase_source : 2add5ad8e9181ba9bf29f53a6df75b730ab5ea78
2017-08-15 01:31:47 +09:00
Kyle Machulis 649634a721 Bug 1387184 - Remove nsIDOMHTMLEmbedElement; r=bz
Removes nsIDOMHTMLEmbedElement and all references. HTML elements are
now handled by WebIDL. With the deprecation of extensions, XPCOM
interfaces to HTML elements are no longer needed.

MozReview-Commit-ID: DI4XVvdgPDI

--HG--
extra : rebase_source : 74bd92619e3d1db04c3dd40ec3022474fe1d647c
2017-08-09 12:05:08 -07:00
Nicholas Nethercote 1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Tobias Schneider 3880ddff03 Bug 1382327 - (reftest) Rename reftest-print to reftest-paged. r=dbaron
--HG--
extra : rebase_source : c4e47e2de8d615c77e7e9ce88f6b21c9d15c92e4
2017-07-26 22:53:46 -07:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Masayuki Nakano 8661a7547b Bug 1382118 - Make nsPrintEngine::AfterNetworkPrint() do nothing if mPtr is nullptr r=dholbert
According to the crash reports, nsPrintEngine::AfterNetworkPrint() may be called after nsPrintEngine::Destroy() is called.  In this case, the method should do nothing because it's already been destroyed.

MozReview-Commit-ID: IwY9fR1OUwU

--HG--
extra : rebase_source : 6fb2e23a1e30da59c4c8823e72b8a4460c8adb28
2017-07-22 00:43:38 +09:00
Masayuki Nakano 80bbd2acaf Bug 1376693 - part3: Make callers of nsPrintEngine::Print() and nsPrintEngine::PrintPreview() guarantee that instance of nsPrintEngine won't be deleted during the calls r=dholbert
This patch makes callers of nsPrintEngine::Print() and
nsPrintEngine::PrintPreview() grab the nsPrintEngine instance with local
variable before calling them.  That guarantees that instance of nPrintEngine
won't be deleted during the calls.  (We already had a RefPtr in CommonPrint
that basically did this.  This patch moves it out to the callers to strengthen
its guarantee.)

MozReview-Commit-ID: 2jlYC4RKAg6

--HG--
extra : rebase_source : e6eac8df88e1d81d67a879786a2403ca00e84036
2017-07-19 14:06:04 +09:00
Masayuki Nakano 70f0bb4639 Bug 1376693 - part2: Make nsPrintEngine::DoCommonPrint() stop initializing the instance when the owner stops using the instance r=dholbert
nsPrintEngine::FinishPrintPreview() may be called when nsAutoScriptBlocker is destroyed in nsPrintEngine::DoCommonPrint().  That means that the owner stopped print preview with the instance.  In this case, nsPrintEngine::DoCommonPrint() doesn't need to keep initializing the instance anymore.

MozReview-Commit-ID: DRQfmyW9FEL

--HG--
extra : rebase_source : a49c0f5c74c24710334559496d173c3bae08db01
2017-07-18 19:03:36 +09:00
Masayuki Nakano cf239d5fa0 Bug 1376693 - part1: Make nsPrintEngine::SetupToPrintContent() return early if mPrt->mPrintObject isn't initialized r=dholbert
nsPrintObject::mPresShell and nsPrintObject::mPresContext are initialized by
nsPrintEngine::ReflowPrintObject().  However, while
nsPrintEngine::DoCommonPrint() is initializing mPrt and mPrintObject,
destroying nsAutoScriptBlocker may cause calling nsDocumentViewer::Destroy()
or nsPrintEngine::FinishPrintPreview() directly.  Then,
nsPrintEngine::SetupToPrintContent() will be called.  Therefore,
nsPrintEngine::SetupToPrintContent() sometimes see uninitialized mPrt, or
mPrt->mPrintObject->mPresShell and mPrt->mPrintObject->mPresContext.

Therefore, this patch makes nsPrintEngine::SetupToPrintContent() check whether
the necessary objects are already initialized.  When one of them is not
initialized as expected, it won't to do anything.

Note that mPrt->mPrintObject is never nullptr with current design, but this
patch makes the method check it for preventing similar crash which might be
regressed with other bug fix in the future.

MozReview-Commit-ID: JKfObRm5enm

--HG--
extra : rebase_source : 977e9ffd7fc43fbeb3fac7dbd640df5a426a7427
2017-07-19 13:50:35 +09:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Lee Salzman 2d696d5c34 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Sebastian Hengst 522fc18c93 Backed out changeset 24421d72ba08 (bug 1376026) 2017-07-07 21:42:09 +02:00
Lee Salzman ab6885d706 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Masayuki Nakano 61af94acbd Bug 1367683 Optimize initializing nsRange r=smaug
nsRange::DoSetRange() adds/remove its root to/from mutation observer, initializes common ancestor, registers itself to the common ancestor, unregisters itself from old common ancestor, and notifies selection listeners of selection change.

However, those runtime cost is expensive but on the other hand, a lot of callers set both start and end of the range and that causes calling DoSetRange() twice.

This patch renames Set() to SetStartAndEnd() for easier to understand the meaning and make it call DoSetRange() only once.

MozReview-Commit-ID: FRV55tuBAgg

--HG--
extra : rebase_source : 67adf929cf119e2425f7d3741651217522094590
2017-05-30 13:18:25 +09:00
Masayuki Nakano 3def411e37 Bug 1360135 Get rid of nsPrintData::mSelectedPO because it's unused r=dholbert
MozReview-Commit-ID: 3nG5ZPXOsvq

--HG--
extra : rebase_source : cc01c2a44d458f59d595cba95e5b2bd45cd9061f
2017-05-10 17:25:56 +09:00
Masayuki Nakano d11d55f55f Bug 1354443 part.4 nsPrintData should guarantee that object which has nsIWebProgressListener interface won't be released during calling a method of it r=dholbert
Although, this should be rewritten with range-based for loop, this patch just making them use nsCOMPtr to refer the objects.

MozReview-Commit-ID: IJBWs8CTyCF
2017-05-02 17:07:45 +09:00
Masayuki Nakano be2208abd2 Bug 1354443 part.2 nsPrintEngine::Disconnect() should clear mPrintObj r=dholbert
MozReview-Commit-ID: 1fUZ8YJCvxh
2017-04-27 17:17:20 +09:00
Masayuki Nakano 27a786a810 Bug 1354443 part.1-2 Methods of nsPrintEngine should guarantee that objects owned by nsPrintData won't be released when they're referred by calling methods via their arguments r=dholbert
For example, mPrt->mPrintObject is owned by mPrt.  When nsPrintEngine needs to
call a method which takes a reference to mPrt->mPrintObject, the caller should
grab the mPrt instance for guaranteeing that mPrt->mPrintObject won't be deleted
during the method-call.

MozReview-Commit-ID: BiOQwVKdWM1
2017-05-12 13:43:31 +09:00
Masayuki Nakano 3fd5206e5b Bug 1354443 part.1-1 Make nsPrintData refcountable r=dholbert
MozReview-Commit-ID: 78azPbH9S9x
2017-05-09 17:08:20 +09:00
Nathan Froyd c1d1748428 Bug 1359490 - add an event loop spinning abstraction function; r=gerald
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
2017-05-15 09:34:19 -04:00
Jonathan Watt 4a322bd7c5 Bug 1360350 - Prevent crashes when nsPrintEngine::DoCommonPrint fails between when it sets mPrt and when it calls InitPrintDocConstruction. r=bobowen
MozReview-Commit-ID: Lf1R9p59DOz
2017-04-20 16:00:33 +01:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Jonathan Watt e08760adb5 Bug 1359449 - Remove NS_NewPagePrintTimer. r=mstange
MozReview-Commit-ID: 3SkqE086Ake
2017-04-06 18:07:39 +01:00
Lee Salzman 28471864af Bug 1355931 - move font serialization from ScaledFont to UnscaledFont. r=jrmuizel
MozReview-Commit-ID: 3d1XMoe2BKj
2017-04-14 14:11:00 -04:00
Farmer Tseng 9294057596 Bug 1342872 - part2: Name the nsPagePrintTimer runnable and associate its nsITimers with a DocGroup r=bevistseng,jwatt
MozReview-Commit-ID: AfC84m1CoDm

--HG--
extra : rebase_source : 06eebd0e79d432a3aaa416e134c70bfbeb6627de
2017-03-30 22:49:43 +08:00
Farmer Tseng 6bb21eacb6 Bug 1342872 - part1: Label the runnable dispatched by NS_DispatchToCurrentThread in nsPrintEngine r=bevistseng,jwatt
MozReview-Commit-ID: BZhRUglmbMW

--HG--
extra : rebase_source : 6280fbd5d1c3d4c47c7fd925abfd9e00384b1ab6
2017-03-28 11:50:16 +08:00
Bevis Tseng f18a29591e Backed out changeset 44eae28def02 (bug 1342872) for crash if printing from print preview. 2017-03-29 09:50:01 -04:00
Bevis Tseng 400c5650b3 Backed out changeset ee20d9c4b63c (bug 1342872) for crash if printing from print preview. 2017-03-29 09:48:57 -04:00
Farmer Tseng e5eabed3c9 Bug 1342872 - part2: Name the nsPagePrintTimer runnable and associate its nsITimers with a DocGroup r=jwatt
MozReview-Commit-ID: 3f3n0l1LgHO

--HG--
extra : rebase_source : 23abde74a90e989630e74fd17b3a1f42a2a4a0d2
2017-03-17 15:22:41 +08:00
Farmer Tseng 737c7bae80 Bug 1342872 - part1: Label the runnable dispatched by NS_DispatchToCurrentThread in nsPrintEngine r=jwatt
MozReview-Commit-ID: EfsfjZ73hhO

--HG--
extra : rebase_source : fd66d6d86800e24442e9543250b65090666f55e0
2017-03-17 15:02:06 +08:00
Ting-Yu Lin 0be6d30488 Bug 1342994 Part 2 - Use UniquePtr to replace explicit new/delete and non-owing pointers in printing APIs. r=dholbert
Also, rewrite some for-loops as range-based.

Other APIs still using nsPrintObject* involve with
nsPrintData::mPrintDocList or nsPagePrintTimer::mPrintObj.

nsPrintEngine::FindPrintObjectByDOMWin() could have its argument converted
to UniquePtr, but it needs to return nullptr to represent "found nothing."
Therefore, I leave its argument as it was for consistency.

MozReview-Commit-ID: 7hXaVy5IKHQ

--HG--
extra : rebase_source : 6be730b85d5566446942b8cdc31b49846384bc25
2017-03-06 16:28:20 +08:00
Ting-Yu Lin d58538758d Bug 1342994 Part 1 - Strip trailing whitespaces in nsPrintData, nsPrintEngine and nsPrintObject. r=dholbert
MozReview-Commit-ID: GGBrj4Eo45L

--HG--
extra : rebase_source : c52cb4744133c2628b495d47192bed852384327b
2017-03-06 15:35:39 +08:00
Mats Palmgren 6ef6efaea3 Bug 1340771 part 2 - Introduce a WeakFrame class for heap allocated weak frame pointers, stored in a hashtable for fast lookup. r=tn
* * *
Bug 1340771 part 3 - Change existing heap allocated AutoWeakFrame instances to use WeakFrame instead.  r=tn

MozReview-Commit-ID: GSuUiy98jBa
2017-03-01 18:03:14 +01:00
Mats Palmgren d13aaf9ce0 Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Bob Owen 84aa76cafb Bug 1141756 Part 1: Add null check for mPresShell in nsPrintEngine::GetSeqFrameAndCountPagesInternal. r=dholbert 2017-03-01 12:11:58 +00:00
Bobby Holley a7ef58a9ab No Bug - Twiddle stylo reftest expectations some more. r=me
MozReview-Commit-ID: H1YoN7HpmO1
2017-02-25 17:58:53 -08:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Julian Hector 3610edb99c Bug 1329216 - Move default printer name querying. r=bobowen 2017-02-13 13:08:20 +01:00
Cameron McCormack 90e83367ae Bug 1334768 - stylo: Test expectation adjustments for for 2017-02-09 merge. r=me
MozReview-Commit-ID: AhvCAu3NYrb
2017-02-09 21:11:09 +08:00
Markus Stange 6efd7c73b1 Bug 1298218 - Use DisplayItemClipChain for tracking clips on display items. r=mattwoodrow,tnikkel
This is the bulk of the changes.
 - DisplayItemScrollClip is removed. Instead, we will have 1) ActiveScrolledRoot
   and 2) DisplayItemClipChain.
 - ActiveScrolledRoot points to a scroll frame and allows traversing up the
   scroll frame chain.
 - DisplayItemClipChain is a linked list of clips, each clip being associated
   with the ActiveScrolledRoot that moves this clip.
 - Each display item has an ActiveScrolledRoot and a clip chain.
 - nsDisplayItem::GetClip returns the item of the clip chain that scrolls with
   the item's ASR. The separation between "regular clip" and "scroll clips"
   mostly goes away.
 - Tracking clips in the display list builder's clip state happens very
   similarly to how regular clips used to be tracked - there's a clip chain for
   content descendants and a clip chain for containing block descendants. These
   clip chains are intersected to create the combined clip chain.
 - There are strict rules for the ASR of a container item: A container item's
   ASR should be the innermost ASR which the item has finite clipped bounds with
   respect to.
 - At some point in the future, ASRs and AGRs should be reunified, but I haven't
   done that yet, because I needed to limit the scope of the change.

MozReview-Commit-ID: KYEpWY7qgf2

--HG--
extra : rebase_source : c727f6300a35463750639e165bfa37374c06b851
2017-01-31 17:07:35 -05:00
Cameron McCormack 9c4ea5685f Bug 1334768 - stylo: Back out 800030115d2e and 404506488cfb for being completely wrong due to bug 1334938.
MozReview-Commit-ID: 8CGTqmtlguT
2017-01-30 16:49:54 +08:00
Cameron McCormack 7805d4716e Bug 1334768 - stylo: Test expectation adjustments for 2017-01-29 merge.
MozReview-Commit-ID: FFmvs6SHIwW
2017-01-29 15:31:56 +08:00
Bob Owen bba735b6ef Bug 1324000: Use nsWeakFrame to hold nsIPageSequenceFrame member in nsPrintEngine. r=smaug 2017-01-09 08:26:31 +00:00
Bob Owen 554feff78a Bug 1324064: Stop accessing printer devices in the child when printing via parent. r=jimm
This should remove all access to printer devices on Windows, there might by some other OS specific code which still does.
2017-01-06 11:29:11 +00:00
Cameron McCormack babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Jonathan Watt eb5cbfaadf Bug 1328508 - Increase the print watchdog timer for debug builds, and add some warnings to make watchdog timeouts visible. r=bobowen 2016-12-19 10:12:39 +00:00
Olli Pettay 1ebfdf5c0e Bug 1321566 Part 2: Use Disconnect pattern to manage nsPrintEngine member in nsPagePrintTimer. r=bobowen 2017-01-03 11:10:11 +00:00
Bob Owen dbcaf9922d Bug 1321566 Part 1: Use UniquePtr to hold nsPrintData in nsPrintEngine. r=jwatt 2017-01-03 11:10:11 +00:00
Cameron McCormack d4d8ba1d5f Bug 1324624 - stylo: Mark currently failing crashtests with asserts-if(stylo,...). r=xidorn
MozReview-Commit-ID: 7iiwRwiQ8s4
2016-12-21 15:42:36 +08:00
Andrew McCreight fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd 826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Bob Owen 8565d5695d Bug 1279699: Use temporary files instead of shared memory to store the page recordings when printing via parent. r=bas, r=froydnj, r=jimm 2016-11-22 14:06:46 +00:00
Ryan VanderMeulen 21ece8d83a Backed out changeset a4b0052954d2 (bug 1279699) for causing various crash regressions.
--HG--
extra : rebase_source : bf9223381149f34a7b3513eda05fe197ae2db876
2016-12-01 15:25:25 -05:00
Bob Owen 58e9c2a82f Bug 1279699: Use temporary files instead of shared memory to store the page recordings when printing via parent. r=bas, r=froydnj 2016-11-22 14:06:46 +00:00
Kan-Ru Chen f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Jonathan Watt fdc97b0759 Bug 1313386, part 1 - Clean up the beforeprint/afterprint event dispatching code. r=dholbert 2016-11-01 21:29:30 +00:00
Jonathan Watt 07c5338755 Bug 1313525 - Remove the nsIPrintOptions interface. r=mstange
--HG--
rename : widget/nsIPrintOptions.idl => widget/nsIPrinterEnumerator.idl
2016-10-28 00:31:14 +01:00
Jonathan Watt 82b73296ed Bug 1280324, part 3 - Fix various nsDeviceContext::CreateRenderingContext to call CreateReferenceRenderingContext instead. r=edwin 2016-10-27 19:25:01 +01:00
Ben Kelly 0983850a63 Bug 1303167 P6 Rename new suspend and freeze methods to final names. r=smaug 2016-10-26 10:20:16 -07:00
Ben Kelly bf0ca72f77 Bug 1303167 P2 Use new window suspend and freeze methods. r=smaug
* * *
Bug 1303167 P2 interdiff 0001 Review feedback
2016-10-26 10:20:15 -07:00
Mason Chang cd84eadb22 Bug 1258751: Delete the CoreGraphics backend. r=mstange 2016-10-18 23:22:44 -04:00
Olli Pettay bddafc48dd Bug 1305309, backout Bug 1214805, r=backout
--HG--
extra : rebase_source : d86f67ef53b26027d739725829a2ee736d71221e
2016-09-27 01:03:24 +03:00
Nicholas Nethercote f4ec41d9b5 Bug 1297300 - Add missing checks to GetSpec() calls in layout/. r=dholbert,heycam.
--HG--
extra : rebase_source : b3a26866746cde4337f5ffeff94f370b2eb7da3e
2016-08-31 20:10:10 +10:00
Michael Layzell 118a8b7507 Bug 1018486 - Part 4: Changes in layout/, r=bz
MozReview-Commit-ID: BsaKGHsoqOq
2016-09-07 10:50:40 -04:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Olli Pettay 961aa9b24b Bug 1214805, allow navigating when afterprint event is dispatched, r=bz
--HG--
extra : rebase_source : 67bb9b79332b009756781ae3e58aed91a5bdfbfa
2016-09-03 17:33:30 +03:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Bob Owen 5df096d268 Bug 1287446: Check and add nsIPrintProgressParams and print progress listener separately in nsPrintEngine::ShowPrintProgress. r=tnikkel
MozReview-Commit-ID: GngheT4Mizd
2016-08-03 09:50:24 +01:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Ting-Yu Lin d444310eb1 Bug 1277129 Part 1b - Rename nsHTMLReflowState.h/cpp to ReflowInput.h/cpp and fix #includes. r=dbaron
The #includes are fixed by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsHTMLReflowState\.h" "mozilla\/ReflowInput\.h"

MozReview-Commit-ID: FjwHA4YRHNv

--HG--
rename : layout/generic/nsHTMLReflowState.cpp => layout/generic/ReflowInput.cpp
rename : layout/generic/nsHTMLReflowState.h => layout/generic/ReflowInput.h
extra : rebase_source : e4215620717df436a51243cee689286cfabc7c71
2016-07-21 18:36:34 +08:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Bob Owen 0671a5539a Bug 1285942 Part 1: Make RecordedEvent::PlayEvent return a bool and null check DrawTarget creation. r=bas
MozReview-Commit-ID: 8tm7rjFEbw0

--HG--
extra : rebase_source : 5a85bec626644515ef5a261c4cba076bcddf136c
2016-07-18 12:13:04 +01:00
Timothy Nikkel 764c490e8f Bug 1271714. Limit asserts annotations for crashtest to e10s only, cause that's where they happen. 2016-07-13 23:37:13 -05:00
Timothy Nikkel fa07f3610e Bug 1271714. Annotate expected asserts in layout/printing/crashtests/576878.xhtml. r=mstange
The asserts are:

###!!! ASSERTION: Bounds computation mismatch: 'mContainerBounds.IsEqualInterior(mAccumulatedChildBounds)', /layout/base/FrameLayerBuilder.cpp, line 4887
###!!! ASSERTION: bad aListVisibleBounds: 'r.GetBounds().IsEqualInterior(aListVisibleBounds)', /layout/base/nsDisplayList.cpp, line 1637

They happen because we have a wrap list item that contains an out of flow frame with no saved clip data. So the patch for this bug changes the scroll clip of the wrap list item from the scroll clip induced by the root scroll frame to the null scroll clip. All of the display items that the wrap list contains have the root scroll frame scroll clip, so this causes the scroll clipped bounds for the wrap list item to expand to the whole content area. These expanded bounds of the wrap list item get incorporated into the bounds of a parent transform item. Later the wrap list item is flattened away, and so it's no longer around to provide the expanded bounds, leading to the assertions.

I've thought through options like changing how scroll clipped bounds work for wrap list items, but I can't seem to find any solution that would be consistent. The best thing would be to get the proper clip on out of flows we are going to descend into, but I can't think of a good way to do that either in this case (or in general).
2016-07-13 01:08:17 -05:00
Carsten "Tomcat" Book 03c1f7755c Backed out changeset e0e8a6311551 (bug 1271714) 2016-07-13 09:23:55 +02:00
Timothy Nikkel f1af296166 Bug 1271714. Annotate expected asserts in layout/printing/crashtests/576878.xhtml. r=mstange
The asserts are:

###!!! ASSERTION: Bounds computation mismatch: 'mContainerBounds.IsEqualInterior(mAccumulatedChildBounds)', /layout/base/FrameLayerBuilder.cpp, line 4887
###!!! ASSERTION: bad aListVisibleBounds: 'r.GetBounds().IsEqualInterior(aListVisibleBounds)', /layout/base/nsDisplayList.cpp, line 1637

They happen because we have a wrap list item that contains an out of flow frame with no saved clip data. So the patch for this bug changes the scroll clip of the wrap list item from the scroll clip induced by the root scroll frame to the null scroll clip. All of the display items that the wrap list contains have the root scroll frame scroll clip, so this causes the scroll clipped bounds for the wrap list item to expand to the whole content area. These expanded bounds of the wrap list item get incorporated into the bounds of a parent transform item. Later the wrap list item is flattened away, and so it's no longer around to provide the expanded bounds, leading to the assertions.

I've thought through options like changing how scroll clipped bounds work for wrap list items, but I can't seem to find any solution that would be consistent. The best thing would be to get the proper clip on out of flows we are going to descend into, but I can't think of a good way to do that either in this case (or in general).
2016-07-13 01:08:17 -05:00
Masayuki Nakano d960ef26d5 Bug 1278014 part.5 Rename SelectionType::SELECTION_NORMAL to SelectionType::eNormal r=smaug
MozReview-Commit-ID: AAdxTTKEvrk

--HG--
extra : rebase_source : 82e10db6b8b17d4f571625e34bb3c8f1905ef58a
2016-06-09 18:35:22 +09:00
Masayuki Nakano 00591135a4 Bug 1278014 part.2 Define mozilla::SelectionType as an enum class and use it instead of RawSelectionType as far as possible r=smaug
This patch defines mozilla::SelectionType as an enum class.  This is safer than nsISelectionController::SELECTION_* since setting illegal value to its variable is checked at build time.  So, as far as possible, this should be used everywhere (but of course, this isn't available in scriptable interfaces).

And also this implements some useful methods for managing SelectionType and RawSelectionType which are implemented in layout/nsSelection.cpp because nsISelectionController is implemented by both PresShell and nsTextEditorState.  Therefore, implementing one of them may make hard to find them.  On the other hand, nsSelection.cpp is a better file name to look for them.

Note that this patch creates mozilla::Selection::RawType() for binding.  Native code should keep using Selection::Type() but the binding code needs to use RawType() due to impossible to convert from SelectionType to RawSelectionType without explicit cast.

MozReview-Commit-ID: 81vX7A0hHQN

--HG--
extra : rebase_source : d9f88e217c713c60d1c2578ce6421c73ccba8650
2016-06-11 11:06:37 +09:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Bob Owen a66b7bea7f Bug 1270447 Part 3: Authorize silent printing via the parent. r=jimm
MozReview-Commit-ID: IefWVtWwaXc

--HG--
extra : rebase_source : eb62e33244fbe98a07344f7c5e370edb48ce15b5
2016-05-29 19:53:32 +01:00
Bob Owen 9cf07da276 Bug 1270447 Part 1: Use the RemotePrintJob's print settings in the parent when available. r=jimm
MozReview-Commit-ID: 4PnVf4pzHWr

--HG--
extra : rebase_source : 44f19893b27a2f2987cbd7f38d454f5d31aba5c3
2016-05-29 19:53:24 +01:00
Bob Owen 20bfb2b8a0 Bug 1275194: Null check mPrt in nsPrintEngine::FirePrintingErrorEvent before notifying listeners. r=jimm
MozReview-Commit-ID: CSukeDyGAvD

--HG--
extra : rebase_source : 0a90b4e9f34065d8fa31938f917b304b7e370e74
2016-05-24 08:18:54 +01:00
Alexandre Lissy b423621b8a Bug 1273998 - Proper export of printing IPDL with --disable-printing r=bobowen,glandium,?glandium
MozReview-Commit-ID: GNUrl6LKcMm

--HG--
extra : rebase_source : 9c1949b51b87c1d3bf6c8e59b36b6ebed263e22b
2016-05-19 12:25:22 +02:00
Masayuki Nakano 8a70a17c6a Bug 1254755 part.2 Rename WidgetKeyboardEvent::charCode to WidgetKeyboardEvent::mCharCode r=smaug
And mCharCode shouldn't be compared with NS_VK_*, nsIDOMKeyEvent::DOM_VK_*. Additionally, when it's compared with a character constant, cast isn't necessary.

MozReview-Commit-ID: JMT614copjG

--HG--
extra : rebase_source : 69ee3c589e5a71c814ec9a40ac3aab39c789c11d
2016-05-13 16:06:18 +09:00
Masayuki Nakano 3359bad586 Bug 1254755 part.1 Rename WidgetKeyboardEvent::keyCode to WidgetKeyboardEvent::mKeyCode r=smaug
And also WidgetKeyboardEvent::mKeyCode should be compared with NS_VK_* rather than nsIDOMKeyEvent::DOM_VK_*.

MozReview-Commit-ID: IKjQ1nr8XYe

--HG--
extra : rebase_source : 83125cd2523f6b70759f621470aad23b00aae8ae
2016-05-12 17:13:49 +09:00
Bob Owen 2d161a3465 Bug 1189846 Part 9: Add ability to print from the parent process with settings and progress listener. r=jimm, r=smaug
MozReview-Commit-ID: 7IEMByPmC0n
2016-05-16 10:40:54 +01:00
Bob Owen 80ef8208d0 Bug 1189846 Part 8: Make RemotePrintJob a print progress listener forwarder. r=jimm
MozReview-Commit-ID: 4ADQ6Hx46fZ
2016-05-16 10:40:54 +01:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Jonathan Watt 9480920b04 Bug 1263785 - Kill off the deprecated nsINode::GetCurrentDoc. r=baku 2016-03-31 12:46:32 +01:00
Tobias Schneider 7fa6b225c8 Bug 1260480 - Remove mozNoMarginBoxes. r=dbaron 2016-04-06 09:53:00 +02:00
Daniel Holbert 541713fc1f Bug 1245978 part 1: Make nsDocumentViewer::CreateStyleSet directly return the thing it creates. r=heycam 2016-02-29 15:09:13 -08:00
Cameron McCormack 7c95c39734 Bug 1244068 - Part 4: Use StyleSetHandle instead of concrete style set class in most places. r=dholbert 2016-02-24 18:01:11 +11:00
Aidin Gharibnavaz 6863090c8a Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r=smaug
MozReview-Commit-ID: Hm8Owq17KXn

--HG--
extra : transplant_source : 2%82%D5%89%19%94%7C%E7%CA1%99%B5%24%1F5%E1%C0%1F%DE%07
2016-02-12 19:10:07 +03:30
Bob Owen bb75a620a0 Bug 1245246: Add null check for mDocViewerPrint in nsPrintEngine::FirePrintingErrorEvent. r=roc 2016-02-04 08:03:52 +00:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Ting-Yu Lin 2d02ad0652 Bug 1227927 Part 3 - Use ranged-based for-loop to rewrite some simple loops in part 2. r=mats
--HG--
extra : commitid : CcdpGdlMNIk
extra : rebase_source : 9c184cb8107bf6276c237d03d240f8755fd61553
2016-01-29 22:42:15 +08:00
Ting-Yu Lin 1889f6bc41 Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats
--HG--
extra : commitid : 5qtaK1nS8RC
extra : rebase_source : dcc98f423b2446269beb6fa6a9d092ae8213f38e
2016-01-29 22:42:14 +08:00
Bob Owen 1fe62dee68 Bug 1156742 Part 24: Add new Recorded event to record font data. r=bas
We create and destroy ScaledFonts for every piece of text we write.
That causes a huge amount of duplicated data within the recording.
This splits out the recording of the font data itself from the ScaledFont.
The key generated to determine uniqueness could probably be fairly easily faked, but for our purposes that doesn't matter.
2016-01-05 10:08:58 +00:00
Bob Owen ee620e1e8c Bug 1156742 Part 23: Assert in PrintTranslator when a lookup fails. r=bas
In theory these lookups should never fail.
The plan is to move them to release asserts when any bugs have been fixed, as failed lookups may be an indication of data being sent from a compromised renderer.
2016-01-05 10:08:58 +00:00
Bob Owen 6e3ae6eaf0 Bug 1156742 Part 15: Add pref for turning on printing via the parent process. r=mconley 2016-01-05 10:08:57 +00:00
Bob Owen e1c9d379a7 Bug 1156742 Part 14: Complete RemotePrintJob using PrintTranslator. r=mconley 2016-01-05 10:08:57 +00:00
Bob Owen 20e589aec1 Bug 1156742 Part 13: Create a Moz2D PrintTranslator. r=bas
A better solution to the ScaledFonts issue comes in Part 24.
2016-01-05 10:08:57 +00:00
Bob Owen ffbb94296a Bug 1156742 Part 11: Allow RemotePrintJobChild to abort the print. r=roc
This is so the RemotePrintJobParent can abort the printing in the child when something goes wrong.
2016-01-05 10:08:57 +00:00
Bob Owen dd481e414a Bug 1156742 Part 10: Allow RemotePrintJob to influence nsPagePrintTimer. r=roc
Adds a new timer for the RemotePrintJob to notify the nsPagePrintTimer when the last page has finished printing in the parent.
Changed the page delay timer to reset the watch dog count on every page to prevent timeouts due to remote printing.
2016-01-05 10:08:57 +00:00
Bob Owen fdd98bfb6b Bug 1156742 Part 9: Add a new nsIDeviceContextSpec for proxied printing. r=roc
This also changes aPrintToFileName parameter for BeginDocument to an nsAString& from char16_t*.
Having a char16_t* caused a pain with VS2105 where wchar_t != char16_t (as on VS2103), after it had been sent over IPDL.
This could have been worked around with casting, but this seemed like the tidier solution.
2016-01-05 10:08:57 +00:00
Bob Owen c38abff973 Bug 1156742 Part 6: Add RemotePrintJob to PrintSession and PrintData. r=roc, r=mconley
Someone knew that nsIPrintSession would come in handy one day.
2016-01-05 10:08:57 +00:00
Bob Owen 5f9cb1f258 Bug 1156742 Part 5: Add a skeleton RemotePrintJob. r=mconley
The methods will get filled out by later patches, this sets up the IPDL and lifetime management.
2016-01-05 10:08:57 +00:00
Chris Peterson 83fb38f729 Bug 1235306 - Fix -Wimplicit-fallthrough warnings in layout/. r=dholbert
layout/base/nsCSSRendering.cpp:3913:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsCSSRendering.cpp:3943:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsCSSRendering.cpp:4066:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsCSSRendering.cpp:4096:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsCSSRenderingBorders.cpp:646:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsLayoutUtils.cpp:4639:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsLayoutUtils.cpp:4659:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsLayoutUtils.cpp:5004:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/nsLayoutUtils.cpp:5200:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/TouchManager.cpp:192:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/TouchManager.cpp:196:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFlexContainerFrame.cpp:2497:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFlexContainerFrame.cpp:2687:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFlexContainerFrame.cpp:2973:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFrame.cpp:4277:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFrame.cpp:4310:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFrame.cpp:4313:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFrame.cpp:6703:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsFrame.cpp:6751:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsGridContainerFrame.cpp:2649:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsGridContainerFrame.cpp:935:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsHTMLReflowState.cpp:1141:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsHTMLReflowState.cpp:1145:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsHTMLReflowState.cpp:1148:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsLineLayout.cpp:2942:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsLineLayout.cpp:2958:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsLineLayout.cpp:3134:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/generic/nsLineLayout.cpp:3150:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/printing/nsPrintPreviewListener.cpp:199:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/CSSLexer.cpp:129:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/Declaration.cpp:1069:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/Declaration.cpp:366:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/Declaration.cpp:442:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/Declaration.cpp:981:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsComputedDOMStyle.cpp:3597:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsComputedDOMStyle.cpp:3616:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsComputedDOMStyle.cpp:539:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsComputedDOMStyle.cpp:540:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsComputedDOMStyle.cpp:542:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10628:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10630:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10671:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10673:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10769:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10770:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10774:43 [-Wimplicit-fallthrough] fallthrough annotation does not directly precede switch label
layout/style/nsCSSParser.cpp:10775:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10776:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:10780:43 [-Wimplicit-fallthrough] fallthrough annotation does not directly precede switch label
layout/style/nsCSSParser.cpp:2542:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:2715:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:4124:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:4313:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9513:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9697:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9699:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9743:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9745:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9826:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9827:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9832:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9833:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsCSSParser.cpp:9980:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsRuleNode.cpp:160:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsRuleNode.cpp:187:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsRuleNode.cpp:722:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/nsRuleNode.cpp:753:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/StyleAnimationValue.cpp:139:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/StyleAnimationValue.cpp:1687:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/style/StyleAnimationValue.cpp:1869:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/FixedTableLayoutStrategy.cpp:264:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/FixedTableLayoutStrategy.cpp:267:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsCellMap.cpp:1043:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsCellMap.cpp:930:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsCellMap.cpp:953:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsCellMap.cpp:997:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:6943:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:6953:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:6959:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:6966:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:6974:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:7151:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:7161:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:7170:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:7177:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableFrame.cpp:7186:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/nsTableRowFrame.cpp:663:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/SpanningCellSorter.cpp:112:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/SpanningCellSorter.cpp:142:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/tables/SpanningCellSorter.cpp:157:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsResizerFrame.cpp:86:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsResizerFrame.cpp:87:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsResizerFrame.cpp:88:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsResizerFrame.cpp:90:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsSliderFrame.cpp:551:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsSliderFrame.cpp:560:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/xul/nsXULPopupManager.cpp:2268:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-11-22 21:33:47 -08:00
Wes Kocher a5249b6201 Backed out 25 changesets (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
Backed out changeset 31c0aadae8e7 (bug 1156742)
Backed out changeset f08df57ff700 (bug 1156742)
Backed out changeset 90c026d5dcb1 (bug 1156742)
Backed out changeset 8c6d14d80238 (bug 1156742)
Backed out changeset 72d86b0471c9 (bug 1156742)
Backed out changeset 363829accc09 (bug 1156742)
Backed out changeset 16360fe94d54 (bug 1156742)
Backed out changeset 5355c636a81a (bug 1156742)
Backed out changeset 18844d26b873 (bug 1156742)
Backed out changeset 99df86591613 (bug 1156742)
Backed out changeset 7ac1c7e15a11 (bug 1156742)
Backed out changeset de352000aae1 (bug 1156742)
Backed out changeset 4dd34ea230c6 (bug 1156742)
Backed out changeset 48c6ce65a5c2 (bug 1156742)
Backed out changeset dd52947f73c6 (bug 1156742)
Backed out changeset 5fe429ee880c (bug 1156742)
Backed out changeset dedca8fb19b0 (bug 1156742)
Backed out changeset d748b1354f92 (bug 1156742)
Backed out changeset 7f8e59588518 (bug 1156742)
Backed out changeset b90d302c57f6 (bug 1156742)
Backed out changeset 7a4da453572c (bug 1156742)
Backed out changeset a40eea914519 (bug 1156742)
Backed out changeset 99a8859afcdb (bug 1156742)
Backed out changeset 4934e88b2d7a (bug 1156742)
Backed out changeset 79733166f05e (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE

--HG--
extra : amend_source : beeb6abbcc724b79ac166e828efa78dc4c5301da
2015-12-21 13:47:33 -08:00
Bob Owen fb35888c83 Bug 1156742 Part 24: Add new Recorded event to record font data. r=bas
We create and destroy ScaledFonts for every piece of text we write.
That causes a huge amount of duplicated data within the recording.
This splits out the recording of the font data itself from the ScaledFont.
The key generated to determine uniqueness could probably be fairly easily faked, but for our purposes that doesn't matter.
2015-12-21 20:33:14 +00:00
Bob Owen 016d8435c1 Bug 1156742 Part 23: Assert in PrintTranslator when a lookup fails. r=bas
In theory these lookups should never fail.
The plan is to move them to release asserts when any bugs have been fixed, as failed lookups may be an indication of data being sent from a compromised renderer.
2015-12-21 20:33:14 +00:00
Bob Owen 61ff168ec9 Bug 1156742 Part 15: Add pref for turning on printing via the parent process. r=mconley 2015-12-21 20:33:14 +00:00
Bob Owen 7c7bc68d35 Bug 1156742 Part 14: Complete RemotePrintJob using PrintTranslator. r=mconley 2015-12-21 20:33:14 +00:00
Bob Owen 982220b6d8 Bug 1156742 Part 13: Create a Moz2D PrintTranslator. r=bas
A better solution to the ScaledFonts issue comes in Part 24.
2015-12-21 20:33:13 +00:00
Bob Owen b1c615dd5b Bug 1156742 Part 11: Allow RemotePrintJobChild to abort the print. r=roc
This is so the RemotePrintJobParent can abort the printing in the child when something goes wrong.
2015-12-21 20:33:13 +00:00
Bob Owen 48ebbb6b5a Bug 1156742 Part 10: Allow RemotePrintJob to influence nsPagePrintTimer. r=roc
Adds a new timer for the RemotePrintJob to notify the nsPagePrintTimer when the last page has finished printing in the parent.
Changed the page delay timer to reset the watch dog count on every page to prevent timeouts due to remote printing.
2015-12-21 20:33:13 +00:00
Bob Owen 529a96f97d Bug 1156742 Part 9: Add a new nsIDeviceContextSpec for proxied printing. r=roc
This also changes aPrintToFileName parameter for BeginDocument to an nsAString& from char16_t*.
Having a char16_t* caused a pain with VS2105 where wchar_t != char16_t (as on VS2103), after it had been sent over IPDL.
This could have been worked around with casting, but this seemed like the tidier solution.
2015-12-21 20:33:13 +00:00
Bob Owen a3c64d5bb8 Bug 1156742 Part 6: Add RemotePrintJob to PrintSession and PrintData. r=roc, r=mconley
Someone knew that nsIPrintSession would come in handy one day.
2015-12-21 20:33:13 +00:00
Bob Owen 4797734560 Bug 1156742 Part 5: Add a skeleton RemotePrintJob. r=mconley
The methods will get filled out by later patches, this sets up the IPDL and lifetime management.
2015-12-21 20:33:13 +00:00
Boris Zbarsky 1f6bbd4987 Bug 1230092. Make nsIDOMCustomEvent no longer inherit from nsIDOMEvent, so that CustomEvent doesn't end up with multiple inheritance from nsIDOMEvent. r=smaug 2015-12-04 09:51:04 -05:00
Nicholas Nethercote 3993af028e Bug 1229202 (part 1) - Remove some unused arguments in nsPrintEngine's functions. r=mattwoodrow.
The first four arguments of GetPageRangeForSelection() are not used usefully,
nor are the first two arguments of FindSelectionBounds() and
FindSelectionBoundsWithList(). (Mutual recursion between the latter two
obscured this fact.)

--HG--
extra : rebase_source : c36198d3a91ddb6aa5089c23c7dd5eb33c74a2c8
2015-12-02 15:32:16 -08:00
sajitk 85550613ed Bug 1219470 - Replace PRLogModuleInfo with LazyLogModule. r=roc 2015-11-05 23:35:03 +01:00
Kyle Huey c7d3c4e21a Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Chris Peterson 71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Mike Conley 2606bb64e2 Bug 1199434 - Fire an event when the print engine encounters an error. r=smaug
The print engine used to directly cause a prompt to be displayed in the most
recent window in the event of an error. This patch causes the print engine to
fire an event instead so that the front-end can choose to display or ignore
the error.

--HG--
extra : commitid : J2icIUiO8Lv
extra : rebase_source : 0288d18cf29b8c167da2be9b907f234cf4c3f2b7
2015-09-16 16:12:43 -04:00
Milan Sreckovic 865e1ef45c Bug 1202703 - Part 1 - CreateRenderingContext can fail. r=mattwoodrow 2015-09-10 12:31:00 +02:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Masayuki Nakano ba5b3f3fe6 Bug 895274 part.11 Rename NS_KEY_DOWN to eKeyDown r=smaug 2015-08-29 08:58:27 +09:00
Masayuki Nakano 66f2c27305 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Birunthan Mohanathas 7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Daniel Holbert dcf322f0a1 Bug 1177927 followup: use . instead of -> to call method on nsFrameList, to fix compile error. 2015-06-27 03:30:36 -07:00
Daniel Holbert 3a2da5fce0 Bug 1177927: Use nsFrameList::GetLength() instead of manual iteration to count pages in nsPrintEngine. r=tn 2015-06-27 03:07:30 -07:00
Milan Sreckovic 50bc2f0ddc Bug 1019063 - Check for ::CreateDCW failing when printing. r=dvander 2015-06-18 08:18:00 +02:00
Eric Rahm 75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Eric Rahm f50b813989 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:28 -07:00