Commit Graph

383 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
842e5cdf17 Bug 1444580: Devirtualize a few other things. r=smaug
SetScriptHandlingObject / GetScopeObject / GetWindowInternal /
GetScriptHandlingObjectInternal / GetScriptHandlingObject

MozReview-Commit-ID: Bx7cCo7wc0Y
2018-03-12 12:26:00 +01:00
Emilio Cobos Álvarez
0591ec07c1 Bug 1444580: Devirtualize IsScriptEnabled. r=smaug
MozReview-Commit-ID: FEhddLUXnO4
2018-03-12 12:25:58 +01:00
Emilio Cobos Álvarez
c72085c513 Bug 1444580: Devirtualize PaymentRequest stuff. r=smaug
This one was easy, the bit was already in the right place :)

MozReview-Commit-ID: 79KJNsIXIyb
2018-03-12 12:25:56 +01:00
Emilio Cobos Álvarez
07907b44d5 Bug 1444580: Devirtualize autofocus and navigation timing stuff. r=smaug
MozReview-Commit-ID: K5Y9lxSJgOG
2018-03-12 12:25:54 +01:00
Emilio Cobos Álvarez
92ca1ace1b Bug 1444580: Devirtualize more nsIDocument bits. r=smaug
MozReview-Commit-ID: 5y1FgNb2NMB
2018-03-12 12:25:52 +01:00
Hiroyuki Ikezoe
78ac3dcdb4 Bug 1442817 - Add another variant of nsDocument::FlushPendingNotifications which are able to skip to flushing throttled animations. r=birtles,emilio
MozReview-Commit-ID: BZ9yAoAmWBB

--HG--
extra : rebase_source : 4f240b042992b3f13f296ce932c0d9795407932f
2018-03-09 06:41:30 +09:00
Emilio Cobos Álvarez
ff7e6d9b24 Bug 1443756: Devirtualize style-related nsIDocument methods. r=smaug
Summary: They have no particular reason to be virtual.

Reviewers: smaug

Bug #: 1443756

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

MozReview-Commit-ID: JN8MtfXvw3D
2018-03-07 23:57:04 +01:00
Emilio Cobos Álvarez
57591e34dd Bug 1443553: Devirtualize BeginUpdate, FlushPendingNotifications, CreatorParserOrNull. r=smaug
MozReview-Commit-ID: FzPcHcyzJ02
2018-03-07 11:22:51 +01:00
Emilio Cobos Álvarez
44c8fa419b Bug 1443553: Devirtualize ContentStateChanged / DocumentStatesChanged / StyleRule*. r=smaug
MozReview-Commit-ID: RE6rrBQMMU
2018-03-07 11:21:51 +01:00
Emilio Cobos Álvarez
cd0b749f03 Bug 1443553: Devirtualize nsIDocument::AddObserver / RemoveObserver. r=smaug
MozReview-Commit-ID: 8JeFLusnIQd
2018-03-07 11:20:43 +01:00
Emilio Cobos Álvarez
41e05df804 Bug 1443483: FlushTarget doesn't really make sense. r=xidorn
Summary:
FlushTarget wants to decide whether we should flush the parent document or all
of them. However, the only point of flushing parent documents is that media
query changes could affect the document we really want to flush.

That's completely pointless if we actually don't flush the subdocument, so just
skip doing that. This case is already checked (see the DocumentNeedsRestyle
stuff, which is also somewhat poorly named, which walks up the document chain).

Reviewers: xidorn

Bug #: 1443483

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

MozReview-Commit-ID: LiI7IrUBeqq
2018-03-07 01:09:46 +01:00
Christoph Kerschbaumer
d0bbab23a2 Bug 1430751 - Apply unified behavior model for about: pages to about:privatebrowsing. r=gijs,mrbkap 2018-03-05 09:20:34 +01:00
Blake Kaplan
eadd91cbee Bug 1404297 - Change the way we iterate over our links to update. r=smaug
MozReview-Commit-ID: BTADrB9itjh

--HG--
extra : rebase_source : 4884a91ec9fc64107c3406d3199fe05857210997
2018-03-01 11:26:54 -08:00
Bogdan Tara
52316bbce3 Backed out changeset b235338be4d9 (bug 1404297) for build bustages on /builds/worker/workspace/build/src/dom/base/nsDocument.cpp a=backout CLOSED TREE 2018-02-28 01:42:50 +02:00
Blake Kaplan
4eb24aab7b Bug 1404297 - Change the way we iterate over our links to update. r=smaug
MozReview-Commit-ID: BTADrB9itjh

