Commit Graph

489 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
32156dc752 Bug 1444580: Devirtualize the IdentifierMap stuff. r=smaug
MozReview-Commit-ID: 5IIp95VEtvk
2018-03-12 12:26:11 +01:00
Emilio Cobos Álvarez
5ffef03826 Bug 1444580: Devirtualize GetImplementation. r=smaug
MozReview-Commit-ID: 2nsR595RotH
2018-03-12 12:26:10 +01:00
Emilio Cobos Álvarez
6100eb8087 Bug 1444580: Devirtualize the fullscreen stuff. r=smaug
MozReview-Commit-ID: CgPENqExkQh
2018-03-12 12:26:09 +01:00
Emilio Cobos Álvarez
0f6e1aec50 Bug 1444580: Devirtualize the visibility state stuff. r=smaug
Also rename GetVisibilityState to ComputeVisibilityState, since that's what it
does, the getter is VisibilityState.

MozReview-Commit-ID: 9qfKvUmO0dW
2018-03-12 12:26:07 +01:00
Emilio Cobos Álvarez
ac1848dee7 Bug 1444580: Mark nsIDocument::Dispatch final. r=smaug
MozReview-Commit-ID: 1xAE0WF8IFN
2018-03-12 12:26:05 +01:00
Emilio Cobos Álvarez
ee333aaf7e Bug 1444580: Devirtualize the IntersectionObserver bits. r=smaug
MozReview-Commit-ID: 65WtMQPu7f4
2018-03-12 12:26:03 +01:00
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
Bobby Holley
f458d41b8e Bug 1398119 - Rearrange NoteDirtyElement for faster bailouts on the same restyle root. r=emilio
This eliminates ~90% of the time spent in NoteDirtyElement on this testcase.

MozReview-Commit-ID: Lm5hf7QRiOK
2018-01-12 12:05:40 -08:00
decltype
222776c45b 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.

MozReview-Commit-ID: 90jiJYJWmRg

--HG--
extra : rebase_source : afff926ba916139b14d60e06db56290c6935673a
2018-01-08 22:35:00 +01:00
Ciure Andrei
f7400ad72e Merge inbound to mozilla-central r=merge a=merge 2018-01-11 11:54:56 +02:00
Kate McKinley
e97980a95e Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb
This patch removes support and tests for HSTS priming from the tree.
2018-01-10 11:07:00 -05:00
Blake Kaplan
586e13b2b7 Bug 1404297 - Temporarily assert that we don't re-enter this function. r=bzbarsky
MozReview-Commit-ID: FoQGVDWtwN1

--HG--
extra : rebase_source : c22cc3a022dc01923696940fc0b0aae708232db0
2018-01-10 18:48:26 -05:00
Jon Coppeard
bc9a97d964 Bug 1361369 - Allow async attribute on inline module scripts r=smaug 2018-01-08 15:17:34 +00:00
Emilio Cobos Álvarez
9db998a70b Bug 1426494: s/StyleScope/DocumentOrShadowRoot. r=smaug
MozReview-Commit-ID: DsFPlQMGAyv
2017-12-22 01:56:36 +01:00
Emilio Cobos Álvarez
d5196e4079 Bug 1426494: Share more code among Document / ShadowRoot. r=smaug
MozReview-Commit-ID: C4cJrSFPnIb
2017-12-22 01:56:17 +01:00
Emilio Cobos Álvarez
041202a4fc Bug 1426494: Devirtualize StyleScope::AsNode. r=smaug
MozReview-Commit-ID: 2nDEI5aIu46
2017-12-22 01:56:16 +01:00
Emilio Cobos Álvarez
6abaf32af5 Bug 1420547: Notify the pres shell specially, instead of via mutation observers. r=bz
This makes the pres shell be notified as the last observer unconditionally.

In practice this doesn't matter, and it may already be the case if an iframe
goes display: none and back. In practice, the only dependency that requires this
order is that the pres shell needs to be notified _after_ the content sink, so
we don't try to enter frame construction before beginning the shell update.

That may be worth looking into, but definitely not in the scope of this bug... :)

MozReview-Commit-ID: 9WeJ5kaUtBq

