Commit Graph

59 Commits

Author SHA1 Message Date
Nika Layzell
245b18cd39 Bug 1577711 - Part 1: Revert calling SetDocument earlier during clone from 1568055, r=smaug
This change was causing issues with images not displaying and iframes not
displaying correctly after multiple print preview calls.

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

--HG--
extra : moz-landing-system : lando
2019-09-05 14:55:11 +00:00
Nika Layzell
d75c40bc90 Bug 1568055 - Part 1: SetDocument earlier in the clone operation for print, r=farre
This should ensure that the inner window for each document is set up correctly
before iframe elements are created in them during a static clone. Other,
non-static-clone cases are not affected because they cannot load subframes.

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

--HG--
extra : moz-landing-system : lando
2019-07-23 12:26:31 +00:00
Jonathan Watt
88e7ba6db9 Bug 1558180. Comment the mysterious OnPageHide() call in nsPrintJob and move it somewhere that makes sense. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34347

--HG--
extra : rebase_source : 4799985e94b29c2ef522d2d0ea69009fd72473ec
extra : amend_source : 5700597b2644267a6fecbd7e654e6162f3862bea
2019-06-04 16:01:33 +01:00
Jonathan Watt
4a0c9a9c7e Bug 1557434. Remove nsPrintObject::mPrintPreview. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34134

--HG--
extra : rebase_source : b02b90a21ed16fce0189b0aa317743f01570f57a
extra : amend_source : ad608df1346b8ce0bd2ef43305764407008e8e5f
2019-05-28 15:26:59 +01:00
Jonathan Watt
47ed611600 Bug 1557434. Split nsPrintObject::Init into separate root-object and nested-object init methods. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34006

--HG--
extra : rebase_source : cb246f4b1686d2e7634715b7cea657f762bbca58
extra : amend_source : 3de6ae30fa2156bd38cdea347a77d667c1d65581
2019-05-28 12:48:21 +01:00
Jonathan Watt
18dcb56a18 Bug 1552162. Fix unified build bustage in nsPrintObject.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D31446

--HG--
extra : rebase_source : b4ef894cfd919455788c82392d385a41b27c77be
extra : amend_source : d5c3542c4cb15185e65bf85872231a6e8e3055cd
2019-05-01 17:03:35 +01:00
Masayuki Nakano
f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Razvan Maries
99a5f987b3 Merge mozilla-inbound to mozilla-central a=merge 2018-11-27 19:32:31 +02:00
Andreas Farre
3ccff85cdd Bug 1502330 - Create BrowsingContext with passed opener. r=qdot
By replacing nsWebBrowser's implementation of the
nsIBaseWindow.initWindow and nsIBaseWindow.create with a new static
nsWebBrowser::Create method we make it possible to pass arguments
directly when creating an nsWebBrowser, for example the opener
BrowsingContext. As a bonus we can do away with
nsWebBrowser::mInitInfo!

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

--HG--
extra : moz-landing-system : lando
2018-11-27 09:59:44 +00:00
Jonathan Watt
4c1b207664 Bug 1510116. Fix some unified build issues in layout code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13039

--HG--
extra : rebase_source : f0b6516484ed97ed52b92e04617f89e4ee8189ff
2018-11-12 22:20:52 +00:00
Andreas Farre
89cb220346 Bug 1480198 - Construct nsDocShell objects inside BrowsingContext. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D7400

--HG--
extra : moz-landing-system : lando
2018-11-05 12:43:10 +00:00
Andi-Bogdan Postelnicu
5e3e0d4498 Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron 2018-07-12 09:42:14 +03:00
Adrian Wielgosik
f1457c6874 Bug 1460940 - Remove nsIDOMDocument uses in layout/. r=bz
MozReview-Commit-ID: KixJ5edlCjl

--HG--
extra : rebase_source : 677049bc7eb131dc86ed468eb8a6b06085f2c17d
2018-05-11 19:46:15 +02:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Boris Zbarsky
45afd61f33 Bug 1434318 part 1. Make nsIContentViewer's DOMDocument readonly. r=mystor
No one ever assigns to it in JS anyway.

