Commit Graph

195 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
cbeadf6e43 Bug 1418624 - Allow mozilla::Result to be moved, make unwrap{,Err}() move, and add inspect() APIs that return references. r=froydnj
Also adjust some of the callers that were either calling unwrap() repeatedly on
the same result, or were doing silly copies, to use inspect().

We could try to use stuff like:

https://clang.llvm.org/docs/AttributeReference.html#consumed-annotation-checking

Differential Revision: https://phabricator.services.mozilla.com/D41425
2019-08-13 08:26:18 +00:00
Sylvestre Ledru
3067b10938 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D41559
2019-08-13 07:15:25 +00:00
kriswright
576b150d68 Bug 1570082 - Convert content.sink.enable_perf_mode to static pref r=njn
Converts content.sink.enable_perf_mode to a static pref. Also removes nsContentSink::InitializeStatics(), since this is the last varcache pref in the function.

Differential Revision: https://phabricator.services.mozilla.com/D40141
2019-08-01 16:09:11 +00:00
kriswright
45de43cd8a Bug 1570082 - Convert content.sink.initial_perf_time to static pref. r=njn
Converts content.sink.initial_perf_time to a static pref.

Differential Revision: https://phabricator.services.mozilla.com/D40140
2019-08-01 17:38:26 +00:00
kriswright
e854b5e78d Bug 1570082 - Convert content.sink.interactive_time to static pref. r=njn
Converts varcache pref content.sink.interactive_time to a static pref.

Differential Revision: https://phabricator.services.mozilla.com/D40139
2019-08-01 17:37:18 +00:00
kriswright
b8fdb0d767 Bug 1570082 - Convert content.sink.*_parse_time to static pref. r=njn
Converts varcache prefs content.sink.interactive_parse_time and content.sink.perf_parse_time to static prefs.

Differential Revision: https://phabricator.services.mozilla.com/D40138
2019-08-01 17:15:49 +00:00
kriswright
7cef570609 Bug 1570082 - Convert content.sink.event_probe_rate to static pref. r=njn
Converts content.sink.event_probe_rate to a static pref.

Differential Revision: https://phabricator.services.mozilla.com/D40137
2019-08-01 16:08:27 +00:00
kriswright
c892dc12eb Bug 1570082 - Convert content.sink.pending_event_mode to static pref. r=njn
Converts VarCache pref content.sink.pending_event_mode to a static pref and removes the all.js value. Since the value in all.js is only set in the `ifndef XP_WIN` condition, the pref favors that value only as needed.

Differential Revision: https://phabricator.services.mozilla.com/D40136
2019-08-01 17:08:05 +00:00
kriswright
0b8a72efbd Bug 1570082 - Convert content.sink.*_deflect_count to static pref. r=njn
Converts the varcache prefs 'content.sink.interactive_deflect_count' and 'content.sink.perf_deflect_count' to static prefs.

Differential Revision: https://phabricator.services.mozilla.com/D40135
2019-08-01 17:05:57 +00:00
kriswright
c796a989c0 Bug 1570082 - Convert content.notify.interval to static pref. r=njn
Converts content.notify.interval varcache pref to a static pref. Rewords the description, which referenced 'gNotificationInterval' which no longer existed.

Differential Revision: https://phabricator.services.mozilla.com/D40134
2019-08-01 16:07:25 +00:00
kriswright
545eecb7ee Bug 1570082 - Convert content.notify.backoffcount to static pref. r=njn
Converts content.notify.backoffcount varcache pref to static pref.

Differential Revision: https://phabricator.services.mozilla.com/D40133
2019-08-01 16:06:56 +00:00
kriswright
9b2929d2cc Bug 1570082 - Convert content.notify.ontimer to static pref and add content group to prefs groups. r=njn
Converts content.notify.ontimer varcache pref to static pref. Also adds a new pref group, 'content'.

