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

170 Коммитов

Автор SHA1 Сообщение Дата
Dave Townsend 5b71f53b28 Bug 1479050: Add document.createXULElement for creating XUL elements from any document type. r=bz
Tags: #secure-revision

Bug #: 1479050

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

--HG--
extra : rebase_source : 190ce867f17dd62e68ff119842f1fe977d43bbc4
extra : amend_source : de4a7661b9efd72b009b9d2c56f0d2a902192bbe
2018-07-27 14:24:23 -07:00
Kris Maglione 031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00
Narcis Beleuzu 561ccb2ceb Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione cb1ee1e34d Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : rebase_source : a13c59d1a5ed000187c7fd8e7339408ad6e2dee6
2018-05-21 16:58:23 -07:00
Emilio Cobos Álvarez 638c015ba9 Bug 1477198: Remove Document.obsoleteSheet. r=bz
Not used anywhere, not even comm-central or bluegriffon.

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

MozReview-Commit-ID: LGefiaYSZjT
2018-07-29 00:34:33 +02:00
Brian Birtles 8ab6ee61ba Bug 1471814 - Add a preference for {Document,Element}.getAnimations(); r=bz,hiro
This is probably the last thing we will ship since it needs the most spec work.

MozReview-Commit-ID: LLmDBLCsCBJ

--HG--
extra : rebase_source : c06752c9201a9ede87e1ac200ab12577bf784ce6
2018-07-14 09:23:03 +09:00
Brian Birtles 5d13151cb9 Bug 1471814 - Add a preference for Web Animations timelines; r=bz,hiro
We don't intend to ship this in the near future until the integration with
AnimationWorklet is clear (although we might ship a read-only version).

That said, we use this feature extensively internally (e.g. in DevTools etc.) so
we enable this feature for system callers.

MozReview-Commit-ID: AhB7ZmU1Xzw

--HG--
extra : rebase_source : 630d7dc56b44a9261bb34aa5417cb9b7050efba4
2018-07-14 09:23:03 +09:00
Chris Pearce 63dbf9d6f7 Bug 1470346 - Gesture activate all documents in tab, even across origins, upon user interaction. r=smaug
Sometimes when video is playing, a preroll ad plays, and that may be in a cross
origin iframe. If autoplay media is disabled, we require a user gesture in a
document before playback in that document is permitted, and we require each
origin to be gesture activated separately. So in the cross origin preroll video
add case, then the user will have to click once to unblock playback for the
cross origin ad, and then once the preroll ad finishes, the user will have to
click again to activate playback of the same origin content video.

This is a bad user experience.

So we should instead make gesture activation propagate up the doc tree
irrespective of crossing origins.  This way, when the user clicks to activate,
all documents in that tab are also also effectively gesture activated, and so
can autoplay.

MozReview-Commit-ID: 1HZQ5zkubR

--HG--
extra : rebase_source : d6b75732548cb1d73b9f82dce60a5e6e97d1da14
2018-06-22 11:52:20 +12:00
Christoph Kerschbaumer 2c105d2ff5 Bug 1459204: Have about:privatebrowsing rely on RemotePageManager instead of AboutCapabilities. r=mossop,baku 2018-06-07 11:32:27 +02:00
Boris Zbarsky 3b8785a733 Bug 1460735 part 2. Remove nsIDOMDocument. r=qdot 2018-05-29 13:39:06 -04:00
Johann Hofmann 6d11b10c57 Bug 1450315 - Remove document.allowUnsafeHTML. r=bz
This attribute was added in bug 1432966 when we started sanitizing
chrome usage of innerHTML to allow devtools to use custom attributes
in React via dangerouslySetInnerHTML.

Devtools removed its usage of dangerouslySetInnerHTML in bug 1434155, so
document.allowUnsafeHTML is no longer used and can be removed.

MozReview-Commit-ID: 8xTVZDmPqRa

