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

107 Коммитов

Автор SHA1 Сообщение Дата
Ehsan Akhgari da503ca590 Bug 144795 - Move HTMLDocument.cookie getter/setter to Document; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D27931

--HG--
extra : moz-landing-system : lando
2019-04-18 08:55:00 +00:00
Andrea Marchesini a438b12ebd Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24025

--HG--
extra : moz-landing-system : lando
2019-04-12 05:31:32 +00:00
Cosmin Sabou af07021e88 Backed out 10 changesets (bug 1536411) for causing leaks in CondVar, MessagePortService, MessagePortServiceData.
Backed out changeset eda5854cd7e8 (bug 1536411)
Backed out changeset f94dfbf2476c (bug 1536411)
Backed out changeset c68dc3152faa (bug 1536411)
Backed out changeset f67d157e8baf (bug 1536411)
Backed out changeset 1107a9767f38 (bug 1536411)
Backed out changeset ccbe1af00fb9 (bug 1536411)
Backed out changeset 552c4b588524 (bug 1536411)
Backed out changeset 2eb20578159b (bug 1536411)
Backed out changeset 45708d22bb6d (bug 1536411)
Backed out changeset 87601ef1d4d4 (bug 1536411)
2019-04-11 22:48:49 +03:00
Andrea Marchesini 5cfeeda19e Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24025

--HG--
extra : moz-landing-system : lando
2019-04-11 16:27:12 +00:00
Masayuki Nakano 8329e8382e Bug 1540962 - Make nsICommandManager builtinclass and make users use nsCommandManager directly r=bzbarsky
`nsICommandManager` isn't implemented by JS even in comm-central nor
BlueGriffon.  Therefore, we can make it a builtinclass.

Additionally, this patch makes all users in C++ use `nsCommandManager` which is
the only implementation of `nsICommandManager`.  This avoids QI from
`nsICommandManager` to `nsPICommandUpdater`.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:51:38 +00:00
Boris Zbarsky 93d6619a30 Bug 1539204 part 2. Mark subject principal args in bindings as known-live. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D24927

--HG--
extra : moz-landing-system : lando
2019-03-26 21:57:12 +00:00
Jan Henning 8dc7d1e54b Bug 1525662 - Part 4: Use "width=device-width" viewport for plain text documents. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D20954

--HG--
extra : rebase_source : 00753683860d33acf3296debd327365519cfe822
extra : amend_source : 486264ed201422586f8791b71d7b5a23705cb1f7
extra : source : 37816c34e7bdecaa553bb1d6f4fc76b5e1a10030
2019-02-24 17:32:08 +01:00
Jan Henning 7496ea6ed3 Bug 1525662 - Part 2: Remember plain-textness of HTML documents post loading. r=hsivonen
Based on the current implementation of nsContentUtils::IsPlainTextType(), we
could just call that function again if we need to know whether we're
dealing with plain text content or not later on, but doing it this way ensures
we're always consistent with the current code in StartDocumentLoad(), which
includes some additional sanity checks.

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

--HG--
extra : rebase_source : 5d4606c2c6bc11b2a7f91c221c17c8405fff44b8
extra : amend_source : 6856439650748cdb41e635044c17d6fbf387110b
extra : intermediate-source : 6a5a3077c438a5299fb0752fefb01a081e1f7d96
extra : source : cfb68d7c93bac96fdf979be90116c2de0df76d71
2019-02-23 17:06:52 +01:00
Boris Zbarsky ccfb4f16b1 Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23036

--HG--
extra : moz-landing-system : lando
2019-03-13 00:43:48 +00:00
Brindusan Cristian b1a6b274b6 Backed out 6 changesets (bug 1525662, bug 1501665) for geckoview failures at org.mozilla.geckoview.test.NavigationDelegateTest.loadData_noMimeType. CLOSED TREE
Backed out changeset 1fa7091b4b4e (bug 1525662)
Backed out changeset 32249c69fee9 (bug 1525662)
Backed out changeset aaa8fbdbbe48 (bug 1525662)
Backed out changeset f07e25fac5b2 (bug 1525662)
Backed out changeset a8ec11730706 (bug 1525662)
Backed out changeset 159753062cfa (bug 1501665)
2019-03-05 23:42:55 +02:00
Jan Henning 8b6b062f8e Bug 1525662 - Part 4: Use "width=device-width" viewport for plain text documents. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D20954

