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

884 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Watt 1972449751 Bug 1557434. Rename nsPrintJob::BuildDocTree to BuildNestedPrintObjects. r=bobowen
The previous splitting of nsPrintObject::Init made clear that in fact this
method does not create documents at all!  This new name better describes what
it does.

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

--HG--
extra : rebase_source : 143812a4b5438dff24a7f38b07f0a95660e139ce
extra : amend_source : 209937ec2d638bcd60929c6ac3840ee7e0209b73
2019-05-28 14:16:49 +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
Bob Owen 29ef4af73e Bug 1464032 Part 2: Remove LoadEvent and replace with DoWithEvent. r=jrmuizel
This patch modifies DoWithEvent so that we can more easily have a
DoWithEventFromStream callable from outside of Moz2D similar to
LoadEventFromStream. We will add that in a later patch for the new
EventRingBuffer. It also changes the only user of LoadEventFromStream
over to it, so we can can get rid of it and LoadEvent entirely.
2018-12-02 14:13:56 +00:00
Jeff Muizelaar 42709ab870 Bug 1529677 - Move writing of Event type from RecordEvent() into RecordToStream(). r=bobowen 2019-02-21 11:23:00 +00:00
Jonathan Watt 02975bf7d4 Bug 1557033. Stop using nsIDocShellTreeItem in nsPrintJob. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33793

--HG--
extra : rebase_source : f12820b3cd6a5539e79abdcf51945fcd4eef47a8
2019-05-24 10:50:22 +01:00
Jonathan Watt 5cd2b5b11e Bug 1557104. Merge nsIPageSequenceFrame and nsSimplePageSequenceFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D33817

--HG--
rename : layout/generic/nsSimplePageSequenceFrame.cpp => layout/generic/nsPageSequenceFrame.cpp
rename : layout/generic/nsSimplePageSequenceFrame.h => layout/generic/nsPageSequenceFrame.h
extra : rebase_source : e75b043af4dbfe4c108f2bfc0e234fd20c5af315
2019-05-22 13:01:33 +01:00
Mihai Alexandru Michis d07d090c31 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-06-05 12:59:10 +03:00
sotaro 3d0c73c202 Bug 1537586 - Address build failure with --disable-printing r=bobowen,froydnj
Make nsIWebBrowserPrint included unconditionally for addressing nsIDocShell.rs build failure.

Remove direct_call of PPrinting and PRemotePrintJob. Their ipdl are built unconditionally, but their derived classes are not built with --disable-printing.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 01:25:36 +00:00
Jonathan Watt 39945059b3 Bug 1552785. Remove printing related isFramesetDocument and isFramesetFrameSelected code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33696

--HG--
extra : rebase_source : 2e7f854a808059b4955ffaad425fe8b68263883e
2019-05-21 23:25:57 +01:00
Jonathan Watt 098392f093 Bug 1552785. Remove internal code for various frameset printing behaviors. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33624

--HG--
extra : rebase_source : 336e87a05970895684602c9db3e5222918f861c8
extra : source : 98fbf1ed617549496036099b5aee333aa6b29925
2019-05-21 16:01:34 +01:00
Jonathan Watt 83558018e6 Bug 1552785. Reduce code duplication in nsPrintJob::EnablePOsForPrinting. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33686

--HG--
extra : rebase_source : c1c0d1712f10b6de417046f517e171f45a6822b3
2019-05-20 15:29:01 +01:00
Jonathan Watt 659bdf822a Bug 1552785. Stop using GetHowToEnableFrameUI in nsPrintJob::EnablePOsForPrinting. r=bobowen
kFrameEnableNone is synonymous with having a non-frameset document.  This makes
what is going on here explicit.  It also gets rid of the kRangeSelection based
override and makes that explicit too.

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

--HG--
extra : rebase_source : 7cb1c4be168816f13f01189f672c43b80ab9bbe0
2019-05-17 16:38:10 +01:00
Jonathan Watt 266860bac6 Bug 1552785. Stop setting frameset printing behavior for nsIPrintSettings::kRangeSelection. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33623

--HG--
extra : rebase_source : 8f1cb0aadd99501ea54c566d8ef437898fb90bd9
2019-05-17 14:52:25 +01:00
Ciure Andrei 1f4007dfc0 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-05-24 01:38:06 +03:00
Sylvestre Ledru 993c03acb1 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31769

--HG--
extra : moz-landing-system : lando
2019-05-22 22:37:14 +00:00
Jonathan Watt cb54619aa0 Bug 1553324. Remove nsIPrintSettings.printFrameTypeUsage. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D32068