--HG--
extra : rebase_source : 6589df0aa8a875dc270894fabb6b4bc170d6b6fe
2017-12-06 05:26:32 +01:00
Cosmin Sabou
4620ebda6e Backed out 3 changesets (bug 1426494) for build bustages on dom/base/FuzzingFunctions.h:25:44 r=backout on a CLOSED TREE
Backed out changeset 8d07cb1ef232 (bug 1426494)
Backed out changeset 74a8ebb0f5d3 (bug 1426494)
Backed out changeset 07c4aa18a0b6 (bug 1426494)
2017-12-21 03:09:22 +02:00
Emilio Cobos Álvarez
d58883c70b Bug 1426494: s/StyleScope/DocumentOrShadowRoot. r=smaug
MozReview-Commit-ID: DsFPlQMGAyv
2017-12-21 00:24:28 +01:00
Emilio Cobos Álvarez
7e7dee971b Bug 1426494: Share more code among Document / ShadowRoot. r=smaug
MozReview-Commit-ID: C4cJrSFPnIb
2017-12-21 00:24:27 +01:00
Emilio Cobos Álvarez
85d3328fea Bug 1426494: Devirtualize StyleScope::AsNode. r=smaug
MozReview-Commit-ID: 2nDEI5aIu46
2017-12-21 00:24:26 +01:00
Ben Kelly
aa417857ba Bug 1426253 P1 Expose nsIDocument GetClientInfo(), GetClientState(), and GetController(). r=asuth 2017-12-20 10:53:18 -05:00
Emilio Cobos Álvarez
aff5090202 Bug 1425769: Base class for ShadowRoot and Document to manage style state. r=smaug
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.

I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.

Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.

Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.

MozReview-Commit-ID: D9hnDgPQAS5
2017-12-19 11:09:59 +01:00
Dorel Luca
e968e809aa Backed out changeset 13faabcf8e96 (bug 1425769) for Linux bustage on build/src/dom/base/nsLineBreaker.h 2017-12-19 11:07:44 +02:00
Emilio Cobos Álvarez
5ae586e759 Bug 1425769: Base class for ShadowRoot and Document to manage style state. r=smaug
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.

I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.

Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.

Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.

MozReview-Commit-ID: D9hnDgPQAS5

--HG--
extra : rebase_source : 0597917521894288c6b749e5d3ac6ac3b7db44a0
2017-12-17 22:29:10 +01:00
Emilio Cobos Álvarez
b864765f92 Bug 1424816: Remove the document state cache. r=smaug
See bug 1422633, there are assertions missing, and servo doesn't assert at all
anymore.

I don't think it's worth optimizing / lazily resolving it, each time the
document state changes.

We usually just restyle the world anyway (which requires recomputing it), and
the changes that it's optimizing (nsWindow::SetActive() and XUL root element
localedir attribute changes) aren't common enough to warrant the complexity I'd
say.

This doesn't handle invalidating the cache in the case the root element goes
away, I haven't bothered because it was already broken, and GetRootElement() is
already gone in RemoveSubtreeFromDocument.

MozReview-Commit-ID: 9RuQhmmy7Kr
2017-12-14 16:07:36 +01:00
Ben Kelly
890e126aaa Bug 1293277 P6 Use the ClientInfo.Id() value for FetchEvent.clientId. r=baku 2017-12-12 15:44:48 -05:00
Jessica Jong
7fe15d1a52 Bug 1422931 - Part 2: Make webcomponents preference per-doc. r=smaug
This is to fix the case where preference is restore to false when a testcase
ends, but nsDocument::DeleteShell is called afterwards. So, we make the
preference per-doc and set it when the document is created. The value does not
change for the lifetime of the document.
2017-12-09 11:25:14 +08:00
Narcis Beleuzu
f0d93dda2c Backed out 2 changesets (bug 1422931) for crashtest failures on dom/base/crashtests/1419799.html r=backout on a CLOSED TREE
Backed out changeset 60d9744e3fc4 (bug 1422931)
Backed out changeset cf554d5d70cc (bug 1422931)
2017-12-08 18:27:56 +02:00
Jessica Jong
00fc818c22 Bug 1422931 - Part 2: Make webcomponents preference per-doc. r=smaug
This is to fix the case where preference is restore to false when a
testcas ends, but nsDocument::DeleteShell is called afterwards. So, we
make the preference per-doc and once it is enabled for a document, it
stays enabled.
2017-12-08 22:17:40 +08:00
Emilio Cobos Álvarez
1138344d9a Bug 1422633: Inline nsIDocument::ThreadSafeGetDocumentState(). r=smaug
It's silly to pay a function call for that, and it shows up in stylo-chrome
profiles.