--HG--
extra : moz-landing-system : lando
2019-03-05 18:01:15 +00:00
Jan Henning bd6905ded7 Bug 1525662 - Part 2: Remember plain-textness of HTML documents post loading. r=hsivonen
Based on the current implementation of nsContentUtils::IsPlainTextType(), we
could just call that function again if we need to know whether we're
dealing with plain text content or not later on, but doing it this way ensures
we're always consistent with the current code in StartDocumentLoad(), which
includes some additional sanity checks.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 18:01:11 +00:00
Masayuki Nakano 47ef72825f Bug 1466208 - part 29: Create PresShell::EventHandler::ComputeFocusedEventTargetElement() r=smaug
Most remaining code in `PresShell::EventHandler::HandleEvent()` is what computes
event target of the event which should be handled on focused content.  This
patch moves the part to the new method.

Additionally, moves `nsIPresShell::gKeyDownTarget` to
`EventHandler::sLastKeyDownEventTargetElement` and make it use `StaticRefPtr`.

Finally, for using `Element*` instead of `nsIContent*`, changes the result type
of `Document::GetUnfocusedKeyEventTarget()` to `Element*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 06:11:41 +00:00
Boris Zbarsky 9c5da5f234 Bug 1489308 part 9. Remove now-unused wyciwyg bits. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17327

--HG--
rename : dom/html/test/browser_refresh_wyciwyg_url.js => dom/html/test/browser_refresh_after_document_write.js
rename : dom/html/test/file_refresh_wyciwyg_url.html => dom/html/test/file_refresh_after_document_write.html
extra : moz-landing-system : lando
2019-02-28 01:09:48 +00:00
Boris Zbarsky a76f119a04 Bug 1489308 part 8. Remove unneeded JSContext args on open/write/writeln. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17326

--HG--
extra : moz-landing-system : lando
2019-02-27 05:12:13 +00:00
Boris Zbarsky 2e5c884144 Bug 1489308 part 5. Align the work we do on document.open with the spec. r=mccr8,smaug
The main behavior changes are:

1) We no longer create a new Window when doing document.open().  We use the
same Window but remove all the event listeners on it and on the existing DOM
tree before removing the document's existing kids.

2) We no longer create a new session history entry.  The existing one always
gets replaced instead.

3) We now support document.open on documents that are not in a Window.

The reasons for the various test changes are as follows:

The change to browser_modifiedclick_inherit_principal.js is because we no
longer set the docshell to a wyciwyg URL when document.open() happens and the
test was depending on that to terminate.

browser_wyciwyg_urlbarCopying.js is being removed because it's trying to test
wyciwyg URIs, which no longer exist.

The changes in docshell/test/navigation are because document.open() no longer
affects session history.  One of the tests was testing the interactions there
and is being removed; another is being repurposed to just test that
document.open() does not affect history.length.

The change to test_x-frame-options.html is because document.open() now removes
event listeners on the window, which it didn't use to do (and in the specific
case in this test reused the existing inner too, so the listener was still
around in practice).  The new behavior matches other browsers.

The removal of test_bug172261.html is because document.open() no longer affects
session history, so you can't go back across it or forward to the "opened"
state, so the situation that test is trying to test no longer exists.

The changes to test_bug255820.html are because reloading a document after
document.open() will now just load the URL of the document that was the entry
document for the open() call, not reload the written content.  So there's not
much point testing reload behavior, and in this test it was just reloading the
toplevel test file inside the frames.

The change to test_bug346659.html is because now we no longer create a new
Window on document.open().

The change to test_bug1232829.html is because document.open() (implicit in this
test) no longer adds history entries, so the back() was just leaving the test
page instead of going back across the document.open().  The test is a
crashtest in practice, so might still be testing something useful about how
document.open() interacts with animations.

The change to test_bug715739.html is because the URL of the document after
document.open() is now the URL of the entry document, not a wyciwyg URL, so
reload() has different behavior than it used to.

The change to test_bug329869.html is because now when we go back we're
reloading the original document we had, not doing a wyciwyg load, and the
security info now doesn't include the untrusted script.

The changes to the wpt expectations are removing a bunch of expected failures
now that we pass those tests and disabling some tests that are fundamentally
racy and hence fail randomly.  The latter all have github issues filed for the
test problem.

The change to testing/web-platform/tests/common/object-association.js is fixing
tests that were not matching the spec (and were failing in other browsers).

The change to parser-uses-registry-of-owner-document.html is fixing tests that
were not matching the spec (and were failing in other browsers).

The change to document-write.tentative.html is because the test was buggy: it
was using the same iframe element for all its tests and racing loads from some
tests against API calls from other tests, etc.  It's a wonder it ever managed
to pass, independent of these patches (and in fact it doesn't pass according to
wpt.fyi data, even in Firefox).

The changes in html/browsers/history/the-history-interface are because
document.open() no longer adds history entries.  The test was failing in all
other browsers for the same reason.

The changes in html/browsers/history/the-location-interface are because
reloading a document.open()-created thing now loads the URL of the page that
was the entry document for the open() call.  The test was failing in all other
browsers.

The change to reload_document_open_write.html is because we now reload the url
of the document that entered the script that called open() when we reload, not
the written content.  Other browsers were failing this test too; Gecko with
the old document.open implementation was the only one that passed.

The change to http-refresh.py is to fix a test bug: it was not returning a
Content-Type header, so we were putting up helper app dialogs, etc.

The change to test_ext_contentscript.js is because we no create a new global
for document.open() calls.  Kris Maglione OKed this part.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 23:24:48 +00:00
Masayuki Nakano 1895d1bfe3 Bug 1514940 - part 1: Forcibly disable new keyCode/charCode value of keypress events if the document is Confluence r=smaug,Ehsan,kmag
Old Confluence does not aware of conflated model keypress event (see UI Events
spec, https://w3c.github.io/uievents/#determine-keypress-keyCode).
Additionally, Confluence can be hosted with any domains.  Therefore, we cannot
use blacklist to disable the conflated model keypress event only on it.

This patch checks whether current or parent document is Confluence with JS
module, called KeyPressEventModelCheckerChild.  For kicking this module,
nsHTMLDocument dispatches an custom event, CheckKeyPressEventModel, when it
becomes editable only first time.  Finally, if it's a Confluence instance, the
module let PresShell know that we need to use split model keypress event in it.

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

--HG--
extra : moz-landing-system : lando
2019-02-05 11:35:43 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Peter Van der Beken a17049feac Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:26:56 +00:00
Emilio Cobos Álvarez 63814207cb Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498

--HG--
extra : moz-landing-system : lando
2018-12-31 14:10:19 +00:00
Bogdan Tara 3eb2f351ae Backed out 6 changesets (bug 1353867) for nsDocShell.cpp failures CLOSED TREE
Backed out changeset aa9b106b15d9 (bug 1353867)
Backed out changeset 8c05f4d3f7ad (bug 1353867)
Backed out changeset 00869bed4121 (bug 1353867)
Backed out changeset 700aeb906fd2 (bug 1353867)
Backed out changeset 8b60851b93da (bug 1353867)
Backed out changeset ebdf4531b3bd (bug 1353867)
2018-12-31 17:47:12 +02:00
Peter Van der Beken 68a88553fa Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

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

--HG--
extra : moz-landing-system : lando
2018-12-31 10:50:36 +00:00
Emilio Cobos Álvarez 006a4ab94a Bug 1516366 - Move nsOnloadBlocker and nsDocumentOnStack to nsDocument.cpp, and shrink nsDocument.h to the minimmum. r=smaug
This needs to add a few of includes in other places which were relying on the
massive (now gone) list in nsDocument.h.

I also needed to move an AnimationTimeline destructor out of line because it
relied on dom::Animation being defined, yet Animation.h includes
AnimationTimeline.h, so include hell.

Differential Revision: https://phabricator.services.mozilla.com/D15366
2018-12-29 20:41:42 +01:00
Henri Sivonen 69ad08c987 Bug 1071816 - Support loading unlabeled/BOMless UTF-8 text/html and text/plain files from file: URLs. r=emk. 2018-12-11 10:36:46 +02:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Emilio Cobos Álvarez 1fbd784d00 Bug 1481601 - Remove now-useless aPreallocateChildren from nsINode::Clone() and friends. r=bzbarsky
Since sed on multiple lines ended up being such a pain and I didn't end up
writing a script for this because I didn't think it'd end up being so boring, I
may have made a couple cleanups here and there as well...

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

--HG--
extra : moz-landing-system : lando
2018-08-08 23:58:44 +00:00
Andrea Marchesini b57c0f116e Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 8 - tests, r=ehsan 2018-07-10 10:09:59 +02:00
Margareta Eliza Balazs c37b51f523 Backed out 9 changesets (bug 1469993) for causing bustage in build/srcdom/base/nsGlobalWindowInner.cpp on a CLOSED TREE
Backed out changeset e89192032fe2 (bug 1469993)
Backed out changeset 4b261595099d (bug 1469993)
Backed out changeset 37182cfe869c (bug 1469993)
Backed out changeset 5b9870995c73 (bug 1469993)
Backed out changeset 55499fcd9738 (bug 1469993)
Backed out changeset 8c1c838d54ba (bug 1469993)
Backed out changeset 12b9c8bfa41f (bug 1469993)
Backed out changeset 04ab7d6c169a (bug 1469993)
Backed out changeset 53885d61244e (bug 1469993)
2018-07-10 11:32:34 +03:00
Andrea Marchesini 47ab3f6055 Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 8 - tests, r=ehsan 2018-07-10 10:09:59 +02:00
Dorel Luca 0d2ff9e60d Merge mozilla-inbound to mozilla-central. a=merge 2018-05-16 00:54:22 +03:00
Emilio Cobos Álvarez 11794a944d Bug 1461701: Remove nsUpdateType and UPDATE_CONTENT_MODEL. r=smaug
MozReview-Commit-ID: 33iBMZqnkAc
2018-05-15 18:47:16 +02:00
Adrian Wielgosik c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
Peter Van der Beken ea57f65484 Bug 1452981 - Use ToJSValue instead of WrapObject if we know we have a nsWrapperCache. r=bz.
--HG--
extra : rebase_source : 17bf9dabcf0a9c841612e808ca08755f6841e8c9
2016-12-09 18:02:50 +01:00
Emilio Cobos Álvarez a1b2e5070a Bug 1455885: Inline and make document casts fatally assert. r=bz
For consistency with AsElement / AsContent / AsDocumentFragment, etc.

MozReview-Commit-ID: 8GSj8R9hLBe
2018-04-26 17:05:12 +02:00
Boris Zbarsky 9bdcd1eca8 Bug 1444872. Remove support for the 'type' parameter to document.open. r=qdot 2018-03-28 18:01:46 -04: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
Boris Zbarsky 9da3878bc9 Bug 1418076 part 11. Eliminate the nsIDOMHTMLDocument interface. r=mystor
MozReview-Commit-ID: 4lEcUeenbg3
2018-01-26 01:03:25 -05:00
Boris Zbarsky 94892c7519 Bug 1418076 part 8. Remove remaining, unused, nsIDOMHTMLDocument methods. r=mystor.
MozReview-Commit-ID: AshWkds4I8Z
2018-01-26 01:01:16 -05:00
Boris Zbarsky 7fdae0afd0 Bug 1418076 part 7. Get rid of nsIDOMHTMLDocument's color attributes. r=mystor
MozReview-Commit-ID: 4jgoGqWyymA
2018-01-26 01:01:08 -05:00
Boris Zbarsky 311e6cf3f4 Bug 1418076 part 5. Get rid of nsIDOMHTMLDocument's designMode attribute. r=mystor
MozReview-Commit-ID: 8CB3OZBHa9q
2018-01-26 01:00:49 -05:00
Boris Zbarsky 48ae6aca91 Bug 1418076 part 4. Get rid of nsIDOMHTMLDocument's open/close/write/writeln methods. r=mystor
MozReview-Commit-ID: 4HbZljdQR2I
2018-01-26 01:00:41 -05:00
Boris Zbarsky 3c11d297e3 Bug 1418076 part 1. Get rid of nsIDOMHTMLDocument's domain attribute. r=mystor
MozReview-Commit-ID: Igf83iosX8L
2018-01-26 01:00:04 -05:00
Boris Zbarsky 2e85a4c2dc Bug 1276438 part 7. Get rid of nsIDOMHTMLDocument::GetBody. r=mystor
MozReview-Commit-ID: 5XyZc8hQndQ
2018-01-26 00:53:35 -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
Boris Zbarsky b6b8acada6 Bug 1432186 part 18. Remove no-longer-needed nsIDOMNode-forwarding defines. r=mccr8
MozReview-Commit-ID: FbP5fVQ3c6m
2018-01-29 23:10:52 -05:00
Emilio Cobos Álvarez 9db998a70b Bug 1426494: s/StyleScope/DocumentOrShadowRoot. r=smaug
MozReview-Commit-ID: DsFPlQMGAyv
2017-12-22 01:56:36 +01:00