--HG--
extra : rebase_source : 3d427133ccb8975163b4459af57b5d96ef54c93e
2018-03-31 10:27:19 +02:00
Boris Zbarsky fd6e65d19e Bug 1415588 part 4. Move the .anchors getter from HTMLDocument to Document. r=mystor
MozReview-Commit-ID: 2uqt9cdz6y7
2018-03-12 21:44:57 -04:00
Boris Zbarsky f6f85bb529 Bug 1415588 part 3. Move the .links getter from HTMLDocument to Document. r=mystor
The null-checks in MatchLinks were working around code in nsDocument::Destroy
that was removed a while back in bug 341730.

MozReview-Commit-ID: 2SMmGr83GCB
2018-03-12 21:44:56 -04:00
Boris Zbarsky d5f5a95c81 Bug 1415588 part 2. Move the .images, .embeds, .plugins, .forms, .scripts, .applets getters from HTMLDocument to Document. r=mystor
MozReview-Commit-ID: Db7iazZUz8g
2018-03-12 21:44:56 -04:00
Boris Zbarsky f3daf97dc7 Bug 1415588 part 1. Move the .head getter from HTMLDocument to Document. r=mystor
MozReview-Commit-ID: 5SW47hfE9dl
2018-03-12 21:44:56 -04: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
Xidorn Quan e0d8b82019 Bug 1364025 - Add Unscopable to Document.fullscreen. r=bz
MozReview-Commit-ID: CK8pbdKeBas

--HG--
extra : source : 71edb86b01538e162caffa993c6e1f41a07b6c83
2018-03-05 12:39:41 +11: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
Olli Pettay 1dfbc7a331 Bug 1430301 - Implement ShadowRoot.elementFromPoint/elementsFromPoint, r=emilio
--HG--
extra : rebase_source : 570f17a7a63ea602533910192c04b4e12f082aa8
2018-02-16 20:42:58 +02: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
Phil Ringnalda 524add6888 Backed out changeset 221bee012f86 (bug 1364025) for wpt failures in payment-request/interfaces.https.html
CLOSED TREE
2018-02-12 21:43:34 -08:00
Xidorn Quan 445bbb41a8 Bug 1364025 - Add Unscopable to Document.fullscreen. r=bz
MozReview-Commit-ID: CK8pbdKeBas

--HG--
extra : source : fa12f6b5876ec72de288b07c8e96f009bd7dbb44
extra : amend_source : 3c8025294eac7547d736568d33cf52959bd25d9a
2018-02-13 14:51:12 +11: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
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 a2a8a03a92 Bug 1276438 part 4. Move the .body getter from HTMLDocument to Document. r=mystor
The "body" part of responsexml-document-properties.htm is not really per current
spec text, and fails in every non-Firefox browser, and in Firefox after this
change.  https://github.com/w3c/web-platform-tests/issues/2668 tracks this issue
to some extent, but if all browsers are going to align here anyway, we should
just adjust the test and move on.

MozReview-Commit-ID: HTLfggvi5LL
2018-01-26 00:53:34 -05: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
Jessica Jong 69aab9d558 Bug 1430299 - Add DocumentOrShadowRoot interface. r=smaug 2018-01-18 14:52:15 +08: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
Nika Layzell 319310193a Bug 1383876 - Part 4: Remove even more tests which no longer work, r=freesamael, r=smaug
MozReview-Commit-ID: 5j8fNeKuHAM
2018-01-12 17:52:58 -05:00
Brian Birtles 8cc46ca7d7 Bug 1425548 - Update references to Web Animations spec in dom/webidl; r=bz
MozReview-Commit-ID: OnaTWOWhnk

--HG--
extra : rebase_source : d0d7cac72afe1c1e7a1728b566d37670767e5ff4
2017-12-15 14:55:55 -06: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
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
Edgar Chen 99bf241ea6 Bug 1414317 - Add [CEReactions] to document.createElement and document.createElementNS; r=smaug
Per https://github.com/w3c/webcomponents/issues/570.