MozReview-Commit-ID: 8m7ZHG1KX15
2017-12-05 14:20:07 +01:00
Edgar Chen
9f4324f41e Bug 1416999 - Remove document.registerElement; r=smaug
MozReview-Commit-ID: HiX07Vbljhk

--HG--
rename : dom/base/test/chrome/registerElement_ep.js => dom/base/test/chrome/custom_element_ep.js
rename : dom/base/test/chrome/frame_registerElement_content.html => dom/base/test/chrome/frame_custom_element_content.html
rename : dom/base/test/chrome/test_registerElement_content.xul => dom/base/test/chrome/test_custom_element_content.xul
rename : dom/base/test/chrome/test_registerElement_ep.xul => dom/base/test/chrome/test_custom_element_ep.xul
rename : dom/base/test/test_document_register.html => dom/base/test/test_custom_element.html
rename : dom/tests/mochitest/webcomponents/test_document_register.html => dom/tests/mochitest/webcomponents/test_custom_element_define.html
rename : dom/tests/mochitest/webcomponents/test_document_register_parser.html => dom/tests/mochitest/webcomponents/test_custom_element_define_parser.html
rename : dom/tests/mochitest/webcomponents/test_template_custom_elements.html => dom/tests/mochitest/webcomponents/test_custom_element_template.html
extra : rebase_source : cd2ebf166e8bd9c49910387c9136d7b83b51598d
2017-11-16 12:23:15 +08:00
Alphan Chen
54f4537537 Bug 980904 - Disable the Character Encoding menu when document is decoded as UTF-8 without errors. r=hsivonen,emk,Gijs 2017-11-23 15:03:41 +08:00
Emilio Cobos Álvarez
ebfcd1dbd3 Bug 1414999: Synchronously clean style data from the DOM tree when the shell goes away. r=bz
There's nothing preventing the flat tree from changing while the document
doesn't have a shell. In that case, we really really don't want to lose track
of elements with stale style data, since then we'll mess up.

It's ok to _not_ clear the style data when the document goes into the BFCache
though, because the document is thrown away if other document runs script and
touches the cached DOM.

MozReview-Commit-ID: 4W3xDAnnLPL
2017-11-20 22:11:23 +01:00
Edgar Chen
698fdbc62e Bug 1396620 - Part 1: Remove created callback for custom elements; r=jdai,smaug
MozReview-Commit-ID: IDovq3OZwgy

--HG--
extra : rebase_source : bae891833d4f8139fed2ed31af85173694c7eb11
2017-10-13 23:36:54 +08:00
arthur.iakab
cb136d6136 Backed out changeset ed0cc9f86583::b6b642efbb74 (bug 1396620) for static failure at dom/base/CustomElementRegistry.cpp r=backout on a CLOSED TREE
Backed out changeset b6b642efbb74 (bug 1396620)
Backed out changeset ed0cc9f86583 (bug 1396620)
2017-11-17 01:22:14 +02:00
Edgar Chen
fd6b408209 Bug 1396620 - Part 1: Remove created callback for custom elements; r=jdai,smaug
MozReview-Commit-ID: IDovq3OZwgy

--HG--
extra : rebase_source : 34b67e07a7e15af815c6921a41272ee0fddfb93d
2017-10-13 23:36:54 +08:00
Alastor Wu
3a54b06eb3 Bug 1415444 - part2 : add log. r=smaug
MozReview-Commit-ID: KFB3HiPuWeo