--HG--
extra : rebase_source : 939cce38c90a39bd002f95e71e1de94a62f895e1
extra : amend_source : 1be783028096f61145727492fa3c3f41e363c205
2019-05-13 16:30:20 +01:00
Jonathan Watt c1abf2081c Bug 1553318. Remove nsIPrintSettings.kRangeFocus. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D32064

--HG--
extra : rebase_source : 396f01bc0f4401bdb6cdc094890751d4f0cbf45c
extra : amend_source : 5cd92d2a76b7053861f8af9e6d65ab2feb6cc1c0
2019-05-13 14:52:25 +01:00
Jonathan Watt a7b3640083 Bug 1553081. Set nsPrintJob::mDisallowSelectionPrint during Initialize(). r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31975

--HG--
extra : rebase_source : 57b72312d1c25b62b3c5ebd6818f2010eddfefec
extra : amend_source : 9f8a0f0e30fefccd3a9296b6d91e74f7b6589676
2019-05-10 16:01:33 +01:00
Jonathan Watt e8b9c5bc5d Bug 1553080. Have nsPrintJob record modality and mozPrintCallback presence during initialization. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31974

--HG--
extra : rebase_source : 4e5319b1f6b3b7a70dd79d8c9538300ca1ccd581
extra : amend_source : a4510ba02336f5464463fec3ccd320296d74df92
2019-05-10 14:52:25 +01:00
Jonathan Watt e0e310caed Bug 1552969. Pass the document to print through to nsPrintJob::Print. r=bobowen
...and have nsPrintJob::Print use that instead of mOriginalDoc, which we want
to get rid of.

When nsPrintJob::Print is called and mPrtPreview is nullptr, we know that we
have been called to print a page directly without print preview.  In that case
we know that we're printing the nsPrintJob's docViewer's document.  I.e. the
document of the caller of nsPrintJob::Print.  So in this case mOriginalDoc and
the passed doc are always the same thing.

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

--HG--
extra : rebase_source : 54f3afd8dc51d02ccd19436d39b570f66fa242d7
extra : amend_source : 49fa445dff1d19eb4faee868ddacda76916af778
2019-05-10 09:38:11 +01:00
Jonathan Watt ab59fdb945 Bug 1552880 p2. Document nsPritJob's Initialize, Print and PrintPreview and rename their document params. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31812

--HG--
extra : rebase_source : efec6fb9c74212ff615510ec743870bed2e03f38
extra : amend_source : 61944f4a34d531a333f77403ed7e9ea23e0e0d24
extra : source : c5ee693121dd2e614dd801f6301d8da5b3f43935
2019-05-09 23:26:59 +01:00
Jonathan Watt 21321fb45e Bug 1552880 p1. Pass a document to nsPrintJob::PrintPreview instead of a window. r=bobowen
This stops nsPrintJob::PrintPreview from duplicating work done in
nsDocumentViewer::PrintPreview.

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

--HG--
extra : rebase_source : 062cbac323a2a1a0bcc85039b3671c650c408efa
extra : amend_source : 39d5b8c316f518aa72d560ae4eeec171561ab8fd
2019-05-09 10:40:12 +01:00
Jonathan Watt 9398841338 Bug 1552711. Use 'DocShell' instead of 'Container' in nsPrintJob. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31743

--HG--
extra : rebase_source : 5fb2126e8b1e7dca96e5879c0861ce5182c44952
2019-05-08 14:54:26 +01:00
Jonathan Watt dbcde07e70 Bug 1551882. Refactor the print preview listener code to make its purpose clear. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31252

--HG--
rename : layout/printing/nsPrintPreviewListener.cpp => layout/printing/PrintPreviewUserEventSuppressor.cpp
rename : layout/printing/nsPrintPreviewListener.h => layout/printing/PrintPreviewUserEventSuppressor.h
extra : rebase_source : a2bfc2635d8cb98ee7c93597c6f805122e99111f
extra : amend_source : 2d3c11cbc8e07fa90b1960c4e1a4422c12f2761b
2019-05-16 23:16:11 +01:00
Jonathan Watt e065f6dbc5 Bug 1551946. Refactor nsPrintJob::CheckForPrinters. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31279

--HG--
extra : rebase_source : cd12b6e3d353af0f9055e40a3340345c78d5aa85
extra : amend_source : 347249be7c34f6b10599418d7c8931b8ed95560e
2019-05-02 15:56:29 +01:00
Jonathan Watt 49a88e527a Bug 1551950. Rename nsPrintJob::SetDocAndURLIntoProgress to SetURLAndTitleOnProgress. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31278