MozReview-Commit-ID: 610lZlF6QXg

--HG--
extra : rebase_source : 351644d3207b5638208a819cf6616b16c3de1227
2017-11-04 00:32:05 +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
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
kevin 47b2c10f66 Bug 1333912. Implement onvisibilitychange attribute on Document. r=bzbarsky 2017-07-26 16:22:42 -04:00
Boris Zbarsky 1b5d0a8ea1 Bug 1370550. Move the onwheel attribute to GlobalEventHandlers, to follow the spec. r=smaug 2017-07-11 17:49:25 -04:00
johndai1984 d6f71ee02d Bug 1340027 - Part 2: Add HTML CEReactions annotation. r=smaug 2017-06-29 10:26:00 -04:00
johndai1984 2344353ad0 Bug 1340027 - Part 1: Add DOM CEReactions annotation. r=smaug 2017-06-29 10:25:00 -04:00
Aryeh Gregor af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00
Cameron McCormack fb18ceba5d Bug 1330843 - Allow JS to create NAC pseudo-elements. r=bholley
MozReview-Commit-ID: 2aBPoCOsT6R

--HG--
extra : rebase_source : bc32cd9e4bd5c73af094718c795691da84abe5ba
2017-03-17 15:30:34 +08:00
Kris Maglione 8d2a5ab915 Bug 1333990: Part 2d - Add a utility to block HTML parsing until sandbox scripts are ready. r=hsivonen,billm
In order to asynchronously load content scripts that need to run very early in
the page load cycle, before any ordinary page scripts, we need to be able to
block parsing from the document-element-inserted listener. Since the script
loader operates by returning promises, blocking on promise resolution is the
simplest way to achieve this.

MozReview-Commit-ID: CTWlyrP6dqG

--HG--
extra : rebase_source : 28ce713a6450c223f9b2089e6c6e8c78284ef8af
2017-03-16 16:47:35 -07:00
John Dai e80c2fec57 Bug 1338889 - Part 2: Support DOMString as Argument 3 of Document.createElementNS. r=bz 2017-02-15 00:07:00 +08:00
Kirk Steuber c1a68c2b4c Bug 1338287 - Make nsIDocument::DocumentFlashClassification accessible from privileged JS r=bz
MozReview-Commit-ID: 1II2puZMub5

--HG--
extra : rebase_source : 2b806b4f1d4e51b72799d79126c402113d5b072e
2017-02-13 13:39:40 -08:00
Xidorn Quan 6a9f5ff102 Bug 1289642 - Remove prefixed PointerLock API. r=smaug
MozReview-Commit-ID: BUSEojZNIgb

--HG--
extra : rebase_source : bfdf71d5244d3b0877712a63cb07cf119c2e6992
2016-12-19 12:40:02 +11:00
Boris Zbarsky bba6751af3 Bug 1330457. Introduce DocumentAndElementEventHandlers to more closely align with the HTML spec. r=bkelly 2017-01-13 10:41:20 -05:00
Boris Zbarsky c892e11e49 Bug 1318117. Stop using IsCallerChrome in pointerlock API, fullscreen API, and documentURI getter. r=ehsan 2016-11-17 13:49:27 -05:00
Frederik Braun 61b919525e Bug 1312272 - Marquee event handlers to adhere CSP. r=smaug
MozReview-Commit-ID: 6MxGnFAIhMP

--HG--
extra : histedit_source : 592bae3f50983d107169811411ab444d5efa3f22
2016-11-04 22:54:59 -04:00
Ehsan Akhgari 1978fee9f2 Bug 1310385 - Remove support for UndoManager; r=smaug
There hasn't been any traction on this feature, and we keep
paying the maintenance and code size and memory usage penalty
of having this implementation.

We can revive this from VCS history in the future if we decide
to start working on it again.  In the mean time, it's better
to remove it.
2016-10-17 10:06:11 -04:00