Commit Graph

627 Commits

Author SHA1 Message Date
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