--HG--
extra : rebase_source : cf4b537af813d151f8a062efcf23dd4aec4ca2e8
extra : amend_source : 196fe41747f28b87ed5a17748caab94ef4c5df1c
2019-05-02 10:41:14 +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
Jonathan Watt 7049368112 Bug 1551538. Rename and document nsPrintJob::AfterNetworkPrint (to ResumePrintAfterResourcesLoaded). r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31063

--HG--
extra : amend_source : 490d85a501f6615c2406663e2d872c8e1e86afe6
2019-04-26 11:43:15 +01:00
Jonathan Watt 85c590de39 Bug 1551333. Rename nsIPrintingPromptService methods to make them more searchable. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D30996

--HG--
extra : rebase_source : dc747a24f01c75d3378fed46bb49bf7dadd5f3df
extra : amend_source : c7dcf55fe7010c31f0e857cdd3c17d28622f289f
2019-04-24 16:01:33 +01:00
Jonathan Watt d9d54a06b9 Bug 1549844. DeCOMtaminate some nsPrintJob methods. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D30269

--HG--
extra : rebase_source : 4529c476a5f7acdd4c959417c6e6221e6c84f153
extra : amend_source : f589deac70ae533c2f4e7830c057f0f2c65b963e
2019-04-12 14:53:26 +01:00
Boris Zbarsky 356eb6dfd9 Bug 1547923 part 5. Start using nsIGlobalObject::GetGlobalJSObjectPreserveColor where possible. r=mccr8,jonco
Differential Revision: https://phabricator.services.mozilla.com/D29706

--HG--
extra : moz-landing-system : lando
2019-05-03 15:15:31 +00:00
Boris Zbarsky ff72e84ac1 Bug 1547923 part 4. Add nsIGlobalObject::HasJSGlobal(). r=mccr8
Consumers that just care about this boolean state should use this instead of
getting the JSObject* directly.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:32:17 +00: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
Masayuki Nakano 60e014c55e Bug 1544215 - Make nsIContentVewer::GetPresShell() return mozilla::PresShell instead of nsIPresShell r=bzbarsky
Additionally, this patch makes `nsDocumentViewer` which is the only
implementation of `nsIContentViewer` use `mozilla::PresShell` directly
rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 02:47:26 +00:00
Masayuki Nakano 414509fe00 Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug
So, this patch makes all caller of it safe including its arguments unless
they come from other methods.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:43:57 +00:00
Masayuki Nakano 0986fb819b Bug 1542506 - Make nsDocShell use mozilla::PresShell* directly rather than nsIPresShell* r=bzbarsky
This patch makes `nsDocShell::GetPresShell()` and
`nsDocShell::GetEldestPresShell()` return `mozilla::PresShell*` and
some non-public methods use `mozilla::PresShell*` directly.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:03:13 +00:00
Masayuki Nakano 5e41233499 Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 00:19:48 +00:00
Razvan Maries 1cd564b971 Backed out changeset 3b94c20ba873 (bug 1540990) for build bustages. CLOSED TREE 2019-04-04 02:44:00 +03:00
Masayuki Nakano b2bba953cc Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 23:29:38 +00:00
Emilio Cobos Álvarez d8e2990d8a Bug 1535788 - Make the Document own the StyleSet. r=heycam
This is the last step to be able to call matchMedia on display: none iframes.

This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).

The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:00 +00:00
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Emilio Cobos Álvarez a59f4ed1fb Bug 1528914 - Tidy the relationship between the doc shell and the pres context. r=qdot
Make it always forward to the document's docshell. We rely on it being setup by
the time our stuff runs, and we cannot have multiple pres contexts per document
in different docshells anymore.