--HG--
extra : rebase_source : 858f50bdbe2c35541b6a1975b0814e560db254c8
2018-02-27 17:54:00 -05:00
Emilio Cobos Álvarez
0459204d7c Bug 1425759: Make Shadow DOM Stylo-only. r=smaug
I don't plan to fix this stuff up on the old style system.

MozReview-Commit-ID: E7Ayatwsw4E
2018-02-27 12:39:25 +01:00
Emilio Cobos Álvarez
c03ffd9c62 Bug 1425759: Simplify the style backend type setup. r=bholley
Now that what we use to decide whether a document is styled by Servo are only
prefs and the doc principal, we don't need to inherit the style backend type,
since unless the pref has changed, the result will be the same.

MozReview-Commit-ID: KBmeBn1cRne
2018-02-27 12:39:20 +01:00
Boris Zbarsky
3d785e53b2 Bug 1437921 part 1. Add an attribute on document that is a Promise that resolves when the document has fired DOMContentLoaded _and_ maybe started layout. r=mystor
MozReview-Commit-ID: LpPFPKlHTXe
2018-02-22 16:55:40 -05:00
Hiroyuki Ikezoe
1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Olli Pettay
1dfbc7a331 Bug 1430301 - Implement ShadowRoot.elementFromPoint/elementsFromPoint, r=emilio
--HG--
extra : rebase_source : 570f17a7a63ea602533910192c04b4e12f082aa8
2018-02-16 20:42:58 +02:00
decltype
dd080e9eba Bug 712130 - Defer autofocus until after frame construction. r=bz
The autofocus attribute on form elements forces layout in CheckIfFocusable.
To avoid unpleasant FOUCs, defer autofocus processing until frames are
constructed in PresShell::Initialize.

Resolve the race between nsAutoFocusEvent running and page load by checking the
readystate at time of event posting. Skip autofocus if the element moved to a
different window in the meantime.

MozReview-Commit-ID: 90jiJYJWmRg

--HG--
extra : rebase_source : f94b479075df3e37ec1a658d71596c03930bab92
2018-01-08 22:35:00 +01:00
Dorel Luca
dabf7b41ee Merge mozilla-central to autoland. CLOSED TREE
--HG--
extra : amend_source : 021950f3661e3b1d96e768155c5754b7af039f84
2018-02-15 00:35:45 +02:00
Olli Pettay
1a35b521d0 Bug 1430305 - Implement ShadowRoot.fullscreenElement , r=mrbkap
--HG--
extra : rebase_source : 363143c1767cc9ad33fcd9dd7afd74848f709956
2018-02-13 18:57:32 +02:00
Adrian Wielgosik
6c854a7275 Bug 1438270 - Remove nsIDOMDocumentXBL. r=bz
MozReview-Commit-ID: 4TsjUaEdDP2

--HG--
extra : rebase_source : ab61d1832113a8c7b126b8856de59056fcf5ec5e
2018-02-14 20:10:45 +01:00
Cameron McCormack
73774a4b98 Bug 1435666 - Part 4: Remove nsIDOMXPathEvaluator. r=bz
MozReview-Commit-ID: 2nZmbJ9mdwI

--HG--
extra : rebase_source : 3acc54ac7726de2ff00a9b7ddadfcb7e28f573eb
2018-02-05 13:05:45 +08:00
Olli Pettay
de32ea78a2 Bug 1430303 - Implement ShadowRoot.pointerLockElement, r=mrbkap
--HG--
rename : dom/tests/mochitest/pointerlock/file_pointerlock-api.html => dom/tests/mochitest/pointerlock/file_pointerlock-api-with-shadow.html
2018-02-03 22:08:30 +02:00
Boris Zbarsky
0e718778d9 Bug 1434819 part 9. Remove nsIDOMNodeFilter. r=qdot
MozReview-Commit-ID: JsxGp9HQ2ak
2018-02-01 14:26:13 -05:00
Boris Zbarsky
59795295d1 Bug 1434819 part 6. Get rid of NodeFilterHolder. r=qdot
Now that TreeWalker and NodeIterator only use webidl APIs, they always have a
NodeFilter, not nsIDOMNodeFilter.