Differential Revision: https://phabricator.services.mozilla.com/D40125
2019-08-01 16:05:49 +00:00
Tom Schuster
2c388af9b0 Bug 1558915 - Use infallible nsIURI::SchemeIs in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D39780
2019-07-30 17:51:37 +00:00
Thomas Nguyen
fc848a1f27 Bug 1566417 - Update to use ReferrerInfo in prefetch and preload URI r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38323
2019-07-19 11:42:09 +00:00
Brindusan Cristian
3dd2a09c2c Backed out changeset 1cf52744c859 (bug 1566417) for wpt failures at Element.h:2006. 2019-07-19 03:37:49 +03:00
Thomas Nguyen
74b396afd0 Bug 1566417 - Update to use ReferrerInfo in prefetch and preload URI r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38323
2019-07-18 20:36:46 +00:00
Thomas Nguyen
8e17cce240 Bug 1546334 - Use referrerInfo in style system. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D36478
2019-07-16 11:43:56 +00:00
Jonathan Kingston
32524b62e2 Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Andrea Marchesini
f47626e250 Bug 1436674 - nsICookieService.idl should use ACString XPIDL type in place of the string type, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D32662
2019-05-31 09:36:44 +00:00
Andrea Marchesini
8d9436f55c Bug 1457503 - Removal of http-equiv cookies. draft, r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D29841
2019-05-08 13:50:45 +00:00
Masayuki Nakano
ca114d2ee2 Bug 1543315 - part 10: Mark nsIPresShell::GoToAnchor() and nsIPresShell::ScrollToAnchor() as MOZ_CAN_RUN_SCRIPT r=smaug
Next, we should mark `PresShell::ScrollContentIntoView()` as
`MOZ_CAN_RUN_SCRIPT` because it's used widely.

This patch marks its `PresShell` users, `GoToAnchor()` and `ScrollToAnchor()`,
as `MOZ_CAN_RUN_SCRIPT`.  Additionally, this patch moves them from
`nsIPresShell` to `PresShell` because all callers refers `PresShell` directly.

Differential Revision: https://phabricator.services.mozilla.com/D28319
2019-04-23 01:27:47 +00:00
Emilio Cobos Álvarez
54c2741ad0 Bug 1281135 - Make <link disabled> work and HTMLLinkElement.disabled reflect that attribute. r=bzbarsky
...instead of forwarding to the sheet like HTMLStyleElement does.

I've proposed this behavior in:

  https://github.com/whatwg/html/issues/3840#issuecomment-480894419

I think this is one of the sane behaviors we can have, what Blink / WebKit do
makes no sense to me.

Alternative potentially-sane behavior is making the initial value of the
stylesheet's disabled bit the same as the content attribute, and both reflect
and forward the attribute from the setter.

That means that setAttribute does something different than setting `disabled`,
which means that you can get into all sorts of funny states when reloading the
sheet... So I rather not do that.

Differential Revision: https://phabricator.services.mozilla.com/D26573
2019-04-19 13:31:05 +00:00
Noemi Erli
4fd6f7cb74 Backed out changeset ef991fe893a4 (bug 1281135) for failures in browser_bug839103.js 2019-04-19 09:18:03 +03:00
Emilio Cobos Álvarez
7020750d43 Bug 1281135 - Make <link disabled> work and HTMLLinkElement.disabled reflect that attribute. r=bzbarsky
...instead of forwarding to the sheet like HTMLStyleElement does.

I've proposed this behavior in:

  https://github.com/whatwg/html/issues/3840#issuecomment-480894419

I think this is one of the sane behaviors we can have, what Blink / WebKit do
makes no sense to me.

Alternative potentially-sane behavior is making the initial value of the
stylesheet's disabled bit the same as the content attribute, and both reflect
and forward the attribute from the setter.

That means that setAttribute does something different than setting `disabled`,
which means that you can get into all sorts of funny states when reloading the
sheet... So I rather not do that.

Differential Revision: https://phabricator.services.mozilla.com/D26573
2019-04-18 07:48:55 +00:00
Masayuki Nakano
e56c690088 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
2019-03-29 15:12:47 +00:00
Dorel Luca
6cd4166b18 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
12ec0ad7f4 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
2019-03-29 13:09:26 +00:00
Emilio Cobos Álvarez
ccd8041433 Bug 1539742 - Notify of appends to the right document when parsing into an already-adopted node. r=bzbarsky
nsContentSink used to decide that it was fine to not notify of silent appends to
a document from the parser if the node was not on our document already.

That's not ok, since if styling or layout have happened already on the document
we're getting inserted into nobody notices them, which is wrong.