--HG--
extra : rebase_source : 80661ec9a176238fc965bacd08b43cbb09a121a4
2017-11-14 14:48:23 +08:00
Alastor Wu
00c469c134 Bug 1415444 - part1 : add flag to record whether the document has been activated by specific user gestures. r=smaug
This flag would be used to help us decide whether website could be allowed the autoplay.
The media related implementation would be implemented in bug1382574.

MozReview-Commit-ID: GGIauBufs5A

--HG--
extra : rebase_source : c407ceed311fc3fb0140e5da44fd69e457a5098f
2017-11-14 14:48:18 +08:00
Nika Layzell
c223b9ff2d Bug 1414974 - Part 6: Change WebIDL bindings to refer to nsGlobalWindowInner rather than nsGlobalWindow, r=bz
MozReview-Commit-ID: KbCpDFoWyTe
2017-11-09 10:44:49 -05:00
Sebastian Hengst
a353221537 merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-11-09 00:00:16 +02:00
Boris Zbarsky
272cbb590b Bug 1415176. Move getElementsByName from HTMLDocument to Document. r=mccr8
MozReview-Commit-ID: CRfrXC2x97S
2017-11-08 11:13:33 -05:00
Brad Werth
2a43297875 Bug 1412173 Part 1: Implement the Document ignore-opens-during-unload counter required by spec. r=bz
MozReview-Commit-ID: IWfT5c0H3t

--HG--
extra : rebase_source : 9a61f095a8c31ee3ac0f89b413d0cc62eec24292
2017-11-02 11:47:21 -07:00
Phil Ringnalda
81c6fb1b5b Backed out 2 changesets (bug 1412173) for unexpected passes in wpt's /html/browsers/browsing-the-web/unloading-documents/003.html
Backed out changeset 68de62dd7a9b (bug 1412173)
Backed out changeset 97de1e0cd693 (bug 1412173)

MozReview-Commit-ID: HiASSDNl4DD
2017-11-06 19:32:05 -08:00
Brad Werth
28b0ab34dc Bug 1412173 Part 1: Implement the Document ignore-opens-during-unload counter required by spec. r=bz
MozReview-Commit-ID: IWfT5c0H3t

--HG--
extra : rebase_source : d0c03ea38bf4d33ca7ac8ee7696936bdb3ea7518
2017-11-02 11:47:21 -07:00
Henri Sivonen
080aa07386 Bug 1412866 - Use spec nomenclature for the ignore-destructive-writes counter. r=smaug
MozReview-Commit-ID: FKwbEZll95J

--HG--
extra : rebase_source : b42a7a17434f1c711c395fd5a09893cac81b7a9d
2017-10-30 17:45:09 +02:00
Eden Chuang
6b14fc7125 Bug 1403079 - Add mAllowPaymentRequest and related methods on nsIDocument to check if PaymentRequest API is allowed to use. r=smaug
Add a new member mAllowPaymentRequest on nsIDocument and following related
methods,
  bool AllowPaymentRequest() const
  void SetAllowPaymentRequest(bool aAllowPaymentRequest)
mAllowPaymentRequest is used to check if PaymentRequest is allowed to use on
the document. According to the spec
  https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use
the mAllowPaymentRequest should be true under following situations
  1. The document is the top level content document.
  2. The document is the same origin with its parent document and its parent
     document's mAllowPaymentRequest is true.
  3. The document is different origin with its parent document but its
     parent node is an iframe with allowpaymentrequest flag and the parent
     document's mAllowPaymentRquest is true.

This patch also include following mochitests
  1. test for allowpaymentrequest flag changing. The flag change effect should
     not be applied to the document immediately, it should be updated while
     the browsing context is updated.
  2. test for effect propagation in the nested iframe.
2017-10-19 15:56:51 +08:00
Jessica Jong
d70b8d543c Bug 1378079 - Part 2: Introduce throw-on-dynamic-markup-insertion counter. r=hsivonen
Per spec, document objects have a throw-on-dynamic-markup-insertion counter,
which is used in conjunction with the create an element for the token algorithm
to prevent custom element constructors from being able to use document.open(),
document.close(), and document.write() when they are invoked by the parser.