MozReview-Commit-ID: 5pzn9V3Kxzy
2018-02-01 14:26:12 -05:00
Emilio Cobos Álvarez
9a18395a1d Bug 1434474: There's no need to rebuild font / counter styles / font feature values off a runnable. r=bholley
Everything that needs them up-to-date will call flush appropriately, there
should be no need to do it manually.

This way we coalesce all the stylist updates until the next style flush in the
best case, or until one of the consumers actually needs them.

MozReview-Commit-ID: BVsxXxhtcKL

--HG--
extra : rebase_source : a41c14689fdcdb30935e16bdb0e757e7140e88e7
2018-01-31 11:12:36 +01:00
Cameron McCormack
cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Boris Zbarsky
ee62abf47b Bug 1434399 part 5. Remove nsIDOMXULDocument's commandDispatcher attribute. r=mystor
MozReview-Commit-ID: BjRVr3ScuK5
2018-01-31 14:49:27 -05:00
Cosmin Sabou
94617f91cf Backed out 19 changesets (bug 1434399) for build bustages on nsXULPopupManager.cpp on a CLOSED TREE
Backed out changeset 499f6dffd9cb (bug 1434399)
Backed out changeset 018290612415 (bug 1434399)
Backed out changeset f4c3179f8e59 (bug 1434399)
Backed out changeset f3ce2826b857 (bug 1434399)
Backed out changeset 6d2391af01dd (bug 1434399)
Backed out changeset dc98ed8c609a (bug 1434399)
Backed out changeset 8eaa395d6200 (bug 1434399)
Backed out changeset 19b18f4a53be (bug 1434399)
Backed out changeset 8ff378a6e96a (bug 1434399)
Backed out changeset 60fe73be1a26 (bug 1434399)
Backed out changeset faefb2751fdc (bug 1434399)
Backed out changeset 55cdf8b3a959 (bug 1434399)
Backed out changeset b578cc8efb92 (bug 1434399)
Backed out changeset 54cc4cb2fca1 (bug 1434399)
Backed out changeset f5343ef34d6c (bug 1434399)
Backed out changeset 8fb30e066cbd (bug 1434399)
Backed out changeset 21341b656b0f (bug 1434399)
Backed out changeset fab1f8b087a2 (bug 1434399)
Backed out changeset 55250a54852a (bug 1434399)
2018-01-31 22:45:26 +02:00
Boris Zbarsky
928d0d4fa7 Bug 1434318 part 13. Remove nsIDOMDocument::CreateEvent. r=mystor
MozReview-Commit-ID: EaUjTLeaQ0n
2018-01-31 15:18:11 -05:00
Boris Zbarsky
0935ca9973 Bug 1434318 part 12. Remove nsIDOMDocument's contentType attribute. r=mystor
MozReview-Commit-ID: DAXrxIxiac4
2018-01-31 15:18:11 -05:00
Boris Zbarsky
d8503e650d Bug 1434318 part 11. Remove nsIDOMDocument's stylesheet set APIs. r=mystor
MozReview-Commit-ID: 9ABdbYKZI6k
2018-01-31 15:18:11 -05:00
Boris Zbarsky
f0d195b828 Bug 1434318 part 10. Remove nsIDOMDocument's title attribute. r=mystor
MozReview-Commit-ID: IBToVxx4bSs
2018-01-31 15:18:10 -05:00
Boris Zbarsky
493dd48468 Bug 1434399 part 5. Remove nsIDOMXULDocument's commandDispatcher attribute. r=mystor
MozReview-Commit-ID: BjRVr3ScuK5
2018-01-31 14:49:27 -05:00
Boris Zbarsky
8d8cae1597 Bug 1276438 part 2. Move the implementation of the .body setter from nsHTMLDocument to nsIDocument. r=mystor
MozReview-Commit-ID: EJAZfrXC0QJ
2018-01-26 00:36:57 -05:00
Boris Zbarsky
672340ede6 Bug 1276438 part 1. Move the implementation of the .body getter from nsHTMLDocument to nsIDocument. r=mystor
MozReview-Commit-ID: BhQuGS1NdmQ
2018-01-25 06:55:47 -05:00
Hiroyuki Ikezoe
471558b3c1 Bug 1433336 - Collect only documents which are observerd by IntersectionObserver in nsRefreshDriver::Tick(). r=smaug
We don't need to collect whole descendants documents.

This patch intentionally leaves animation events handling which is another
caller of CollectDocuments in nsRefreshDriver since the animation part will
be fixed in a different way in bug 1415780.

MozReview-Commit-ID: INAJm1NHLuI