Differential Revision: https://phabricator.services.mozilla.com/D25300
2019-03-29 09:55:10 +00:00
Boris Zbarsky
465d5e2181 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

Differential Revision: https://phabricator.services.mozilla.com/D19892
2019-02-22 21:27:44 +00:00
Coroiu Cristina
6afadf9439 Backed out changeset 367ca1e16853 (bug 1528146) on request by igoldan, assignee didn't replied back on time a=backout 2019-02-22 10:10:33 +02:00
Boris Zbarsky
adffade759 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

Differential Revision: https://phabricator.services.mozilla.com/D19892
2019-02-15 23:29:34 +00:00
Kris Maglione
8ccab89886 Bug 1478124: Part 8b - Update DocShell module to use a static component manifest. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15040
2018-12-16 17:27:58 -08:00
arthur.iakab
127fb281ff 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
605e3719de Bug 1478124: Part 8b - Update DocShell module to use a static component manifest. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15040
2018-12-16 17:27:58 -08:00
Zibi Braniecki
a772c5de7b Bug 1518252 - Block layout on Fluent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17334
2019-01-25 23:14:03 +00:00
Cosmin Sabou
5062a0e545 Backed out 2 changesets (bug 1518252) for frequent clipboard failures on browser_jsterm_middle_click_paste.
Backed out changeset b6f80451898e (bug 1518252)
Backed out changeset 06114c66901f (bug 1518252)
2019-01-24 02:50:54 +02:00
Zibi Braniecki
384ce79f03 Bug 1518252 - Block layout on Fluent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17334
2019-01-23 21:29:15 +00:00
Emilio Cobos Álvarez
dc336a73ba 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
Emilio Cobos Álvarez
b26d7730f0 Bug 1516366 - Move base classes from nsDocument to nsIDocument. r=smaug
This is a big step in order to merge both.

Also allows to remove some very silly casts, though it causes us to add some
ToSupports around to deal with ambiguity of casts from nsIDocument to
nsISupports, and add a dummy nsISupports implementation that will go away later
in the series.

Differential Revision: https://phabricator.services.mozilla.com/D15352
2018-12-29 20:41:28 +01:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Dragana Damjanovic
fe9c8db4c3 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus 2018-09-22 23:54:11 +03:00
Gurzau Raul
b5bc7bfc3d Backed out changeset dc225279994a (bug 1473736) for web platform leaks 2018-09-21 04:30:10 +03:00
Dragana Damjanovic
49db0c9629 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus
Implement necko part of ESNI

Differential Revision: https://phabricator.services.mozilla.com/D2716
2018-09-20 20:53:28 +00:00
Noemi Erli
094eddb80d Backed out changeset 7aa742bff8fb (bug 1473736) for xpcshell failures and bc failures in browser_urlbarSearchSingleWordNotification.js 2018-09-18 22:07:58 +03:00
Dragana Damjanovic
26aa202e86 Bug 1473736 - Implement necko part of ESNI r=mcmanus
Implement necko part of ESNI

Differential Revision: https://phabricator.services.mozilla.com/D2716
2018-09-17 23:08:14 +00:00
Mike Hommey
d00117b8a3 Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224
2018-09-07 22:12:01 +00:00
Valentin Gosu
7621447682 Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

Differential Revision: https://phabricator.services.mozilla.com/D2239
2018-07-23 11:28:47 +00:00
Emilio Cobos Álvarez
0348c342b8 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Markus Stange
52aa257a14 Bug 1464909 - Add a dynamic profiler label to nsContentSink::StartLayout that includes the document URL. r=bz
MozReview-Commit-ID: 4DpJxV4Wn49
2018-05-28 17:49:44 -04:00
Noemi Erli
0e7abac897 Backed out 4 changesets (bug 1464909) for failures in devtools/client/performance/test/unit/test_tree-model-08.js r=mstange on a CLOSED TREE
Backed out changeset 119c2055e002 (bug 1464909)
Backed out changeset 562aeeced55b (bug 1464909)
Backed out changeset c1e1d74ad27e (bug 1464909)
Backed out changeset 11670c51f572 (bug 1464909)
2018-06-01 01:23:49 +03:00