--HG--
extra : rebase_source : 7cbc10c77765b84bbaf07a05f205f02169a79ee0
2017-10-26 14:08:35 +08:00
Emilio Cobos Álvarez
d631a75643 Bug 1410074: Make the caller type from MatchMedia arrive to the CSS code. r=xidorn,bz
MozReview-Commit-ID: LUiobfHSUq1
2017-10-25 16:04:48 +02:00
Cameron McCormack
a341b24925 Bug 1409992 - Allow SVG as images to load data: URL images. r=edgar
MozReview-Commit-ID: KMirRmkLBVa

--HG--
extra : rebase_source : 6d40f52cc7318d11dddda74e9bf9386c35d15ed5
2017-10-19 18:00:43 +08:00
Sebastian Hengst
edc6c5e2b9 Backed out changeset 725b9a93a191 (bug 1409992) for frequently failing layout/reftests/svg/foreignObject-img.html. r=backout
--HG--
extra : amend_source : 4c16e1f7dba810a1a2d0eee795e0c9c0d907087e
2017-10-20 11:23:28 +02:00
Cameron McCormack
6e4f600c67 Bug 1409992 - Allow SVG as images to load data: URL images. r=edgar
MozReview-Commit-ID: KMirRmkLBVa

--HG--
extra : rebase_source : fdbf2a5964eb50c67b825b3326c8034261620a49
2017-10-19 18:00:43 +08:00
Emilio Cobos Álvarez
2f8b5b12a4 Bug 1407864: Do not thrash the selector cache when parsing the same selector with different backend. r=heycam
Since the presence of an entry with a null selector is different for Gecko and
Servo, this seemed easier, and mimics nsLayoutStyleSheetCache.

Also, this is going away soon anyway as soon as I get to implement the rest of
the methods for stylo.

MozReview-Commit-ID: DtHJbw8C0GX

--HG--
extra : rebase_source : dd450a6972054971eba8bba5bb022b74d07c2a0b
2017-10-12 10:07:25 +02:00
evilpies@gmail.com
06beef32ba Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz,mystor
MozReview-Commit-ID: 1IMi5MqTx7o

--HG--
extra : rebase_source : 373f1928987718fe3bc22306e0dd3ae13fc0cd9f
2017-10-10 09:54:00 -07:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Emilio Cobos Álvarez
c3d21f55ab Bug 1404897: Allow storing Servo selector lists in the document's selector cache. r=heycam
MozReview-Commit-ID: GtIWGN2zEGT

--HG--
extra : rebase_source : 90d4a61bcc65995ca8a130cd24582e4f20d52276
2017-10-02 15:32:07 +02:00
Sebastian Hengst
635c45113c Backed out changeset 9a8f77f3dfe7 (bug 1404897) 2017-10-04 12:55:16 +02:00
Emilio Cobos Álvarez
dd2d07a12c Bug 1404897: Allow storing Servo selector lists in the document's selector cache. r=heycam
MozReview-Commit-ID: GtIWGN2zEGT

--HG--
extra : rebase_source : 42de988406724fd3dbb11134cb454bbfc927e3a6
2017-10-02 15:32:07 +02:00
Sebastian Hengst
82e62e8f75 Backed out changeset 2a7dd15c8206 (bug 1404897) 2017-10-04 11:24:31 +02:00
Emilio Cobos Álvarez
8fea520510 Bug 1404897: Allow storing Servo selector lists in the document's selector cache. r=heycam
MozReview-Commit-ID: GtIWGN2zEGT
2017-10-04 11:01:37 +02:00
Wes Kocher
7c7aca4ea6 Backed out 2 changesets (bug 1305237) for crashtest failures in 403574-1.xhtml and 1282985-1.svg a=backout
Backed out changeset 96b5d596cc27 (bug 1305237)
Backed out changeset 5fe72402746f (bug 1305237)

MozReview-Commit-ID: CjCWY73Hps1

--HG--
extra : rebase_source : 7a9f0893dabdb0cb6ea79cc9cb7169ceed14616f
2017-10-02 16:41:56 -07:00
evilpies@gmail.com
af192f668f Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz
MozReview-Commit-ID: ADVtxjSQjk5