--HG--
extra : rebase_source : 4e255cef604d4455d6efa5dc2ebddd5dc649ee65
2018-01-26 20:11:17 +09:00
Hiroyuki Ikezoe
911b60cb08 Bug 1433336 - Add nsIDocument::CollectDescendantDocument(). r=smaug
In contrast to nsIDocument::EnumerateSubDocuments(), this new function is
supposed to work with the callback function which does not mutate any state
in the document, and also this function checks all descendant documents even
if there is a descendant that the callback function returns false.

MozReview-Commit-ID: 4f6zD29qQD2

--HG--
extra : rebase_source : 221269fb08bb73d938a6019e1274b2236ee34264
2018-01-26 20:11:09 +09:00
Kris Maglione
b3cac601f6 Bug 1432966: Sanitize HTML fragments created for chrome-privileged documents. r=bz f=gijs
This is a short-term solution to our inability to apply CSP to
chrome-privileged documents.

Ideally, we should be preventing all inline script execution in
chrome-privileged documents, since the reprecussions of XSS in chrome
documents are much worse than in content documents. Unfortunately, that's not
possible in the near term because a) we don't support CSP in system principal
documents at all, and b) we rely heavily on inline JS in our static XUL.

This stop-gap solution at least prevents some of the most common vectors of
XSS attack, by automatically sanitizing any HTML fragment created for a
chrome-privileged document.

MozReview-Commit-ID: 5w17celRFr

--HG--
extra : rebase_source : 1c0a1448a06d5b65e548d9f5362d06cc6d865dbe
extra : amend_source : 7184593019f238b86fd1e261941d8e8286fa4006
2018-01-24 14:56:48 -08:00
Nika Layzell
c33284aec0 Bug 1293362 - Part 4: Generate runtime bindings for calling xpcom methods from rust, r=froydnj
MozReview-Commit-ID: K37KyHkKsSl
2018-01-23 17:27:26 -05:00
Emilio Cobos Álvarez
141792488a Bug 1430608: Make nsMediaFeatures work with a document, not a pres context. r=heycam
Returning a zero-sized viewport in the case there's no shell / pres context.

For now, no other change yet. After this we can start tweaking the ShadowRoot
Stylist setup, and even try to return computed styles without a document \o/.

MozReview-Commit-ID: 3cT2PKQISri
2018-01-17 21:51:47 +01:00
Jessica Jong
4bee56a645 Bug 1428685 - Use dom.webcomponents.shadowdom.enabled pref for Shadow DOM. r=smaug
Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and
this pref is only used by Shadow DOM right now, so we should rename it to
"dom.webcomponents.shadowdom.enabled"

MozReview-Commit-ID: er1c7AsSSW
2018-01-16 17:16:30 +01:00
Alastor Wu
cb52b8db63 Bug 1428722 - part2 : move all user-activation implementation details to nsDocument. r=smaug
In order to write tests, I would like to create an method that allows chorome js can directly set the user-activation flag.

Therefore, I need to move all these details into nsDocument, then we could easily simulate the user activation.

MozReview-Commit-ID: 5JrCoQc0vF7

--HG--
extra : rebase_source : 256ff2993ef754dc51409e7e444b868a3302bd65
2018-01-11 17:26:30 +08:00
Alastor Wu
acecd71925 Bug 1428722 - part1 : always activate the top level frame. r=smaug
For top level frame, it should also be activated when user activate its child frame.

eg. A (youtube.com) -> B (ad.com), when user activate B frame, the A frame would also be activated.

MozReview-Commit-ID: BP7eGKiqYJe

--HG--
extra : rebase_source : 8a07e2a46d70957989168a9ee677e5241fee61fe
2018-01-08 16:44:28 +08:00
Coroiu Cristina
c6a942e1bf Merge inbound to mozilla-central r=merge a=merge 2018-01-13 11:55:23 +02:00
Nika Layzell
a0d1f16079 Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug
MozReview-Commit-ID: 2aHA6NcQPGk
2018-01-12 17:52:52 -05:00
Csoregi Natalia
5167aaf995 Backed out 4 changesets (bug 712130) for Android autofocus failures and for failing browser_formdata.js. on a CLOSED TREE
Backed out changeset e7738f07edae (bug 712130)
Backed out changeset 3774e90777a7 (bug 712130)
Backed out changeset a3cffbfc8395 (bug 712130)
Backed out changeset ba6c2fff9fd5 (bug 712130)
2018-01-12 22:46:22 +02:00