This allows me to also move some state to the document (about whether it's
currently loaded in a chrome docshell (nsPresContext::mIsChrome) and whether
it's a chrome origin image (nsPresContext::mIsChromeOriginImage), which will
help for bug 1490401 / bug 1418159.

The pres context already relies on having the docshell available on `Init` and
we don't properly handle dynamic changes to it.

The reason I store some state like whether the doc URI is chrome:// and whether
we're in a chrome docshell is not (only) to avoid recomputing it over and over,
but also to allow me to read them from Stylo (main-thread blocked, but poke at
that from multiple non-main-threads).

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

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

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Kris Maglione eb14dd1d2c Bug 1478124: Part 8b - Update DocShell module to use a static component manifest. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15040

--HG--
extra : rebase_source : d89ac470241cb6f6a43c29c6e90b1c0e4fc78028
extra : source : b0444e0bc801f828b49f9953a73498cf5ff5024b
2018-12-16 17:27:58 -08:00
arthur.iakab c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione 586d1722ec Bug 1478124: Part 8b - Update DocShell module to use a static component manifest. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15040

--HG--
extra : rebase_source : 4de6207229742168f534f618fe4881f19e3135c9
extra : absorb_source : 63106bea2b2a9c9a90e2d8cd08429b5de0f2cd09
extra : histedit_source : 02a263131b092b1d1ac4901f1a37a1b842b3103f
2018-12-16 17:27:58 -08:00
Emilio Cobos Álvarez 8addc7a883 Bug 1521137 - The pres context's base min font size is dead code. r=heycam
Nobody uses it from js, and we only thread the value around in layout. Let's
kill all this code.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 07:15:02 +00:00
Ehsan Akhgari 4137a92662 Bug 1514340 - Part 2: Break out the content blocking related notifications into nsIWebProgressListener.onContentBlockingEvent(); r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D16052
2019-01-21 09:58:50 -05:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Emilio Cobos Álvarez c732de8adc Bug 1517241 - Fix yet another MSVC-only bustage.
This doesn't compile on MSVC for some reason:

```
nsCOMPtr<Foo> f;
RefPtr<Foo> b;

Foo* myFoo = f ? f : b;
```
2019-01-03 19:34:39 +01: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 ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Daniel Holbert 7c3b31a25d Bug 1512112: Remove redundant includes from source files in layout. r=TYLin
All of the removed includes are redundant (i.e. they're #included elsewhere in
the same file).

In most cases, I'm removing the second (redundant) copy of the
#include, except when that copy makes more sense (i.e. if it's in better sorted
order, or if it's paired alongside a closely-associated header while the
earlier copy is not).

Here's the script that I used to generate candidates here -- I ran this in
every subdirectory of layout, on my linux machine (warning, this writes two
files to your /tmp directory):