--HG--
extra : rebase_source : 6e0ddf49328d7ae71937b7bbe5e5bea736c49bef
2017-10-02 11:05:33 -07:00
John Dai
25f8ec6929 Bug 1121994 - Implement adopted callback for custom elements. r=smaug 2017-10-02 00:42:00 -04:00
Jessica Jong
9c73bf3115 Bug 1334044: Replace detached callback (v0) with disconnected callback (v1). r=smaug
MozReview-Commit-ID: 8jxFK1fze15
2017-09-26 13:56:11 +08:00
Jessica Jong
dca1a68e1a Bug 1334043 - Part 1: Replace attached callback (v0) with connected callback (v1). r=smaug
MozReview-Commit-ID: 3qQh4viyvBX
2017-09-26 13:55:58 +08:00
Wei-Cheng Pan
5e7583d760 Bug 1363805 - Part 1: Add a flag to nsIDocument::FlushPendingNotifications. r=heycam
This flag indicates that document can flush parent-document only or need to do
the normal flushing.

MozReview-Commit-ID: L9KZA6jNsOz

--HG--
extra : rebase_source : ac794a5dbcd4aab8d691ebcc3804ec208755a716
2017-05-23 10:27:13 +08:00
Kris Maglione
0c3a1b9b7e Bug 1379148: Part 1 - Allow blocking only non-script-created parsers. r=hsivonen
MozReview-Commit-ID: 8cGxywiUzWj

--HG--
extra : rebase_source : b684a4a7d00c141a3def4f1cde9d7463c12baa4b
2017-09-20 16:12:27 -07:00
Boris Zbarsky
e3883c1255 Bug 1400501. Store a list of ancestor principals on docshell and document. r=mystor
Right now every document in a docshell makes a copy of the list.  In practice,
this list is usually pretty short (limited by depth of iframe nesting), so this
is probably not a problem.  We could add a bit of complexity and have a
refcounted struct that contains the list... I wish we had something as simple
as Rust's Arc that we could use here.

MozReview-Commit-ID: 8jGIlkhp1DU
2017-09-18 21:24:38 -04:00
Masatoshi Kimura
f7995f942e Bug 1400207 - Remove nsIDocument::AddCharSetObserver. r=hsivonen
MozReview-Commit-ID: 7uWDQvyz4yC

--HG--
extra : rebase_source : c8955e6b090d9084938c290f096b41b9090ec71c
2017-09-14 23:19:22 +09:00
Henri Sivonen
3c8567b60d Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin
MozReview-Commit-ID: Llt29dvB4Io

--HG--
extra : rebase_source : 3ae51dc8beff3fb19e9318a6c7c30c9ab08a5b57
2017-08-29 16:01:42 +03:00
Blake Kaplan
d9ad239a35 Bug 1325923 - Implement the "cookie averse document" concept. r=Ehsan
See https://html.spec.whatwg.org/multipage/dom.html#resource-metadata-management:cookie-averse-document-object

MozReview-Commit-ID: GndxqhU77cS
2017-08-28 16:41:42 -07:00
Yoshi Huang
df6bad1c1e Bug 1373780 - Part 3: add isImgSet argument. r=jdm
Per mixed-content-blocked spec, [1], <img srcset> and <picture> should
be blocked. However we still fetch <img srcset> and <picture> in image
preload, because they are fetched with contentPolicyType
TYPE_INTERNAL_IMAGE_PRELOAD and won't be rejected by nsMixedContentBlocker.cpp.

So I updated the image preloading code, and use the type TYPE_IMAGESET
if the image request is for <picture> or <img srcset>, otherwise for
normal image load we still use TYPE_INTERNAL_IMAGE_PRELOAD.

[1]: https://w3c.github.io/webappsec-mixed-content/#should-block-fetch
  4. Return allowed if one or more of the following conditions are met:
     request’s type is "image", and initiator is not "imageset".
  5. Return blocked.