MozReview-Commit-ID: EAoOXSFnwtl
2018-01-31 15:18:09 -05: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
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
Olli Pettay
bddafc48dd Bug 1305309, backout Bug 1214805, r=backout
--HG--
extra : rebase_source : d86f67ef53b26027d739725829a2ee736d71221e
2016-09-27 01:03:24 +03: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
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
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Trevor Saunders
a7a065cd75 bug 966084 - don't QI the result of win->GetFrameElementInternal() when its not required r=smaug 2014-01-23 16:14:29 -05:00
Ms2ger
4f1e9b830b Bug 956015 - Add an infallible nsIDocShellTreeItem::ItemType; r=bz 2014-01-20 08:58:26 +01:00
Ehsan Akhgari
7bb8ab1a35 Bug 923151 - Part 2: Don't #include nsIDocument.h in mozilla/dom/Element.h; r=jst
--HG--
extra : rebase_source : 8c5f5429574313a1304eb2779cdb6b5702e4094d
2013-10-02 16:09:18 -04:00
Ms2ger
1a5ae526d9 Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
Trevor Saunders
c4d231052a bug 841436 - remove nolonger needed qi from nsIDocShell to nsIDocShellTreeItem r=bz 2013-02-12 17:02:51 -05:00
Cameron McCormack
796c0f44da Bug 818626 - Remove printing crash report debugging. r=roc 2013-01-18 11:22:30 +11:00
Mats Palmgren
b48fe04ebd Bug 830236 - Add re-entrancy protection in a few places to avoid destroying things twice. r=cam 2013-01-15 21:47:10 +01:00
Cameron McCormack
03e4e10349 Bug 818626 - More debugging for crashes at the end of printing. r=roc 2013-01-07 14:29:47 +11:00
Cameron McCormack
af99b6bdbf Bug 827085 - Remove unused mSharedPresShell member on nsPrintObject. r=roc 2013-01-07 12:57:19 +11:00
Cameron McCormack
966bdd29d8 Bug 818626 - Release nsPresContext after its PresShell when destroying an nsPrintObject. r=roc
--HG--
extra : rebase_source : d5d21e5b1c06700d69ebe9ce63cb5a9a40b18dbe
2012-12-18 15:32:34 +11:00
Ehsan Akhgari
e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Ehsan Akhgari
92064e6d3f Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d2b70213ac Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Olli Pettay
99d89c2a1a Bug 664434 - Make sure to Destroy the old document when setting a new print document, r=roc
--HG--
extra : rebase_source : b75688d5320d9dcaf59468bd5def2fa7f2e0bbc0
2011-06-16 21:20:13 +03:00
Olli Pettay
ff05433231 Bug 620158 - Crash while printing, r=mats, a=blocking
--HG--
extra : rebase_source : 9aab81626cf1d2e68f266a78ac4bbee780706067
2011-01-14 14:27:31 +02:00
Olli Pettay
7e8cc37590 Bug 610690 - Crash when printing many documents successively [@ nsCOMPtr_base::assign_from_qi | nsDocShell::SetTreeOwner ], r=mats, a=benjamin 2010-11-10 23:15:21 +02:00
Robert O'Callahan
7f643ab37a Bug 584193. Allow print preview to work without its own widget. r=smaug a=blocking beta5 2010-08-27 18:15:08 -05:00
Olli Pettay
423522c88b Bug 487667 - Clone documents for printing, r=roc+jst+joe+dbaron
--HG--
extra : rebase_source : dbab242066ba97c0d7f34a2fb701a1c465f26ec4
2009-12-10 20:02:13 -08:00
Timothy Nikkel
6724ca0012 Bug 491848. Ensure scripts are blocked during frame destruction. Also, don't dispatch paint events during a synchronous plugin message. r=roc 2009-05-15 15:08:41 +12:00
Arpad Borsos
c0f2dadc80 Bug 474369 - get rid of nsVoidArray; layout part; r+sr=roc 2009-02-03 15:42:18 +01:00
joshmoz%gmail.com
19b60dfc6a remove unused variables, other warning fixes. no bug. r/sr=bz 2007-02-16 08:04:44 +00:00
sharparrow1%yahoo.com
76a64e5c22 Bug 177805: Fix the use of units in Gecko. r+sr=roc 2007-02-07 07:46:44 +00:00
sharparrow1%yahoo.com
01ccd95a11 Bug 361844: Printing cleanup; r+sr=roc. Changes the way the presentation is managed for print preview, plus many smaller cleanups. 2006-12-10 08:05:05 +00:00