for FILE in *.h *.cpp; do
  nonunique=$(grep \#include $FILE | grep -v List\.h | cut -f2 -d'"'  | cut -f2- -d'/'| cut -f2- -d'/' | sort | wc -l)
  unique=$(   grep \#include $FILE | grep -v List\.h | cut -f2 -d'"'  | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq | wc -l)
  if [[ "$unique" != "$nonunique" ]]; then
    echo "$FILE: $nonunique / $unique"
    grep \#include $FILE | cut -f2 -d'"'  | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort  > /tmp/nonunique.txt
    grep \#include $FILE | cut -f2 -d'"'  | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq  > /tmp/unique.txt
    diff /tmp/nonunique.txt /tmp/unique.txt
    echo
  fi
done

Depends on D13773

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

--HG--
extra : moz-landing-system : lando
2018-12-05 18:55:59 +00:00
Cameron McCormack a9c935c355 Bug 1511854 - Part 1: Fix some formatting oddities in layout/ after the clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13686

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:03 +00:00
Ehsan Akhgari 0dcf936804 Bug 1510911 - Part 2: Backout changeset f8849239da42 (bug 1493563 - Part 5) for regressing performance 2018-12-03 14:27:53 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Kyle Machulis c241567f0f Bug 1505601 - Turn nsIDocShell XPIDL const lists into cenums; r=bzbarsky
Turn all const lists and related attributes into cenums, to provide a
vague sense of type safety.

Depends on D11715

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

--HG--
extra : moz-landing-system : lando
2018-11-28 03:30:56 +00: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
Boris Zbarsky 0216588e17 Bug 1507540 part 5. Use more notxpcom attributes in widget/. r=ehsan 2018-11-19 20:17:54 -05: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
Ehsan Akhgari 5f0be07390 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 14:46:02 -04:00
Noemi Erli 4419e20e14 Backed out 12 changesets (bug 1493563) for failures in test_css-logic-getCssPath.html CLOSED TREE
Backed out changeset d2e83655082f (bug 1493563)
Backed out changeset 1ce58f004593 (bug 1493563)
Backed out changeset 344298c73ee7 (bug 1493563)
Backed out changeset 02b8b073f7d7 (bug 1493563)
Backed out changeset 3ef707008502 (bug 1493563)
Backed out changeset bb2720a401fe (bug 1493563)
Backed out changeset ce0211be57a1 (bug 1493563)
Backed out changeset 83d6c2bf8dc6 (bug 1493563)
Backed out changeset 1844af4cc25b (bug 1493563)
Backed out changeset c8ab17addb7a (bug 1493563)
Backed out changeset a1ff0cd62563 (bug 1493563)
Backed out changeset 932b41e211e0 (bug 1493563)
2018-09-28 21:31:18 +03:00
Ehsan Akhgari f0108e78c2 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 13:24:41 -04:00
Tiberius Oros 70e8d3a299 Backed out 11 changesets (bug 1493563) for failures on dom/workers/test/test_sharedworker_event_listener_leaks.html on a CLOSED TREE
Backed out changeset 0bb55b604bfd (bug 1493563)
Backed out changeset 8e25c301675a (bug 1493563)
Backed out changeset 4f608b8801d4 (bug 1493563)
Backed out changeset f58d0b1ca088 (bug 1493563)
Backed out changeset eae105f2bf6d (bug 1493563)
Backed out changeset 7a8a0d1cfd69 (bug 1493563)
Backed out changeset dbba8451aab1 (bug 1493563)
Backed out changeset a6141dbd0328 (bug 1493563)
Backed out changeset f4ca3d8fa90e (bug 1493563)
Backed out changeset 56bab7fae64d (bug 1493563)
Backed out changeset 66787e603401 (bug 1493563)
2018-09-26 06:16:22 +03:00
Ehsan Akhgari 4ced8fedcb Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-25 21:02:51 -04:00
Tiberius Oros 8acb878ef1 Backed out 11 changesets (bug 1493563) for failures on browser_blockingCookies.js on a CLOSED TREE
Backed out changeset d755b96837ac (bug 1493563)
Backed out changeset 651f87dca51f (bug 1493563)
Backed out changeset 68de8f0866d0 (bug 1493563)
Backed out changeset 205d69890f50 (bug 1493563)
Backed out changeset 5f922cd6c21e (bug 1493563)
Backed out changeset 84dc54c1a9c1 (bug 1493563)
Backed out changeset 287666ecdd17 (bug 1493563)
Backed out changeset c64a2ea15b7b (bug 1493563)
Backed out changeset 9085269938cd (bug 1493563)
Backed out changeset de06604fefcb (bug 1493563)
Backed out changeset f9bac5e73bd4 (bug 1493563)
2018-09-25 23:12:03 +03:00
Ehsan Akhgari 59e50ba2d0 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-25 13:51:47 -04:00
Gerald Squelart b099eab802 Bug 1488684 - Made nsIFrame-derived classes and some others 'final' where possible - r=dbaron
All classes deriving from nsIFrame that did not have any subclasses themselves
(at the time of writing this patch) have been marked with `final`.
Some other Layout classes have also been made final, but this was opportunistic
while working on nsIFrame subclasses, and is definitely not exhaustive, further
patches welcome; refer to bug 1332680.

Advantages of marking a class final include:
- Allowing the compiler to devirtualize some method calls (i.e., calling
  virtual functions directly instead of going through the vtable),
- Indicating that the class is not currently subclassed,
- Preventing subclassing without being aware that this would remove the
  finalization benefits of the parent class.
`final` does not signify that these classes should *never* be subclassed, this
is left for developers to decide.

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

--HG--
extra : moz-landing-system : lando
2018-09-06 01:23:14 +00:00
Nicholas Nethercote ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
Ting-Yu Lin a1ed764131 Bug 1482665 Part 5 - Remove nsDeviceContext::AppUnitsPerCSSInch() and replace it with mozilla::AppUnitsPerCSSInch(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3158
2018-08-13 14:29:30 -07:00
Andi-Bogdan Postelnicu 5e3e0d4498 Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron 2018-07-12 09:42:14 +03:00
Emilio Cobos Álvarez c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Emilio Cobos Álvarez bd7c1e4e8c Bug 1468133: Remove the optimization to lazily load non-SVG styles since it's not relevant anymore. r=heycam
This was a memory-saving optimization introduced as part of dependencies for bug
686875, but a more general system landed in bug 77999 for Gecko and
https://github.com/servo/servo/pull/18509 for Servo.

So now it's probably even a bit of a pessimization (though probably not huge),
and given this causes bugs like bug 1462742, bug 1157592, and bug 1468145, and
fishiness like the one pointed out in this bug, we may as well remove it.

The performance impact of having to lookup through more rules should be minimal
given the bloom filter and the rule hash optimizations.

This makes me wonder whether we could remove the whole concept of on-demand UA
sheets, since they've caused pain, for example, when the frontend people try
loading <svg>s from NAC (since that triggers sheet loading from frame
construction, which is not good). I'm not concerned about loading mathml.css and
svg.css everywhere, though xul.css may not be as doable since it adds a bunch of
attribute-dependent selectors. Though on the other hand I asserted in the
xul.css code and we don't load it in content with <video> / <input
type="date/time/etc"> and such, afaict, so maybe now that legacy addons are gone
we can remove that sheet from content processes altogether.

MozReview-Commit-ID: 9JCWNZj6BkT
2018-06-22 03:42:46 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Xidorn Quan 5896b33074 Bug 1461933 - Remove ServoBindings.h from ComputedStyleInline.h. r=emilio
For doing this, ServoComputedData is split into separate files, so that
files don't need to include ServoBindings.h just for accessing style
structs from ComputedStyles.

MozReview-Commit-ID: DPAd7PUUCl9

--HG--
extra : rebase_source : 7d6f739b7fb58a46e1624ba62e717412057ea9c1
2018-05-16 15:35:59 +10:00
Emilio Cobos Álvarez 00ee40fe4c Bug 1459529: Remove ServoStyleSet::{Begin,End}Update. r=heycam
They're empty, and make PresShell::BeginUpdate useless. Now we don't have
document observers that listen for these anymore.

MozReview-Commit-ID: GpDDNonFUFC
2018-05-15 18:44:26 +02: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
Boris Zbarsky 11a1d5dd24 Bug 1387143 part 25. Remove nsISelection::DeleteFromDocument. r=mats 2018-05-08 13:52:42 -04:00
Boris Zbarsky 1ff99d888e Bug 1387143 part 20. Remove nsISelectionPrivate. r=mats 2018-05-08 13:52:38 -04:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Emilio Cobos Álvarez bf64474d79 Bug 1457920: Remove StyleSheet::AsServo. r=xidorn
MozReview-Commit-ID: IkkJvUFHykk
2018-05-02 04:13:21 +02:00
Boris Zbarsky 93af0eea13 Bug 1455674 part 14. Remove use of nsIDOMElement in layout. r=qdot 2018-04-26 23:37:33 -04:00
Boris Zbarsky dac6314cb8 Bug 1456588 part 2. Change nsIFocusManager::MoveFocus to take Element. r=enndeakin 2018-04-26 10:37:47 -04:00
Boris Zbarsky 89afe72cf5 Bug 1455052 part 7. Remove nsIDOMEvent use from layout. r=masayuki
MozReview-Commit-ID: 2OfAXBR8G5M
2018-04-20 12:53:17 -04:00
Boris Zbarsky bac3f2e054 Bug 1455055 part 3. Clean up HandleEvent implementations in layout. r=masayuki
MozReview-Commit-ID: 7Irm8aAmeIt
2018-04-20 00:49:29 -04:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Emilio Cobos Álvarez 83fd987aec Bug 1454233: Remove nsINode::eDOCUMENT. r=bz
MozReview-Commit-ID: ItjdI79zme7
2018-04-20 01:30:11 +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
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Xidorn Quan d81392eca1 Bug 1447828 part 6 - Have only a single nsLayoutStylesheetCache instance. r=emilio
MozReview-Commit-ID: BjCgc8MZjIq

--HG--
extra : rebase_source : 104140c2eed5987b5568aca89a72bc7d5e3ed839
extra : source : cd66e264953865b0604054fb9d0b741d0ae19ebf
2018-03-29 02:34:34 +11:00
Boris Zbarsky df07d2d834 Bug 1447890 part 5. Remove nsISelection::RemoveAllRanges. r=mystor
MozReview-Commit-ID: EeMje9KW6An
2018-03-27 00:35:23 -04:00
Boris Zbarsky 54d1f87ff4 Bug 1447890 part 1. Remove nsISelection::AddRange. r=mystor
MozReview-Commit-ID: 1JNLZp7tbII
2018-03-27 00:35:22 -04:00
Boris Zbarsky a8a190f4e1 Bug 1447889 part 14. Remove mention of nsIDOMRange from layout/. r=mystor
MozReview-Commit-ID: JWJWGzY45ac
2018-03-27 00:35:22 -04:00
Boris Zbarsky 37b111ac2a Bug 1447472 part 2. Remove nsIDOMCustomEvent. r=qdot
MozReview-Commit-ID: 3NPqLIU8cka
2018-03-26 14:53:51 -04:00