2017-08-24 18:10:54 +08:00
Eric Rahm
a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Bobby Holley
7210bd7226 Bug 1383332 - Track the restyle root and use it to do less work during the traversal. r=emilio
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 21:19:24 -07:00
Masayuki Nakano
a7240d8532 Bug 1391538 - nsTextFragment for text nodes in <input> or <textarea> shouldn't store text as single byte characters even if all characters are less than U+0100 r=smaug
nsTextFrame stores text as single byte character array if all characters are
less than U+0100.  Although, this saves footprint, but retrieving and modifying
text needs converting cost.  Therefore, if it's created for a text node in
<input> or <textarea>, it should store text as char16_t array.

MozReview-Commit-ID: 9Z82rketT7g

--HG--
extra : rebase_source : 59f59ac1488c21a57d95d253cc794a011d672c95
2017-08-18 16:05:16 +09:00
Bobby Holley
d42f0733ac Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam
Our current machinery for enabling stylo requires a docshell - if there isn't
one, we default to the Gecko style system.

When getComputedStyle operates on an element without a presshell, it uses the
caller's presshell instead. If the element has previously been styled with
one style system (but no longer has a presshell), and the caller uses a
different style backend, using the caller's style system can cause crashes when
we pull bits of cached data off the DOM (like cached style attributes).

So we want to throw when window.getComputedStyle(element) is called for a
(window, element) pair with different style backends (which is what the next
patch in this bug does).

However, that causes a few failures where stylo-backed documents try to do
getComputedStyle on an XHR document (which, without a docshell, will use the
gecko style system).

So this patch does some work to propagate the creator's style backend into
various docshell-less documents. This should allow both chrome (which uses gecko)
and content (which uses stylo) to use getComputedStyle on the response document
for XHRs they create.

Note that the second patch in this bug will make
chromeWin.getComputedStyle(contentObj) throw. If we discover code that does
that, we can just make it invoke the content's getComputedStyle method over Xrays.

MozReview-Commit-ID: 5OsmHJKq5Ui
2017-08-15 19:10:43 -07:00
Aryeh Gregor
2340265246 Bug 718711 - getSelection() should exist for XML documents; r=smaug
The spec puts it on the Document interface, not HTMLDocument, so it
should apply to XML documents as well.  In general we want APIs to be
available for all types of documents unless there's a specific reason
not to.

Tests submitted upstream:
https://github.com/w3c/web-platform-tests/pull/6804

MozReview-Commit-ID: A0QDxpONNCE

--HG--
extra : rebase_source : 0c84863b455c3e9748aedcfb562920f8679e358c
2017-08-10 16:53:42 +03:00
Sebastian Hengst
56c035fa36 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4cZJ3qFjvPY
2017-08-12 23:49:21 +02:00
Nicholas Nethercote
764c284800 Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8.
This makes it clear they are never null.

MozReview-Commit-ID: H4i8uqZs48H

--HG--
extra : rebase_source : c7ada64881f015c68eaee2fbfad901f806cab833
2017-08-10 14:13:22 +10:00
Cameron McCormack
fdf6f9c5ef Bug 1384741 - Part 1: Add facility to buffer up CSP violation reports. r=bz
MozReview-Commit-ID: G4JLTmP1wD7
2017-08-07 10:09:32 +08:00
Brad Werth
4e918570ee Bug 1387243 Part 1: Split nsDocument::EndLoad into a part that runs unconditionally, and a part that runs only when there is a matching BeginLoad call. r=bz
MozReview-Commit-ID: 8Pn6i2f0cez

--HG--
extra : rebase_source : 21897c0ea16d263c297783a6393ee7725c1106c9
2017-08-03 16:27:22 -07:00
Cameron McCormack
5a641131b9 Bug 1384824 - Part 1: Lazily clear stale Servo element data from a document when its pres shell changes. r=bholley
MozReview-Commit-ID: 1c566PRqFpe
2017-08-04 19:26:04 +10:00
Kyle Machulis
d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Ryan Hunt
f116107a57 Bug 1379280 - Only do async keyboard scrolling for a selection, not a focused element. r=smaug
This commit changes async keyboard scrolling to be enabled only if the content to
scroll is from a selection. This works around the problem of detecting whether
an arbitrary element has key listeners that should prevent async key scrolling,
because when they have the focus we will have disabled async key scrolling.

MozReview-Commit-ID: 6HhSuGZNsMX

--HG--
extra : rebase_source : 98a6449dd1e913136ca66532a67df8e0bb717e52
2017-07-13 15:53:26 -05:00
Matt Brubeck
8f14d009f9 Bug 1367312 - stylo: Implement :-moz-lwtheme* pseudo-classes. r=emilio
MozReview-Commit-ID: 4T6Tn1VEwXP

--HG--
extra : rebase_source : c2dd0b62757c3da5380414fa3214248b9328d38a
2017-06-28 09:04:49 -07:00
Masatoshi Kimura
b515c9c804 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : fdae0046f882d47fb539a7f882364e5c5caafdcd
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Cameron McCormack
fab1072b7f Bug 1291515 - Part 1: Introduce a pref for <style scoped>. r=bholley,dbaron
MozReview-Commit-ID: 1J9IvPrC0xh

--HG--
extra : rebase_source : 4a3da0dc41ec71d2804e6f8a778613e8749940be
2017-06-21 09:25:43 +08:00
Sebastian Hengst
dfc1ad2562 Backed out changeset 7235d05662b0 (bug 1373984) for Android bustage. r=backout on a CLOSED TREE 2017-06-25 18:30:13 +02:00
Masatoshi Kimura
2e04751921 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : a84ab644f52e68676b45f112ff69f868d89f6177
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Wes Kocher
e02435a31e Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
2017-06-25 05:10:14 -07:00
Masatoshi Kimura
241039fd97 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : 09da1685795583513bf019d61c58230c2c4d298d
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Nicolas B. Pierron
c64732dcc7 Bug 1362114 - JSBC: Add telemetry to later tune the heuristics. r=mrbkap,francois 2017-06-20 09:53:10 +00:00
Bill McCloskey
1158c7c282 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Ben Kelly
bd95903746 Bug 1197401 Remove the disabled HTML imports implementation. r=wchen 2017-06-12 07:36:02 -07:00
Boris Zbarsky
3119ff4e5e Bug 1364360 part 1. Make Element::GetScrollFrame follow the spec more closely in the quirks mode case. r=ehsan 2017-05-25 13:39:44 -04:00
Ting-Yu Lin
911f08dd7f Bug 1363640 Part 6 - Use bound document's style backend when creating an XBL document. r=heycam
The <content> in an XBL document could be injected into documents with
different style backend types. Therefore, we need to set the XBL document's
style backend to the same as the bound document's so that the style
attribute of the content can be processed by the correct backend. <marquee>
elements in xbl-marquee.xml is one such example.

MozReview-Commit-ID: 7M33zlbZqNF

--HG--
extra : rebase_source : 363fd7c2bc91e959fbcfb288bdc1b65cfd1bba97
2017-05-11 17:16:27 -07:00
Ting-Yu Lin
bd80f687dc Bug 1363640 Part 1 - Move IsContentDocument() and IsTopLevelContentDocument() from nsDocument to nsIDocument. r=heycam
In this way, the callers who have nsIDocument don't need to cast to nsDocument.

MozReview-Commit-ID: 8zVUjkbrlaG

--HG--
extra : rebase_source : c444a103a430e3746508cc894902e677d58e65fe
2017-05-09 18:28:36 -07:00
Andrea Marchesini
1981f67eb3 Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book
f0d6de60d7 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla'
--HG--
rename : dom/script/ScriptSettings.cpp => dom/base/ScriptSettings.cpp
rename : dom/script/ScriptSettings.h => dom/base/ScriptSettings.h
rename : dom/script/nsIScriptElement.h => dom/base/nsIScriptElement.h
rename : dom/script/nsIScriptLoaderObserver.idl => dom/base/nsIScriptLoaderObserver.idl
rename : dom/script/ScriptElement.cpp => dom/base/nsScriptElement.cpp
rename : dom/script/ScriptElement.h => dom/base/nsScriptElement.h
rename : dom/script/ScriptLoader.cpp => dom/base/nsScriptLoader.cpp
rename : dom/script/ScriptLoader.h => dom/base/nsScriptLoader.h
2017-05-08 09:54:38 +02:00
Andrea Marchesini
7a4ef797cb Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00