Merge autoland to mozilla-central. a=merge

This commit is contained in:
Noemi Erli 2019-05-29 12:47:04 +03:00
commit 395fa026e1
243 changed files with 3032 additions and 1417 deletions

View File

@ -63,8 +63,15 @@ browser/extensions/pdfjs/content/web**
# generated or library files in pocket
browser/components/pocket/content/panels/js/tmpl.js
browser/components/pocket/content/panels/js/vendor/**
# Activity Stream has incompatible eslintrc. `npm run lint` from its directory
browser/components/newtab/**
# Ignore newtab files
# Kept in sync with browser/components/newtab/.eslintignore
browser/components/newtab/bin/prerender.js
browser/components/newtab/data/
browser/components/newtab/logs/
browser/components/newtab/prerendered/
browser/components/newtab/vendor/
# The only file in browser/locales/ is pre-processed.
browser/locales/**
# imported from chromium

View File

@ -328,3 +328,6 @@ b4662b6db1b34414494d070e33481193625403d1 - Ehsan Akhgari - Bug 1508472 - Part 4:
8bf181f9b1c3daa66390ab03b6bc9f27c049f770 - Daniel Holbert - Bug 1513387: Add braces & newlines to re-wrap some return statements that clang-format unwrapped, in layout/svg. r=heycam
2f227a365a670735df7bdee68488ea54c5d9f0ae - Jan-Ivar Bruaroey - Bug 1512280 - Make LOG macros clang-format friendlier. r=padenot
1cd2c6c217949d0b1d06f15046eba45ff4517044 - Emilio Cobos Álvarez - Bug 1515707 - Use NS_INTERFACE_MAP_END_INHERITING in some CSSStyleDeclaration implementations. r=Ehsan
020c8c871c0d3b3920fe95935cfef06501976c0f - Sylvestre Ledru - Bug 1552795 - Remove all trailing whitespaces in idl files r=ehsan
10d5143647cfda21649cf254adcb21d116524c5d - Sylvestre Ledru - Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
6a629adbb62a299d7208373d1c6f375149d2afdb - Sylvestre Ledru - Bug 1378712 - Remove all trailing whitespaces r=Ehsan

View File

@ -8,7 +8,9 @@
#include "Accessible-inl.h"
#include "nsAccUtils.h"
#include "DocAccessible-inl.h"
#include "mozilla/a11y/DocAccessibleChild.h"
#include "mozilla/a11y/DocAccessibleParent.h"
#include "mozilla/dom/BrowserBridgeChild.h"
#include "mozilla/dom/BrowserParent.h"
#include "Role.h"
#include "States.h"
@ -35,6 +37,20 @@ OuterDocAccessible::OuterDocAccessible(nsIContent* aContent,
}
#endif
if (IPCAccessibilityActive()) {
auto bridge = dom::BrowserBridgeChild::GetFrom(aContent);
if (bridge) {
// This is an iframe which will be rendered in another process. Tell the
// parent process the iframe accessible so it can link the
// trees together when the iframe document is added.
DocAccessibleChild* ipcDoc = aDoc->IPCDoc();
if (ipcDoc) {
uint64_t id = reinterpret_cast<uintptr_t>(UniqueID());
bridge->SendSetEmbedderAccessible(ipcDoc, id);
}
}
}
// Request document accessible for the content document to make sure it's
// created. It will appended to outerdoc accessible children asynchronously.
dom::Document* outerDoc = mContent->GetUncomposedDoc();

View File

@ -6,6 +6,7 @@
#include "DocAccessibleParent.h"
#include "mozilla/a11y/Platform.h"
#include "mozilla/dom/BrowserBridgeParent.h"
#include "mozilla/dom/BrowserParent.h"
#include "xpcAccessibleDocument.h"
#include "xpcAccEvents.h"
@ -676,12 +677,17 @@ void DocAccessibleParent::MaybeInitWindowEmulation() {
isActive = browserParent->GetDocShellIsActive();
}
nsWinUtils::NativeWindowCreateProc onCreate([this](HWND aHwnd) -> void {
// onCreate is guaranteed to be called synchronously by
// nsWinUtils::CreateNativeWindow, so this reference isn't really necessary.
// However, static analysis complains without it.
RefPtr<DocAccessibleParent> thisRef = this;
nsWinUtils::NativeWindowCreateProc onCreate([thisRef](HWND aHwnd) -> void {
IDispatchHolder hWndAccHolder;
::SetPropW(aHwnd, kPropNameDocAccParent, reinterpret_cast<HANDLE>(this));
::SetPropW(aHwnd, kPropNameDocAccParent,
reinterpret_cast<HANDLE>(thisRef.get()));
SetEmulatedWindowHandle(aHwnd);
thisRef->SetEmulatedWindowHandle(aHwnd);
RefPtr<IAccessible> hwndAcc;
if (SUCCEEDED(::AccessibleObjectFromWindow(
@ -692,8 +698,9 @@ void DocAccessibleParent::MaybeInitWindowEmulation() {
mscom::ToProxyUniquePtr(std::move(wrapped))));
}
Unused << SendEmulatedWindow(
reinterpret_cast<uintptr_t>(mEmulatedWindowHandle), hWndAccHolder);
Unused << thisRef->SendEmulatedWindow(
reinterpret_cast<uintptr_t>(thisRef->mEmulatedWindowHandle),
hWndAccHolder);
});
HWND parentWnd = reinterpret_cast<HWND>(rootDocument->GetNativeWindow());
@ -830,5 +837,23 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
}
#endif // !defined(XP_WIN)
Tuple<DocAccessibleParent*, uint64_t> DocAccessibleParent::GetRemoteEmbedder() {
dom::BrowserParent* embeddedBrowser = dom::BrowserParent::GetFrom(Manager());
dom::BrowserBridgeParent* bridge = embeddedBrowser->GetBrowserBridgeParent();
if (!bridge) {
return Tuple<DocAccessibleParent*, uint64_t>(nullptr, 0);
}
DocAccessibleParent* doc;
uint64_t id;
Tie(doc, id) = bridge->GetEmbedderAccessible();
if (doc && doc->IsShutdown()) {
// Sometimes, the embedder document is destroyed before its
// BrowserBridgeParent. Don't return a destroyed document.
doc = nullptr;
id = 0;
}
return Tuple<DocAccessibleParent*, uint64_t>(doc, id);
}
} // namespace a11y
} // namespace mozilla

View File

@ -10,6 +10,7 @@
#include "nsAccessibilityService.h"
#include "mozilla/a11y/PDocAccessibleParent.h"
#include "mozilla/a11y/ProxyAccessible.h"
#include "mozilla/Tuple.h"
#include "nsClassHashtable.h"
#include "nsHashKeys.h"
#include "nsISupportsImpl.h"
@ -26,6 +27,8 @@ class xpcAccessibleGeneric;
class DocAccessibleParent : public ProxyAccessible,
public PDocAccessibleParent {
public:
NS_INLINE_DECL_REFCOUNTING(DocAccessibleParent);
DocAccessibleParent()
: ProxyAccessible(this),
mParentDoc(kNoParentDoc),
@ -34,20 +37,12 @@ class DocAccessibleParent : public ProxyAccessible,
#endif // defined(XP_WIN)
mTopLevel(false),
mShutdown(false) {
MOZ_COUNT_CTOR_INHERITED(DocAccessibleParent, ProxyAccessible);
sMaxDocID++;
mActorID = sMaxDocID;
MOZ_ASSERT(!LiveDocs().Get(mActorID));
LiveDocs().Put(mActorID, this);
}
~DocAccessibleParent() {
LiveDocs().Remove(mActorID);
MOZ_COUNT_DTOR_INHERITED(DocAccessibleParent, ProxyAccessible);
MOZ_ASSERT(mChildDocs.Length() == 0);
MOZ_ASSERT(!ParentDoc());
}
void SetTopLevel() { mTopLevel = true; }
bool IsTopLevel() const { return mTopLevel; }
@ -220,7 +215,20 @@ class DocAccessibleParent : public ProxyAccessible,
const uint64_t& aBatchType, nsTArray<BatchData>&& aData) override;
#endif
/**
* If this is an iframe document rendered in a different process to its
* embedder, return the DocAccessibleParent and id for the embedder
* accessible. Otherwise, return null and 0.
*/
Tuple<DocAccessibleParent*, uint64_t> GetRemoteEmbedder();
private:
~DocAccessibleParent() {
LiveDocs().Remove(mActorID);
MOZ_ASSERT(mChildDocs.Length() == 0);
MOZ_ASSERT(!ParentDoc());
}
class ProxyEntry : public PLDHashEntryHdr {
public:
explicit ProxyEntry(const void*) : mProxy(nullptr) {}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1558536765550" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1558955090783" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
@ -3029,6 +3029,62 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="bf7a8bf0-e60e-4516-9e93-777c19509ef6" id="{65dc18e1-109f-4039-929b-f8a7a29be090}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="ec32be61-2646-4686-9829-7cff21f5d1f8" id="addonfx@horoscope-france.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="60311c2e-044e-4e24-9abe-6ee75d7f5467" id="{b19d065e-4460-4714-9208-3f2b38907522}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="7f8e7584-6c6c-4579-882a-6f6ed21766dd" id="/^((\{5768d1b3-4e2d-4088-bd65-c7a62353ea3a\})|(\{65b99c4e-a9bb-4bb9-913d-503fa9bcdc46\})|(\{31ebd11b-bb60-403b-94a9-e09a3bf7d64f\})|(\{571339cd-9f45-47be-9476-767a62cb6c97\})|(\{ed4f9665-1851-4398-ab15-46c5e3ab8fac\})|(\{972319b8-8dd8-4ed0-8de2-9bc6582f0560\})|(\{4a0d8618-3e21-4bb8-8ae3-d04316b55a1e\})|(devlopper61@avast\.com)|(\{8df3e056-6d4f-42fa-b0ad-40ee9a79d9c4\})|(\{e7e68020-07de-4f9f-9aec-6df29e9f64b8\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="37c5c7d6-e0ce-4c6b-8c89-49d94b6fe159" id="{cc02a70f-0610-456c-bc5e-5eefb6716904}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="1282ea00-9aa1-47c6-9a93-4fc17aa4fcc4" id="{7d3c46ed-b9f7-497e-bccc-e6d878032d14}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="4b943d8a-828f-45d2-b8e7-f16e6c3f860c" id="{e256d52b-d9ae-4709-aa9f-ba4d1eb1b284}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="3b36e078-7c88-411c-9366-033ac185c66d" id="/^((spp@avast\.com)|(\{056790bb-9676-40fb-845a-feae6dedfbee\})|(\{15d51e39-3ccf-4ce2-a434-dbbf1785e867\})|(\{2bbdf86f-3c6b-48d6-9934-9051ce5f5976\})|(\{2f6d1519-33b5-4970-a7ec-561f5e067ba0\})|(\{2fd10339-a9db-4846-bdd7-ee41cea97312\})|(\{31390faf-ef95-4f4b-a1a4-3c3a09dd7b5a\})|(\{411bfbf9-646d-401c-b87d-e77d812a68ce\})|(\{44e4b2cf-77ba-4f76-aca7-f3fcbc2dda2f\})|(\{5422d0cd-3b45-4fcd-9886-463be7e1a05f\})|(\{5ae5a1f8-a994-4e61-8c99-54a9fe58a9c4\})|(\{5d4c1f36-196d-4e9a-909b-8ad138546f79\})|(\{7150cd87-1b5f-41ea-b659-5cae4b753e2d\})|(\{78a02646-2bf6-417e-9498-32f29a4ef89a\})|(\{7bdac7a1-be1d-4ecd-8cf1-a1db64adfaaf\})|(\{80686e70-c06a-4ab3-b7bf-fd4c05985c1b\})|(\{83830f14-c5d0-4546-af99-cbaba3ab832d\})|(\{869a5e06-732e-4635-8da3-90a2802f9c80\})|(\{87ea875a-396a-4c7b-b202-cecd5a4fe0d4\})|(\{94847025-c5a9-4dd7-83df-54c17b79eeb8\})|(\{992e4d3d-f56b-4f71-b826-0dd976681228\})|(\{a259d36e-9c24-4216-8b28-d3e83c07a832\})|(\{a669b31a-3a2b-4c75-838c-a8542f77c79f\})|(\{af35bf73-7d25-4286-9be6-fa822818ac82\})|(\{b01f0319-b398-4a6e-b9c9-e59e2d99eee7\})|(\{c516baf9-a911-453e-be0e-26389cfb33ac\})|(\{c88fc74d-31b5-40d4-bb8a-008f2d7a1ea0\})|(\{ca6b87f3-2d8b-49ea-9627-95e900c5f108\})|(\{cdc01730-6108-4581-b5da-36f7fa8e3d2e\})|(\{cfbbd54d-26dd-4f20-b0c9-26b2d920bc04\})|(\{d384c2ef-9e42-4dfa-bba5-73b9b6ad2e61\})|(\{d7ef08b6-ef77-43b6-ad60-74ea67495674\})|(\{dec788dd-9a21-416d-91c7-bf79250cab04\})|(\{fb182266-3336-4dcb-8898-859affe73e7f\})|(\{fe17e98b-1ed8-45fe-a6e5-8280902d2500\})|(\{febfdee8-5724-4aea-8b70-6be9e22248fc\})|(\{ff471567-6ff5-48d9-8db6-d2c9134f0aed\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="a0508904-1f0b-4352-a5e6-a33f8fa26ce8" id="{4ee078c0-ded1-4f82-9bb1-de645e778924}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="768bde60-2086-487f-b374-ca3fa6e712fd" id="/^((\{0e9ab3be-c296-4825-aecd-3923ded051f6\})|(\{9f737295-e8d2-4e70-b226-8809f6b135c9\})|(\{68e1d557-8fc1-40e0-b197-43f8f3d36239\})|(\{90221614-a0b9-4301-b141-3f8a23fb4835\})|(\{d3255cb0-bf30-43b0-afd3-db97bfeeede4\})|(\{b4498268-c0d0-435c-944e-8dd6e8518654\})|(\{93d90a45-a10e-47df-a106-2ffeefe3052a\})|(\{d7b04034-ea8b-4219-ad1c-ffa061a2e0cb\})|(\{391772ba-a23c-4892-b30d-45d2a935be3c\})|(\{0b2aaa98-1f4b-483a-815f-3f864711a737\})|(\{2564ed8f-305b-4ade-a787-6fae696c14ab\})|(\{fc2fe0a7-9886-4a7e-9850-cccc2879b0e7\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="b9496c5f-b37d-4b8e-abaf-509b980ab553" id="{9834ff7f-e3ea-485a-b861-801a2e33f822}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="8258f92c-5b89-42a7-a984-dd4e94fa301a" id="/^((akjbfncbadcmnkopckegnmjgihagponf@chromeStoreFoxified)|(akjbfncbadcmnkopckegnmjgihagponf@chromeStoreFoxified-2563213750)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-3767541208)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-2330732719)|(cidchfadpgepemappcgeafeicnjomaad@chrome-store-foxified-509978031)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-558690357)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-3523362862)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-850818380)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-3686225023)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-3659951669)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-1114585181)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-2593088680)|(edmdnjinnadgoalbaojbhkbognfappih@chrome-store-foxified-206569335)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-3272316989)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-96331909)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-2158751912)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-1554953450)|(kadbillinepbjlgenaliokdhejdmmlgp@chrome-store-foxified-323465212)|(kadbillinepbjlgenaliokdhejdmmlgp@chrome-store-foxified-3112875041)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-1868258955)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-611481225)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-162688242)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-1394660953)|(\{de07e1ed-1597-45f9-957d-4edc44399451\})|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified-294092903)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified--2032791676)|(akjbfncbadcmnkopckegnmjgihagponf@chrome-store-foxified--786206880)|(\{76f8d31f-d1b6-4171-885e-6fcde28ca547\})|(\{b7492f2d-72b6-4816-83d5-9c82b3cc5581\})|(\{3f0fa616-3f92-42e2-ac1e-69ae7b1c7872\})|(\{2e324574-0761-4017-bc96-66270563e277\})|(\{950d03c6-722e-498d-90fc-ec9d9c1ab893\})|(\{6cb64844-2dca-4f29-82d1-cb59459ad824\})|(\{5347a8c7-a156-4455-8301-7d19d269bd2c\})|(\{17c69a23-df19-4655-aaa9-e8a35f186ddf\})|(\{381eb5ad-0f02-4146-85f4-2cc7c7a7dee4\})|(\{e797aab6-f3df-4d0d-89c2-320371720194\})|(\{91a95e76-4b27-427f-9554-7c1aa58c8489\})|(\{5bd5f5a3-3f30-4c90-bf5c-7ff32eae9fac\})|(\{e9cbcded-05e0-4cf0-9163-8507de356646\})|(\{4262365c-085f-4f2b-9bd7-048d7d1c90de\})|(\{d6d89cdf-36e4-44b5-8ea2-2283e25e99b9\})|(\{3ab34cbc-4a18-4fac-b629-3b10091d505e\})|(\{28beb080-37b1-42ec-a6e9-89cff276cc3e\})|(\{d83baff8-42f1-485c-bc61-0df0a2fa2834\})|(\{f1260949-ea01-4f69-b302-87ac898bc677\})|(\{f2bb825a-19b7-46ba-b759-557885e28ff9\})|(\{d1023b1e-87f6-49d4-b93d-80d94cafb101\})|(\{605bf342-f990-43b3-9053-b6ad563cc944\})|(\{20da0f4c-c6ee-4c4a-be76-8cb0fdd759b7\})|(\{29563a03-2ea3-4187-b3dc-af3027287df8\})|(\{9fc76cae-b6b4-45af-aa0e-81d1bf419812\})|(\{b83f6a6c-6bb3-492f-aad2-56a6b79a02d4\})|(\{4e340962-9d78-486c-8ec8-fdc8ba0448c3\})|(\{4f420c0e-824f-408b-8327-418934c566e9\})|(\{51057732-1a37-491c-afeb-dccbb18e2341\})|(\{ac9415c8-b978-4636-a0f6-99b75f1bfacc\})|(\{ba9d81ff-13da-4183-8b32-19cc18a198c3\})|(\{614f9cd7-d46e-47a5-bcd6-fc9cefc846ac\})|(\{83ab005b-85f8-4185-b500-26c78f29e470\})|(\{814b9b95-0470-42f5-9be1-b322ae1a300c\})|(\{c565d582-ef45-4ee5-a13d-e0bc544bb483\})|(\{bbc0a83c-ff01-4f55-beed-c8dd6256d99b\})|(\{00d71c76-8b41-4e12-877b-62ad742c5b5b\})|(\{22c15bb7-3cac-4480-ad95-8ef2b4762689\})|(\{4ce4a857-3ba4-46d3-83e1-424e608f8a1d\})|(\{638ad118-0407-437c-a657-f8bde7b0c511\})|(\{c35dba3d-eed7-4ee2-b7ed-b2f636810ea1\})|(\{7635e554-de52-4a55-81f4-5d4e7ac9e416\})|(\{b768c014-21ff-49c9-9a27-186e33574612\})|(\{e31ae098-b80a-4286-8688-8514ace2d0fd\})|(\{104607b9-ad49-4760-882a-5cc13164531a\})|(\{bf78148e-f4d1-48b7-92b2-93ca2003d619\})|(\{877777da-7695-4d7e-a469-2a4b4cfbe0c4\})|(\{b09f3de0-26c4-4790-ba8e-50a1d1725053\})|(\{a24b471c-9100-455c-825a-689533d24979\})|(\{12a8c732-c19a-468e-8be4-a16f9a27c845\})|(\{bad6c6a4-6108-4e44-b7e3-c05bed9d4e50\})|(\{1b598a16-ca58-41bf-8cc2-3741356363b9\})|(\{a5520fcc-b75a-4527-931b-e403aa8772ef\})|(\{cec7aeec-9352-4ed1-8362-8e384704ab29\})|(\{1bf3e066-3707-41eb-b62d-55da5bbe930d\})|(\{1fd8204a-f25b-47d0-bfac-35c41451e2e7\})|(\{ab1f1e53-9102-4f4f-a793-0a81f5669e13\})|(\{5620c992-8683-4ce1-b19d-3633b4c28bd0\})|(\{cbc29a75-5858-4b7b-98e4-c813a4e6a085\})|(\{4cf619a8-2de2-41cb-bf23-dfa52e4e7d5a\})|(\{3b013e48-d683-45ed-8715-a6ece06f0753\})|(\{9834ff7f-e3ea-485a-b861-801a2e33f822\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="3a3b8837-605f-48dd-8b40-a66777f45108" id="{19ed30e8-28ad-405a-a7e4-18a8c78b1078}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="e454fe70-d5d7-40c0-a571-e9253d1361d5" id="/^((\{b3c1723b-6e69-4a3d-b3f6-90793bbd6500\})|(\{ba38e6b7-7480-4e58-9f5b-162e83c6ece8\})|(\{ff08056a-a34e-44b1-bcae-805d3770738f\})|(\{29806031-d49c-4ef3-a37a-32ee29e5fc0b\})|(\{541e33f8-ec74-4311-b7a3-8baa185aeb7e\})|(\{d8196867-5419-450c-aee4-1e349b4b0b5f\})|(\{ebd7a4e7-056e-4009-bb5e-753c1d1eed93\})|(\{01935a63-d565-478a-9f91-9ff9aa49ce61\})|(\{d0e7ce73-9829-4a10-b5f2-83f8bf2c730b\})|(\{b70f302a-84ad-4f10-8af3-f6ea4aa327fb\})|(\{e5f1a2e5-798b-4915-b109-5ebbe2b57821\})|(\{7921669d-959a-4992-857d-f47761b5b4ac\})|(\{80808d17-bf74-4b91-8fa5-694c3107950d\})|(\{84984575-1b73-4b96-ba1c-d9959393e742\})|(\{20587256-b018-41c2-91fc-5a278a2837f2\})|(\{577f8c9b-c791-4999-9c39-1e4584f4e9d6\})|(\{3691584f-c3a3-4fde-8817-b2501802ef54\})|(\{e1680c37-e6ff-4280-8f97-943d77e63022\})|(\{013ae092-188d-4e95-9138-2b4d98dda7cd\})|(\{05e3806c-00e6-40c7-8503-9c30f3db8e63\})|(\{9552ab33-c43e-4338-a020-80dc3636f577\})|(\{8fd3c74f-57d7-4e1b-9e52-6c4517ef89f0\})|(\{9b0ad6aa-7c54-4655-aca5-78e973b0ebd4\})|(\{e648ecf7-4858-40f8-9d85-5cc5f68eae6c\})|(\{9430fbaf-aa5d-4492-92c2-0f1354c5c860\})|(\{d58bd1fd-6451-42d5-b066-4baf7d4271f9\})|(\{948790d7-57d3-4db1-8fc7-7ccee4abf047\})|(\{1b8d5392-1641-43c1-a6d6-d1429e9d4109\})|(\{3ae072ea-3ffc-4395-8f3c-ebe92f355c3d\})|(\{32f9b8a8-505a-4621-979b-b6919633f787\})|(\{e939e079-1e15-4491-95b3-6fb8a836e80b\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p332">

View File

@ -5,6 +5,9 @@ const {AddonTestUtils} = ChromeUtils.import("resource://testing-common/AddonTest
AddonTestUtils.initMochitest(this);
hookExtensionsTelemetry();
AddonTestUtils.hookAMTelemetryEvents();
async function createWebExtension(details) {
let options = {
manifest: {
@ -31,11 +34,58 @@ function promiseEvent(eventEmitter, event) {
});
}
add_task(async function() {
async function getAddonElement(managerWindow, addonId) {
if (managerWindow.useHtmlViews) {
// about:addons is using the new HTML page.
const {contentDocument: doc} = managerWindow.document.getElementById("html-view-browser");
const card = await BrowserTestUtils.waitForCondition(() =>
doc.querySelector(`addon-card[addon-id="${addonId}"]`),
`Found entry for sideload extension addon "${addonId}" in HTML about:addons`);
return card;
}
// about:addons is using the XUL-based views.
let list = managerWindow.document.getElementById("addon-list");
// Make sure XBL bindings are applied
list.clientHeight;
const item = Array.from(list.children).find(_item => _item.value == addonId);
ok(item, "Found entry for sideloaded extension in about:addons");
return item;
}
function assertDisabledSideloadedAddonElement(managerWindow, addonElement) {
if (managerWindow.useHtmlViews) {
// about:addons is using the new HTML page.
const doc = addonElement.ownerDocument;
const enableBtn = addonElement.querySelector('[action="toggle-disabled"]');
is(doc.l10n.getAttributes(enableBtn).id, "enable-addon-button",
"The button has the enable label");
} else {
addonElement.scrollIntoView({behavior: "instant"});
ok(BrowserTestUtils.is_visible(addonElement._enableBtn),
"Enable button is visible for sideloaded extension");
ok(BrowserTestUtils.is_hidden(addonElement._disableBtn),
"Disable button is not visible for sideloaded extension");
}
}
function clickEnableExtension(managerWindow, addonElement) {
if (managerWindow.useHtmlViews) {
addonElement.querySelector('[action="toggle-disabled"]').click();
} else {
BrowserTestUtils.synthesizeMouseAtCenter(addonElement._enableBtn, {},
gBrowser.selectedBrowser);
}
}
async function test_sideloading({useHtmlViews}) {
const DEFAULT_ICON_URL = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
await SpecialPowers.pushPrefEnv({
set: [
["extensions.htmlaboutaddons.enabled", useHtmlViews],
["xpinstall.signatures.required", false],
["extensions.autoDisableScopes", 15],
["extensions.ui.ignoreUnsigned", true],
@ -84,8 +134,6 @@ add_task(async function() {
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
});
hookExtensionsTelemetry();
AddonTestUtils.hookAMTelemetryEvents();
let changePromise = new Promise(resolve => {
ExtensionsUI.on("change", function listener() {
@ -122,7 +170,9 @@ add_task(async function() {
const VIEW = "addons://list/extension";
let win = gBrowser.selectedBrowser.contentWindow;
ok(!win.gViewController.isLoading, "about:addons view is fully loaded");
await BrowserTestUtils.waitForCondition(() => !win.gViewController.isLoading,
"about:addons view is fully loaded");
is(win.gViewController.currentViewId, VIEW, "about:addons is at extensions list");
// Check the contents of the notification, then choose "Cancel"
@ -152,27 +202,20 @@ add_task(async function() {
win = await BrowserOpenAddonsMgr(VIEW);
let list = win.document.getElementById("addon-list");
if (win.gViewController.isLoading) {
await new Promise(resolve => win.document.addEventListener("ViewChanged", resolve, {once: true}));
}
// Make sure XBL bindings are applied
list.clientHeight;
// XUL or HTML about:addons addon entry element.
const addonElement = await getAddonElement(win, ID2);
let item = Array.from(list.children).find(_item => _item.value == ID2);
ok(item, "Found entry for sideloaded extension in about:addons");
item.scrollIntoView({behavior: "instant"});
ok(BrowserTestUtils.is_visible(item._enableBtn), "Enable button is visible for sideloaded extension");
ok(BrowserTestUtils.is_hidden(item._disableBtn), "Disable button is not visible for sideloaded extension");
assertDisabledSideloadedAddonElement(win, addonElement);
info("Test enabling sideloaded addon 2 from about:addons enable button");
// When clicking enable we should see the permissions notification
popupPromise = promisePopupNotificationShown("addon-webext-permissions");
BrowserTestUtils.synthesizeMouseAtCenter(item._enableBtn, {},
gBrowser.selectedBrowser);
clickEnableExtension(win, addonElement);
panel = await popupPromise;
checkNotification(panel, DEFAULT_ICON_URL, [["webextPerms.hostDescription.allUrls"]]);
@ -302,4 +345,12 @@ add_task(async function() {
is(collectedEventsAddon2.length, expectedEventsAddon2.length,
"Got the expected number of telemetry events for addon2");
}
add_task(async function test_xul_aboutaddons_sideloading() {
await test_sideloading({useHtmlViews: false});
});
add_task(async function test_html_aboutaddons_sideloading() {
await test_sideloading({useHtmlViews: true});
});

View File

@ -4,7 +4,7 @@
let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
Ci.nsILoginInfo, "init");
const LOGIN_URL = "https://example.com/";
let TEST_LOGIN1 = new nsLoginInfo(LOGIN_URL, LOGIN_URL, null, "user1", "pass1", "username", "password");
let TEST_LOGIN1 = new nsLoginInfo(LOGIN_URL, LOGIN_URL, null, "user1", "pass1");
add_task(async function setup() {
let storageChangedPromised = TestUtils.topicObserved("passwordmgr-storage-changed",

View File

@ -4,7 +4,7 @@
let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
Ci.nsILoginInfo, "init");
const LOGIN_URL = "https://www.example.com";
let TEST_LOGIN1 = new nsLoginInfo(LOGIN_URL, LOGIN_URL, null, "user1", "pass1", "username", "password");
let TEST_LOGIN1 = new nsLoginInfo(LOGIN_URL, LOGIN_URL, null, "user1", "pass1");
add_task(async function setup() {
let storageChangedPromised = TestUtils.topicObserved("passwordmgr-storage-changed",

View File

@ -322,7 +322,7 @@
},
"ExtensionSettings": {
"type": "object",
"type": ["JSON", "object"],
"properties": {
"*": {
"type": "object",

View File

@ -153,3 +153,14 @@ add_task(async function test_addon_normalinstalled() {
notEqual(addon.permissions & AddonManager.PERM_CAN_DISABLE, 0, "Addon should be able to be disabled.");
await addon.uninstall();
});
add_task(async function test_extensionsettings_string() {
await setupPolicyEngineWithJson({
"policies": {
"ExtensionSettings": '{"*": {"installation_mode": "blocked"}}',
},
});
let extensionSettings = Services.policies.getExtensionSettings("*");
equal(extensionSettings.installation_mode, "blocked");
});

View File

@ -1,11 +1,5 @@
activity-streams-env/
dist/
firefox/
logs/
stats.json
prerendered/
bin/prerender.js
data/
logs/
prerendered/
vendor/
data/
bin/prerender.js
bin/prerender.js.map
aboutlibrary/content/

View File

@ -13,11 +13,12 @@ module.exports = {
},
"plugins": [
"import", // require("eslint-plugin-import")
"json", // require("eslint-plugin-json")
"promise", // require("eslint-plugin-promise")
"react", // require("eslint-plugin-react")
"react-hooks", // require("react-hooks")
"fetch-options", // require("eslint-plugin-fetch-options")
"jsx-a11y" // require("eslint-plugin-jsx-a11y")
// Temporarily disabled since they aren't vendored into in mozilla central yet
// "react-hooks", // require("react-hooks")
// "fetch-options", // require("eslint-plugin-fetch-options")
],
"settings": {
"react": {
@ -25,7 +26,9 @@ module.exports = {
}
},
"extends": [
"eslint:recommended",
"plugin:jsx-a11y/recommended", // require("eslint-plugin-jsx-a11y")
"plugin:mozilla/recommended", // require("eslint-plugin-mozilla")
"plugin:mozilla/browser-test",
"plugin:mozilla/mochitest-test",
@ -36,26 +39,36 @@ module.exports = {
"RPMSendAsyncMessage": true,
"NewTabPagePreloading": true,
},
"overrides": [{
// Use a configuration that's more appropriate for JSMs
"files": "**/*.jsm",
"parserOptions": {
"sourceType": "script"
"overrides": [
{
// These files use fluent-dom to insert content
"files": [
"content-src/asrouter/templates/OnboardingMessage/**",
"content-src/asrouter/templates/Trailhead/**",
],
"rules": {
"jsx-a11y/anchor-has-content": 0,
"jsx-a11y/heading-has-content": 0,
}
},
"env": {
"node": false
},
"rules": {
"no-implicit-globals": 0
{
// Use a configuration that's more appropriate for JSMs
"files": "**/*.jsm",
"parserOptions": {
"sourceType": "script"
},
"env": {
"node": false
},
"rules": {
"no-implicit-globals": 0
}
}
}],
],
"rules": {
"react-hooks/rules-of-hooks": 2,
// "react-hooks/rules-of-hooks": 2,
"fetch-options/no-fetch-credentials": 2,
"promise/catch-or-return": 2,
"promise/param-names": 2,
// "fetch-options/no-fetch-credentials": 2,
"react/jsx-boolean-value": [2, "always"],
"react/jsx-closing-bracket-location": [2, "after-props"],

View File

@ -1,17 +0,0 @@
module.exports = {
"plugins": [
"jsx-a11y" // require("eslint-plugin-jsx-a11y")
],
"extends": "plugin:jsx-a11y/recommended",
"overrides": [{
// These files use fluent-dom to insert content
"files": [
"content-src/asrouter/templates/OnboardingMessage/**",
"content-src/asrouter/templates/Trailhead/**",
],
"rules": {
"jsx-a11y/anchor-has-content": 0,
"jsx-a11y/heading-has-content": 0,
}
}],
};

View File

@ -33,14 +33,11 @@
"eslint": "5.16.0",
"eslint-plugin-fetch-options": "0.0.4",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-json": "1.4.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-mozilla": "1.2.1",
"eslint-plugin-no-unsanitized": "3.0.2",
"eslint-plugin-promise": "4.1.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-react-hooks": "1.6.0",
"eslint-watch": "5.1.2",
"istanbul-instrumenter-loader": "3.0.1",
"joi-browser": "13.4.0",
"karma": "4.1.0",
@ -131,8 +128,7 @@
"tddmc": "karma start karma.mc.config.js --tdd",
"debugcoverage": "open logs/coverage/index.html",
"lint": "npm-run-all lint:*",
"lint:eslint": "esw --ext=.js,.jsm,.json,.jsx .",
"lint:jsx-a11y": "esw --config=.eslintrc.jsx-a11y.js --ext=.jsx content-src/",
"lint:eslint": "eslint --ext=.js,.jsm,.jsx .",
"lint:sasslint": "sass-lint -v -q",
"strings-import": "node ./bin/strings-import.js",
"test": "npm run testmc",

View File

@ -63,8 +63,7 @@ scripts:
# lint: Run eslint and sass-lint
lint:
eslint: esw --ext=.js,.jsm,.json,.jsx .
jsx-a11y: esw --config=.eslintrc.jsx-a11y.js --ext=.jsx content-src/
eslint: eslint --ext=.js,.jsm,.jsx .
sasslint: sass-lint -v -q
# strings-import: Replace local strings with those from l10n-central

View File

@ -1374,8 +1374,8 @@ var gMainPane = {
async reportUpdatePrefWriteError(error) {
let [title, message] = await document.l10n.formatValues([
{id: "update-pref-write-failure-title"},
{id: "update-pref-write-failure-message", args: {path: error.path}},
{id: "update-setting-write-failure-title"},
{id: "update-setting-write-failure-message", args: {path: error.path}},
]);
// Set up the Ok Button

View File

@ -3,3 +3,4 @@
# extra dependencies on specific toolchains, e.g. gtk3.
ac_add_options --disable-compile-environment
ac_add_options --disable-nodejs
export MOZILLA_OFFICIAL=1

View File

@ -1922,47 +1922,56 @@ Function ShouldPromptForProfileCleanup
SetShellVarContext current
StrCpy $R0 ""
${If} ${FileExists} "$APPDATA\Mozilla\Firefox\profiles.ini"
; See if there's an installation-specific profile for our INSTDIR.
; First look for an install-specific profile, which might be listed as
; either a relative or an absolute path (installs.ini doesn't say which).
${If} ${FileExists} "$APPDATA\Mozilla\Firefox\installs.ini"
ClearErrors
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Install$AppUserModelID" "Default"
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\installs.ini" "$AppUserModelID" "Default"
${IfNot} ${Errors}
; We found an installation-specific profile, let's use that one.
; These don't set IsRelative but they're always relative paths.
StrCpy $R0 "$APPDATA\Mozilla\Firefox\$1"
${Else}
; We don't have an install-specific profile, so look for an old-style
; default profile instead by checking each numbered Profile section.
StrCpy $0 0
${Do}
ClearErrors
; Check if the section exists by reading a value that must be present.
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "Path"
${If} ${Errors}
; We've run out of profile sections.
${Break}
${GetLongPath} "$APPDATA\Mozilla\Firefox\$1" $2
${If} ${FileExists} $2
StrCpy $R0 $2
${Else}
${GetLongPath} "$1" $2
${If} ${FileExists} $2
StrCpy $R0 $2
${EndIf}
ClearErrors
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "Default"
${IfNot} ${Errors}
${AndIf} $1 == "1"
; We've found the default profile
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "Path"
ReadINIStr $2 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "IsRelative"
${If} $2 == "1"
StrCpy $R0 "$APPDATA\Mozilla\Firefox\$1"
${Else}
StrCpy $R0 "$1"
${EndIf}
${Break}
${EndIf}
IntOp $0 $0 + 1
${Loop}
${EndIf}
${EndIf}
${EndIf}
${If} $R0 == ""
; We don't have an install-specific profile, so look for an old-style
; default profile instead by checking each numbered Profile section.
StrCpy $0 0
${Do}
ClearErrors
; Check if the section exists by reading a value that must be present.
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "Path"
${If} ${Errors}
; We've run out of profile sections.
${Break}
${EndIf}
ClearErrors
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "Default"
${IfNot} ${Errors}
${AndIf} $1 == "1"
; We've found the default profile
ReadINIStr $1 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "Path"
ReadINIStr $2 "$APPDATA\Mozilla\Firefox\profiles.ini" "Profile$0" "IsRelative"
${If} $2 == "1"
StrCpy $R0 "$APPDATA\Mozilla\Firefox\$1"
${Else}
StrCpy $R0 "$1"
${EndIf}
${Break}
${EndIf}
IntOp $0 $0 + 1
${Loop}
${EndIf}
GetFullPathName $R0 $R0
${If} $R0 == ""

View File

@ -360,11 +360,16 @@ update-enable-search-update =
.label = Automatically update search engines
.accesskey = e
update-pref-write-failure-title = Write Failure
update-setting-write-failure-title = Error saving Update preferences
# Variables:
# $path (String) - Path to the configuration file
update-pref-write-failure-message = Unable to save preference. Could not write to file: { $path }
# The newlines between the main text and the line containing the path is
# intentional so the path is easier to identify.
update-setting-write-failure-message =
{ -brand-short-name } encountered an error and didnt save this change. Note that setting this update preference requires permission to write to the file below. You or a system administrator may be able resolve the error by granting the Users group full control to this file.
Could not write to file: { $path }
update-in-progress-title = Update In Progress

View File

@ -261,14 +261,14 @@ ifdef RUST_TESTS
rust_test_options := $(foreach test,$(RUST_TESTS),-p $(test))
ifdef RUST_TEST_FEATURES
rust_features_flag := --features '$(RUST_TEST_FEATURES)'
rust_test_features_flag := --features '$(RUST_TEST_FEATURES)'
endif
# Don't stop at the first failure. We want to list all failures together.
rust_test_flag := --no-fail-fast
force-cargo-test-run:
$(call RUN_CARGO,test $(cargo_target_flag) $(rust_test_flag) $(rust_test_options) $(rust_features_flag))
$(call RUN_CARGO,test $(cargo_target_flag) $(rust_test_flag) $(rust_test_options) $(rust_test_features_flag))
endif

View File

@ -17,7 +17,7 @@ module.exports = {
"package.json",
"<rootDir>/packages",
],
modulePathIgnorePatterns: ["test/mochitest", "firefox"],
modulePathIgnorePatterns: ["test/mochitest", "firefox/"],
collectCoverageFrom: [
"src/**/*.js",
"!src/**/fixtures/*.js",

View File

@ -18,6 +18,7 @@ import {
getSelectedFrame,
getSymbols,
getCurrentThread,
getPreviewCount,
} from "../selectors";
import { getMappedExpression } from "./expressions";
@ -83,6 +84,8 @@ export function setPreview(
target: HTMLElement
) {
return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
dispatch({ type: "START_PREVIEW" });
const previewCount = getPreviewCount(getState());
if (getPreview(getState())) {
dispatch(clearPreview(cx));
}
@ -139,6 +142,11 @@ export function setPreview(
return;
}
// Don't finish dispatching if another setPreview was started
if (previewCount != getPreviewCount(getState())) {
return;
}
dispatch({
type: "SET_PREVIEW",
cx,

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`preview should generate previews 1`] = `null`;

View File

@ -0,0 +1,194 @@
/* eslint max-nested-callbacks: ["error", 6] */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
// @flow
import {
createStore,
selectors,
actions,
makeSource,
makeFrame,
waitForState,
waitATick,
} from "../../utils/test-head";
import defer from "../../utils/defer.js";
function waitForPreview(store, expression) {
return waitForState(store, state => {
const preview = selectors.getPreview(state);
return preview && preview.expression == expression;
});
}
function mockThreadClient(overrides) {
return {
evaluateInFrame: async () => ({ result: {} }),
getFrameScopes: async () => {},
sourceContents: async () => ({
source: "",
contentType: "text/javascript",
}),
getBreakpointPositions: async () => ({}),
getBreakableLines: async () => [],
evaluateExpressions: async () => [],
loadObjectProperties: async () => ({}),
...overrides,
};
}
function dispatchSetPreview(dispatch, context, expression, target) {
return dispatch(
actions.setPreview(
context,
expression,
{
start: { url: "foo.js", line: 1, column: 2 },
end: { url: "foo.js", line: 1, column: 5 },
},
{ line: 2, column: 3 },
target.getBoundingClientRect(),
target
)
);
}
async function pause({ dispatch, cx }) {
const base = await dispatch(
actions.newGeneratedSource(makeSource("base.js"))
);
await dispatch(actions.selectSource(cx, base.id));
const frames = [makeFrame({ id: "frame1", sourceId: base.id })];
await dispatch(
actions.paused({
thread: "FakeThread",
frame: frames[0],
frames,
loadedObjects: [],
why: { type: "debuggerStatement" },
})
);
}
describe("preview", () => {
it("should generate previews", async () => {
const store = createStore(mockThreadClient());
const { dispatch, getState, cx } = store;
const base = await dispatch(
actions.newGeneratedSource(makeSource("base.js"))
);
await dispatch(actions.selectSource(cx, base.id));
const frames = [makeFrame({ id: "f1", sourceId: base.id })];
await dispatch(
actions.paused({
thread: "FakeThread",
frame: frames[0],
frames,
loadedObjects: [],
why: { type: "debuggerStatement" },
})
);
const newCx = selectors.getContext(getState());
const firstTarget = document.createElement("div");
dispatchSetPreview(dispatch, newCx, "foo", firstTarget);
expect(selectors.getPreview(getState())).toMatchSnapshot();
});
// When a 2nd setPreview is called before a 1st setPreview dispatches
// and the 2nd setPreview has not dispatched yet,
// the first setPreview should not finish dispatching
it("queued previews (w/ the 1st finishing first)", async () => {
const firstSetPreview = defer();
const secondSetPreview = defer();
const promises = [firstSetPreview, secondSetPreview];
const store = createStore(
mockThreadClient({
loadObjectProperties: () => promises.shift().promise,
})
);
const { dispatch, getState } = store;
await pause(store);
const newCx = selectors.getContext(getState());
const firstTarget = document.createElement("div");
const secondTarget = document.createElement("div");
// Start the dispatch of the first setPreview. At this point, it will not
// finish execution until we resolve the firstSetPreview
dispatchSetPreview(dispatch, newCx, "firstSetPreview", firstTarget);
// Start the dispatch of the second setPreview. At this point, it will not
// finish execution until we resolve the secondSetPreview
dispatchSetPreview(dispatch, newCx, "secondSetPreview", secondTarget);
let fail = false;
firstSetPreview.resolve();
waitForPreview(store, "firstSetPreview").then(() => {
fail = true;
});
secondSetPreview.resolve();
await waitForPreview(store, "secondSetPreview");
expect(fail).toEqual(false);
const preview = selectors.getPreview(getState());
expect(preview && preview.expression).toEqual("secondSetPreview");
});
// When a 2nd setPreview is called before a 1st setPreview dispatches
// and the 2nd setPreview has dispatched,
// the first setPreview should not finish dispatching
it("queued previews (w/ the 2nd finishing first)", async () => {
const firstSetPreview = defer();
const secondSetPreview = defer();
const promises = [firstSetPreview, secondSetPreview];
const store = createStore(
mockThreadClient({
loadObjectProperties: () => promises.shift().promise,
})
);
const { dispatch, getState } = store;
await pause(store);
const newCx = selectors.getContext(getState());
const firstTarget = document.createElement("div");
const secondTarget = document.createElement("div");
// Start the dispatch of the first setPreview. At this point, it will not
// finish execution until we resolve the firstSetPreview
dispatchSetPreview(dispatch, newCx, "firstSetPreview", firstTarget);
// Start the dispatch of the second setPreview. At this point, it will not
// finish execution until we resolve the secondSetPreview
dispatchSetPreview(dispatch, newCx, "secondSetPreview", secondTarget);
let fail = false;
secondSetPreview.resolve();
await waitForPreview(store, "secondSetPreview");
firstSetPreview.resolve();
waitForPreview(store, "firstSetPreview").then(() => {
fail = true;
});
await waitATick(() => expect(fail).toEqual(false));
const preview = selectors.getPreview(getState());
expect(preview && preview.expression).toEqual("secondSetPreview");
});
});

View File

@ -16,4 +16,7 @@ export type PreviewAction =
| {|
+type: "CLEAR_PREVIEW",
+cx: Context,
|}
| {|
+type: "START_PREVIEW",
|};

View File

@ -422,7 +422,12 @@ async function fetchWorkers(): Promise<Worker[]> {
for (const actor of workerNames) {
if (!workerClients[actor]) {
const client = newWorkerClients[actor].thread;
getSources(client);
// This runs in the background and populates some data, but we also
// want to allow it to fail quietly. For instance, it is pretty easy
// for source clients to throw during the fetch if their thread
// shuts down, and this would otherwise cause test failures.
getSources(client).catch(e => console.error(e));
}
}

View File

@ -67,19 +67,13 @@ const copySourceItem = (
selectedSource: Source,
selectionText: string,
editorActions: EditorItemActions
) => {
if (selectedSource.isWasm) {
return;
}
return {
id: "node-menu-copy-source",
label: L10N.getStr("copySource.label"),
accesskey: L10N.getStr("copySource.accesskey"),
disabled: selectionText.length === 0,
click: () => copyToTheClipboard(selectionText),
};
};
) => ({
id: "node-menu-copy-source",
label: L10N.getStr("copySource.label"),
accesskey: L10N.getStr("copySource.accesskey"),
disabled: selectionText.length === 0,
click: () => copyToTheClipboard(selectionText),
});
const copySourceUri2Item = (
selectedSource: Source,
@ -208,8 +202,12 @@ export function editorMenuItems({
...(content && isFulfilled(content)
? [copyToClipboardItem(content.value, editorActions)]
: []),
copySourceItem(selectedSource, selectionText, editorActions),
copySourceUri2Item(selectedSource, editorActions),
...(!selectedSource.isWasm
? [
copySourceItem(selectedSource, selectionText, editorActions),
copySourceUri2Item(selectedSource, editorActions),
]
: []),
...(content && isFulfilled(content)
? [downloadFileItem(selectedSource, content.value, editorActions)]
: []),

View File

@ -12,7 +12,7 @@
text-align: center;
background-color: var(--theme-toolbar-background);
overflow: hidden;
font-weight: lighter;
font-weight: 300;
z-index: 10;
user-select: none;
}

View File

@ -22,11 +22,13 @@ export type Preview = {|
export type PreviewState = {
+preview: ?Preview,
previewCount: number,
};
export function initialPreviewState(): PreviewState {
return {
preview: null,
previewCount: 0,
};
}
@ -39,6 +41,10 @@ function update(
return { ...state, preview: null };
}
case "START_PREVIEW": {
return { ...state, previewCount: state.previewCount + 1 };
}
case "SET_PREVIEW": {
return { ...state, preview: action.value };
}
@ -55,4 +61,8 @@ export function getPreview(state: OuterState) {
return state.preview.preview;
}
export function getPreviewCount(state: OuterState) {
return state.preview.previewCount;
}
export default update;

View File

@ -257,6 +257,15 @@ function getTelemetryEvents(eventName: string) {
return window.dbg._telemetry.events[eventName] || [];
}
function waitATick(callback: Function): Promise<*> {
return new Promise(resolve => {
setTimeout(() => {
callback();
resolve();
});
});
}
export {
actions,
selectors,
@ -275,4 +284,5 @@ export {
waitForState,
watchForState,
getHistory,
waitATick,
};

View File

@ -44,6 +44,7 @@ class ElementStyle {
this.ruleView = ruleView;
this.store = store || {};
this.pageStyle = pageStyle;
this.pseudoElements = [];
this.showUserAgentStyles = showUserAgentStyles;
this.rules = [];
this.cssProperties = this.ruleView.cssProperties;
@ -82,6 +83,7 @@ class ElementStyle {
}
this.destroyed = true;
this.pseudoElements = [];
for (const rule of this.rules) {
if (rule.editor) {
@ -135,6 +137,11 @@ class ElementStyle {
this._maybeAddRule(entry, existingRules);
}
// Store a list of all pseudo-element types found in the matching rules.
this.pseudoElements = this.rules
.filter(r => r.pseudoElement)
.map(r => r.pseudoElement);
// Mark overridden computed styles.
this.onRuleUpdated();
@ -259,20 +266,27 @@ class ElementStyle {
this.variables.clear();
this.updateDeclarations();
for (const pseudo of this.cssProperties.pseudoElements) {
// Update declarations for matching rules for pseudo-elements.
for (const pseudo of this.pseudoElements) {
this.updateDeclarations(pseudo);
}
}
/**
* Mark the declarations for a given pseudo element with an overridden flag if
* an earlier property overrides it and update the editor to show it in the
* UI. If there is any inactive CSS we also update the editors state to show
* the inactive CSS icon.
* Go over all CSS rules matching the selected element and mark the CSS declarations
* (aka TextProperty instances) with an `overridden` Boolean flag if an earlier or
* higher priority declaration overrides it. Rules are already ordered by specificity.
*
* If a pseudo-element type is passed (ex: ::before, ::first-line, etc),
* restrict the operation only to declarations in rules matching that pseudo-element.
*
* At the end, update the declaration's view (TextPropertyEditor instance) so it relects
* the latest state. Use this opportunity to also trigger checks for the "inactive"
* state of the declaration (whether it has effect or not).
*
* @param {String} pseudo
* Which pseudo element to flag as overridden.
* Empty string or undefined will default to no pseudo element.
* Optional pseudo-element for which to restrict marking CSS declarations as
* overridden.
*/
/* eslint-disable complexity */
updateDeclarations(pseudo = "") {
@ -282,10 +296,37 @@ class ElementStyle {
// as time, and animation overlay are required to be check in order to
// determine if the property is overridden.
const textProps = [];
for (const rule of this.rules) {
if ((rule.matchedSelectors.length > 0 ||
rule.domRule.type === ELEMENT_STYLE) &&
rule.pseudoElement === pseudo && !rule.keyframes) {
// Skip @keyframes rules
if (rule.keyframes) {
continue;
}
// Style rules must be considered only when they have selectors that match the node.
// When renaming a selector, the unmatched rule lingers in the Rule view, but it no
// longer matches the node. This strict check avoids accidentally causing
// declarations to be overridden in the remaining matching rules.
const isStyleRule = rule.pseudoElement === "" && rule.matchedSelectors.length > 0;
// Style rules for pseudo-elements must always be considered, regardless if their
// selector matches the node. As a convenience, declarations in rules for
// pseudo-elements show up in a separate Pseudo-elements accordion when selecting
// the host node (instead of the pseudo-element node directly, which is sometimes
// impossible, for example with ::selection or ::first-line).
// Loosening the strict check on matched selectors ensures these declarations
// participate in the algorithm below to mark them as overridden.
const isPseudoElementRule = rule.pseudoElement !== "" &&
rule.pseudoElement === pseudo;
const isElementStyle = rule.domRule.type === ELEMENT_STYLE;
const filterCondition = pseudo === ""
? (isStyleRule || isElementStyle)
: isPseudoElementRule;
// First, gather all relevant CSS declarations (aka TextProperty instances).
if (filterCondition) {
for (const textProp of rule.textProps.slice(0).reverse()) {
if (textProp.enabled) {
textProps.push(textProp);

View File

@ -221,6 +221,7 @@ skip-if = os == 'linux' # focusEditableField times out consistently on linux.
[browser_rules_mark_overridden_05.js]
[browser_rules_mark_overridden_06.js]
[browser_rules_mark_overridden_07.js]
[browser_rules_mark_overridden_08.js]
[browser_rules_mathml-element.js]
[browser_rules_media-queries_reload.js]
[browser_rules_media-queries.js]

View File

@ -0,0 +1,43 @@
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Tests that the rule view marks overridden rules correctly in pseudo-elements when
// selecting their host node.
const TEST_URI = `
<style type='text/css'>
#testid::before {
content: 'Pseudo-element';
color: red;
color: green;
}
#testid {
color: blue;
}
</style>
<div id='testid'>Styled Node</div>
`;
add_task(async function() {
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const {inspector, view} = await openRuleView();
await selectNode("#testid", inspector);
info("Check the CSS declarations for ::before in the Pseudo-elements accordion.");
const pseudoRule = getRuleViewRuleEditor(view, 1, 0).rule;
const pseudoProp1 = pseudoRule.textProps[1];
const pseudoProp2 = pseudoRule.textProps[2];
ok(pseudoProp1.overridden,
"First declaration of color in pseudo-element should be overridden.");
ok(!pseudoProp2.overridden,
"Second declaration of color in pseudo-element should not be overridden.");
info("Check that pseudo-element declarations do not override the host's declarations");
const idRule = getRuleViewRuleEditor(view, 4).rule;
const idProp = idRule.textProps[0];
ok(!idProp.overridden,
"The single declaration of color in ID selector should not be overridden");
});

View File

@ -210,7 +210,6 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
"min-block-size",
"-moz-min-font-size-ratio",
"min-inline-size",
"offset-rotate",
"padding-block-end",
"padding-block-start",
"padding-inline-end",
@ -269,6 +268,7 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
"mask-size",
"object-position",
"offset-path",
"offset-rotate",
"order",
"perspective-origin",
"shape-outside",

View File

@ -492,7 +492,7 @@ nsresult CharacterData::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void CharacterData::UnbindFromTree(bool aDeep, bool aNullParent) {
void CharacterData::UnbindFromTree(bool aNullParent) {
// Unset frame flags; if we need them again later, they'll get set again.
UnsetFlags(NS_CREATE_FRAME_IF_NON_WHITESPACE | NS_REFRAME_IF_WHITESPACE);

View File

@ -110,7 +110,7 @@ class CharacterData : public nsIContent {
nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
void UnbindFromTree(bool aDeep = true, bool aNullParent = true) override;
void UnbindFromTree(bool aNullParent = true) override;
already_AddRefed<nsINodeList> GetChildren(uint32_t aFilter) final {
return nullptr;

View File

@ -7075,7 +7075,7 @@ void Document::WriteCommon(const Sequence<nsString>& aText,
// without having to do all this copying and then ask it to start
// parsing....
nsString text;
for (uint32_t i = 0; i < aText.Length(); ++i) {
for (size_t i = 0; i < aText.Length(); ++i) {
text.Append(aText[i]);
}
WriteCommon(text, aNewlineTerminate, rv);

View File

@ -65,7 +65,7 @@ class DocumentFragment : public FragmentOrElement {
return NS_ERROR_NOT_IMPLEMENTED;
}
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override {
virtual void UnbindFromTree(bool aNullParent) override {
NS_ASSERTION(false, "Trying to unbind a fragment from a tree");
}

View File

@ -1839,11 +1839,7 @@ static bool ShouldRemoveFromIdTableOnUnbind(const Element& aElement,
return aNullParent || !aElement.GetParent()->IsInShadowTree();
}
void Element::UnbindFromTree(bool aDeep, bool aNullParent) {
MOZ_ASSERT(aDeep || (!GetUncomposedDoc() && !GetBindingParent()),
"Shallow unbind won't clear document and binding parent on "
"kids!");
void Element::UnbindFromTree(bool aNullParent) {
// Make sure to only remove from the ID table if our subtree root is actually
// changing.
if (ShouldRemoveFromIdTableOnUnbind(*this, aNullParent)) {
@ -1999,14 +1995,12 @@ void Element::UnbindFromTree(bool aDeep, bool aNullParent) {
ResetDir(this);
}
if (aDeep) {
for (nsIContent* child = GetFirstChild(); child;
child = child->GetNextSibling()) {
// Note that we pass false for aNullParent here, since we don't want
// the kids to forget us. We _do_ want them to forget their binding
// parent, though, since this only walks non-anonymous kids.
child->UnbindFromTree(true, false);
}
for (nsIContent* child = GetFirstChild(); child;
child = child->GetNextSibling()) {
// Note that we pass false for aNullParent here, since we don't want
// the kids to forget us. We _do_ want them to forget their binding
// parent, though, since this only walks non-anonymous kids.
child->UnbindFromTree(false);
}
nsNodeUtils::ParentChainChanged(this);

View File

@ -656,7 +656,7 @@ class Element : public FragmentOrElement {
nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
void UnbindFromTree(bool aDeep = true, bool aNullParent = true) override;
void UnbindFromTree(bool aNullParent = true) override;
/**
* Normalizes an attribute name and returns it as a nodeinfo if an attribute

View File

@ -148,7 +148,7 @@ void ShadowRoot::Unbind() {
for (nsIContent* child = GetFirstChild(); child;
child = child->GetNextSibling()) {
child->UnbindFromTree(true, false);
child->UnbindFromTree(false);
}
}

View File

@ -125,7 +125,7 @@ class nsIContent : public nsINode {
* recursively calling UnbindFromTree when a subtree is detached.
* @note This method is safe to call on nodes that are not bound to a tree.
*/
virtual void UnbindFromTree(bool aDeep = true, bool aNullParent = true) = 0;
virtual void UnbindFromTree(bool aNullParent = true) = 0;
enum {
/**

View File

@ -1619,7 +1619,7 @@ void nsImageLoadingContent::BindToTree(Document* aDocument, nsIContent* aParent,
}
}
void nsImageLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent) {
void nsImageLoadingContent::UnbindFromTree(bool aNullParent) {
// We may be leaving the document, so if our image is tracked, untrack it.
nsCOMPtr<Document> doc = GetOurCurrentDoc();
if (!doc) return;

View File

@ -218,7 +218,7 @@ class nsImageLoadingContent : public nsIImageLoadingContent {
// Subclasses are *required* to call BindToTree/UnbindFromTree.
void BindToTree(mozilla::dom::Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent);
void UnbindFromTree(bool aDeep, bool aNullParent);
void UnbindFromTree(bool aNullParent);
nsresult OnLoadComplete(imgIRequest* aRequest, nsresult aStatus);
void OnUnlockedDraw();

View File

@ -575,8 +575,8 @@ nsresult nsObjectLoadingContent::BindToTree(Document* aDocument,
return NS_OK;
}
void nsObjectLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent) {
nsImageLoadingContent::UnbindFromTree(aDeep, aNullParent);
void nsObjectLoadingContent::UnbindFromTree(bool aNullParent) {
nsImageLoadingContent::UnbindFromTree(aNullParent);
nsCOMPtr<Element> thisElement =
do_QueryInterface(static_cast<nsIObjectLoadingContent*>(this));

View File

@ -318,7 +318,7 @@ class nsObjectLoadingContent : public nsImageLoadingContent,
nsresult BindToTree(mozilla::dom::Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent);
void UnbindFromTree(bool aDeep = true, bool aNullParent = true);
void UnbindFromTree(bool aNullParent = true);
/**
* Return the content policy type used for loading the element.

View File

@ -44,8 +44,7 @@ class nsAttributeTextNode final : public nsTextNode,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
@ -124,10 +123,10 @@ nsresult nsTextNode::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void nsTextNode::UnbindFromTree(bool aDeep, bool aNullParent) {
void nsTextNode::UnbindFromTree(bool aNullParent) {
ResetDirectionSetByTextNode(this);
CharacterData::UnbindFromTree(aDeep, aNullParent);
CharacterData::UnbindFromTree(aNullParent);
}
#ifdef DEBUG
@ -216,7 +215,7 @@ nsresult nsAttributeTextNode::BindToTree(Document* aDocument,
return NS_OK;
}
void nsAttributeTextNode::UnbindFromTree(bool aDeep, bool aNullParent) {
void nsAttributeTextNode::UnbindFromTree(bool aNullParent) {
// UnbindFromTree can be called anytime so we have to be safe.
if (mGrandparent) {
// aNullParent might not be true here, but we want to remove the
@ -225,7 +224,7 @@ void nsAttributeTextNode::UnbindFromTree(bool aDeep, bool aNullParent) {
mGrandparent->RemoveMutationObserver(this);
mGrandparent = nullptr;
}
nsTextNode::UnbindFromTree(aDeep, aNullParent);
nsTextNode::UnbindFromTree(aNullParent);
}
void nsAttributeTextNode::AttributeChanged(Element* aElement,

View File

@ -48,8 +48,7 @@ class nsTextNode : public mozilla::dom::Text {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
nsresult AppendTextForNormalize(const char16_t* aBuffer, uint32_t aLength,
bool aNotify, nsIContent* aNextSibling);

View File

@ -111,7 +111,7 @@ nsresult HTMLAnchorElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLAnchorElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLAnchorElement::UnbindFromTree(bool aNullParent) {
// Cancel any DNS prefetches
// Note: Must come before ResetLinkState. If called after, it will recreate
// mCachedURI based on data that is invalid - due to a call to GetHostname.
@ -122,7 +122,7 @@ void HTMLAnchorElement::UnbindFromTree(bool aDeep, bool aNullParent) {
// in the mStyledLinks hashtable
Link::ResetLinkState(false, Link::ElementHasHref());
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
static bool IsNodeInEditableRegion(nsINode* aNode) {

View File

@ -45,8 +45,7 @@ class HTMLAnchorElement final : public nsGenericHTMLElement, public Link {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual bool IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
int32_t* aTabIndex) override;

View File

@ -80,12 +80,12 @@ nsresult HTMLAreaElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLAreaElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLAreaElement::UnbindFromTree(bool aNullParent) {
// Without removing the link state we risk a dangling pointer
// in the mStyledLinks hashtable
Link::ResetLinkState(false, Link::ElementHasHref());
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
nsresult HTMLAreaElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,

View File

@ -45,8 +45,7 @@ class HTMLAreaElement final : public nsGenericHTMLElement, public Link {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;

View File

@ -299,8 +299,8 @@ nsresult HTMLButtonElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLButtonElement::UnbindFromTree(bool aDeep, bool aNullParent) {
nsGenericHTMLFormElementWithState::UnbindFromTree(aDeep, aNullParent);
void HTMLButtonElement::UnbindFromTree(bool aNullParent) {
nsGenericHTMLFormElementWithState::UnbindFromTree(aNullParent);
// Update our state; we may no longer be the default submit element
UpdateState(false);

View File

@ -62,8 +62,7 @@ class HTMLButtonElement final : public nsGenericHTMLFormElementWithState,
// nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual void DoneCreatingElement() override;
void UpdateBarredFromConstraintValidation();

View File

@ -96,7 +96,7 @@ nsresult HTMLEmbedElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLEmbedElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLEmbedElement::UnbindFromTree(bool aNullParent) {
#ifdef XP_MACOSX
// When a page is reloaded (when an Document's content is removed), the
// focused element isn't necessarily sent an eBlur event. See
@ -105,8 +105,8 @@ void HTMLEmbedElement::UnbindFromTree(bool aDeep, bool aNullParent) {
// disable text input in the browser window. See bug 1137229.
HTMLObjectElement::OnFocusBlurPlugin(this, false);
#endif
nsObjectLoadingContent::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsObjectLoadingContent::UnbindFromTree(aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
nsresult HTMLEmbedElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,

View File

@ -38,8 +38,7 @@ class HTMLEmbedElement final : public nsGenericHTMLElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual bool IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
int32_t* aTabIndex) override;

View File

@ -356,7 +356,7 @@ static void CollectOrphans(nsINode* aRemovalRoot,
}
}
void HTMLFormElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLFormElement::UnbindFromTree(bool aNullParent) {
// Note, this is explicitly using uncomposed doc, since we count
// only forms in document.
nsCOMPtr<nsIHTMLDocument> oldDocument = do_QueryInterface(GetUncomposedDoc());
@ -366,7 +366,7 @@ void HTMLFormElement::UnbindFromTree(bool aDeep, bool aNullParent) {
MarkOrphans(mControls->mNotInElements);
MarkOrphans(mImageElements);
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
nsINode* ancestor = this;
nsINode* cur;

View File

@ -96,8 +96,7 @@ class HTMLFormElement final : public nsGenericHTMLElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
const nsAttrValueOrString* aValue,
bool aNotify) override;

View File

@ -547,7 +547,7 @@ nsresult HTMLImageElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLImageElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLImageElement::UnbindFromTree(bool aNullParent) {
if (mForm) {
if (aNullParent || !FindAncestorForm(mForm)) {
ClearForm(true);
@ -561,8 +561,8 @@ void HTMLImageElement::UnbindFromTree(bool aDeep, bool aNullParent) {
mInDocResponsiveContent = false;
}
nsImageLoadingContent::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsImageLoadingContent::UnbindFromTree(aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
void HTMLImageElement::UpdateFormOwner() {

View File

@ -75,7 +75,7 @@ class HTMLImageElement final : public nsGenericHTMLElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
virtual void UnbindFromTree(bool aNullParent) override;
virtual EventStates IntrinsicState() const override;
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;

View File

@ -4334,7 +4334,7 @@ nsresult HTMLInputElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLInputElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLInputElement::UnbindFromTree(bool aNullParent) {
// If we have a form and are unbound from it,
// nsGenericHTMLFormElementWithState::UnbindFromTree() will unset the form and
// that takes care of form's WillRemove so we just have to take care
@ -4349,8 +4349,8 @@ void HTMLInputElement::UnbindFromTree(bool aDeep, bool aNullParent) {
NotifyUAWidgetTeardown();
}
nsImageLoadingContent::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLFormElementWithState::UnbindFromTree(aDeep, aNullParent);
nsImageLoadingContent::UnbindFromTree(aNullParent);
nsGenericHTMLFormElementWithState::UnbindFromTree(aNullParent);
// GetCurrentDoc is returning nullptr so we can update the value
// missing validity state to reflect we are no longer into a doc.

View File

@ -202,8 +202,7 @@ class HTMLInputElement final : public nsGenericHTMLFormElementWithState,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
MOZ_CAN_RUN_SCRIPT_BOUNDARY
virtual void DoneCreatingElement() override;

View File

@ -62,8 +62,8 @@ nsresult HTMLLegendElement::BindToTree(Document* aDocument, nsIContent* aParent,
return nsGenericHTMLElement::BindToTree(aDocument, aParent, aBindingParent);
}
void HTMLLegendElement::UnbindFromTree(bool aDeep, bool aNullParent) {
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
void HTMLLegendElement::UnbindFromTree(bool aNullParent) {
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
void HTMLLegendElement::Focus(const FocusOptions& aOptions,

View File

@ -32,8 +32,7 @@ class HTMLLegendElement final : public nsGenericHTMLElement {
// nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
const nsAString& aValue,
nsIPrincipal* aMaybeScriptedPrincipal,

View File

@ -154,7 +154,7 @@ void HTMLLinkElement::LinkRemoved() {
CreateAndDispatchEvent(OwnerDoc(), NS_LITERAL_STRING("DOMLinkRemoved"));
}
void HTMLLinkElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLLinkElement::UnbindFromTree(bool aNullParent) {
// Cancel any DNS prefetches
// Note: Must come before ResetLinkState. If called after, it will recreate
// mCachedURI based on data that is invalid - due to a call to GetHostname.
@ -182,7 +182,7 @@ void HTMLLinkElement::UnbindFromTree(bool aDeep, bool aNullParent) {
}
CreateAndDispatchEvent(oldDoc, NS_LITERAL_STRING("DOMLinkRemoved"));
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
Unused << UpdateStyleSheetInternal(oldDoc, oldShadowRoot);
}

View File

@ -50,8 +50,7 @@ class HTMLLinkElement final : public nsGenericHTMLElement,
// nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual nsresult BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValueOrString* aValue,
bool aNotify) override;

View File

@ -61,14 +61,14 @@ nsresult HTMLMarqueeElement::BindToTree(Document* aDocument,
return rv;
}
void HTMLMarqueeElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLMarqueeElement::UnbindFromTree(bool aNullParent) {
if (IsInComposedDoc()) {
// We don't want to unattach the shadow root because it used to
// contain a <slot>.
NotifyUAWidgetTeardown(UnattachShadowRoot::No);
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
void HTMLMarqueeElement::GetBehavior(nsAString& aValue) {

View File

@ -19,7 +19,7 @@ class HTMLMarqueeElement final : public nsGenericHTMLElement {
nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
void UnbindFromTree(bool aDeep = true, bool aNullParent = true) override;
void UnbindFromTree(bool aNullParent = true) override;
static const int kDefaultLoop = -1;
static const int kDefaultScrollAmount = 6;

View File

@ -4291,7 +4291,7 @@ void HTMLMediaElement::ReportTelemetry() {
}
}
void HTMLMediaElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLMediaElement::UnbindFromTree(bool aNullParent) {
mUnboundFromTree = true;
mVisibilityState = Visibility::Untracked;
@ -4299,7 +4299,7 @@ void HTMLMediaElement::UnbindFromTree(bool aDeep, bool aNullParent) {
NotifyUAWidgetTeardown();
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
MOZ_ASSERT(IsHidden());
NotifyDecoderActivityChanges();

View File

@ -150,8 +150,7 @@ class HTMLMediaElement : public nsGenericHTMLElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual void DoneCreatingElement() override;
virtual bool IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,

View File

@ -136,10 +136,10 @@ nsresult HTMLMetaElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLMetaElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLMetaElement::UnbindFromTree(bool aNullParent) {
nsCOMPtr<Document> oldDoc = GetUncomposedDoc();
CreateAndDispatchEvent(oldDoc, NS_LITERAL_STRING("DOMMetaRemoved"));
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
void HTMLMetaElement::CreateAndDispatchEvent(Document* aDoc,

View File

@ -23,8 +23,7 @@ class HTMLMetaElement final : public nsGenericHTMLElement {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValue* aValue,

View File

@ -220,7 +220,7 @@ nsresult HTMLObjectElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLObjectElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLObjectElement::UnbindFromTree(bool aNullParent) {
#ifdef XP_MACOSX
// When a page is reloaded (when an Document's content is removed), the
// focused element isn't necessarily sent an eBlur event. See
@ -229,8 +229,8 @@ void HTMLObjectElement::UnbindFromTree(bool aDeep, bool aNullParent) {
// disable text input in the browser window. See bug 1137229.
OnFocusBlurPlugin(this, false);
#endif
nsObjectLoadingContent::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLFormElement::UnbindFromTree(aDeep, aNullParent);
nsObjectLoadingContent::UnbindFromTree(aNullParent);
nsGenericHTMLFormElement::UnbindFromTree(aNullParent);
}
nsresult HTMLObjectElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,

View File

@ -54,8 +54,7 @@ class HTMLObjectElement final : public nsGenericHTMLFormElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual bool IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
int32_t* aTabIndex) override;

View File

@ -255,8 +255,8 @@ nsresult HTMLOptionElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLOptionElement::UnbindFromTree(bool aDeep, bool aNullParent) {
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
void HTMLOptionElement::UnbindFromTree(bool aNullParent) {
nsGenericHTMLElement::UnbindFromTree(aNullParent);
// Our previous parent could have been involved in :disabled/:enabled state.
UpdateDisabledState(false);

View File

@ -67,8 +67,7 @@ class HTMLOptionElement final : public nsGenericHTMLElement {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
// nsIContent
virtual EventStates IntrinsicState() const override;

View File

@ -1021,8 +1021,8 @@ nsresult HTMLSelectElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLSelectElement::UnbindFromTree(bool aDeep, bool aNullParent) {
nsGenericHTMLFormElementWithState::UnbindFromTree(aDeep, aNullParent);
void HTMLSelectElement::UnbindFromTree(bool aNullParent) {
nsGenericHTMLFormElementWithState::UnbindFromTree(aNullParent);
// We might be no longer disabled because our parent chain changed.
// XXXbz is this still needed now that fieldset changes always call

View File

@ -270,7 +270,7 @@ class HTMLSelectElement final : public nsGenericHTMLFormElementWithState,
*/
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
virtual void UnbindFromTree(bool aNullParent) override;
virtual nsresult BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValueOrString* aValue,
bool aNotify) override;

View File

@ -244,10 +244,10 @@ nsresult HTMLSharedElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLSharedElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLSharedElement::UnbindFromTree(bool aNullParent) {
Document* doc = GetUncomposedDoc();
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
// If we're removing a <base> from a document, we may need to update the
// document's base URI and base target

View File

@ -39,8 +39,7 @@ class HTMLSharedElement final : public nsGenericHTMLElement {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction()
const override;

View File

@ -55,10 +55,10 @@ nsresult HTMLSlotElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLSlotElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLSlotElement::UnbindFromTree(bool aNullParent) {
RefPtr<ShadowRoot> oldContainingShadow = GetContainingShadow();
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
if (oldContainingShadow && !GetContainingShadow()) {
oldContainingShadow->RemoveSlot(this);

View File

@ -29,7 +29,7 @@ class HTMLSlotElement final : public nsGenericHTMLElement {
// nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
virtual void UnbindFromTree(bool aNullParent) override;
virtual nsresult BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValueOrString* aValue,

View File

@ -95,11 +95,11 @@ nsresult HTMLStyleElement::BindToTree(Document* aDocument, nsIContent* aParent,
return rv;
}
void HTMLStyleElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLStyleElement::UnbindFromTree(bool aNullParent) {
nsCOMPtr<Document> oldDoc = GetUncomposedDoc();
ShadowRoot* oldShadow = GetContainingShadow();
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
if (oldShadow && GetContainingShadow()) {
// The style is in a shadow tree and is still in the

View File

@ -40,8 +40,7 @@ class HTMLStyleElement final : public nsGenericHTMLElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,

View File

@ -1033,9 +1033,9 @@ nsresult HTMLTableElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLTableElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLTableElement::UnbindFromTree(bool aNullParent) {
ReleaseInheritedAttributes();
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
nsresult HTMLTableElement::BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,

View File

@ -159,8 +159,7 @@ class HTMLTableElement final : public nsGenericHTMLElement {
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
/**
* Called when an attribute is about to be changed
*/

View File

@ -799,8 +799,8 @@ nsresult HTMLTextAreaElement::BindToTree(Document* aDocument,
return rv;
}
void HTMLTextAreaElement::UnbindFromTree(bool aDeep, bool aNullParent) {
nsGenericHTMLFormElementWithState::UnbindFromTree(aDeep, aNullParent);
void HTMLTextAreaElement::UnbindFromTree(bool aNullParent) {
nsGenericHTMLFormElementWithState::UnbindFromTree(aNullParent);
// We might be no longer disabled because of parent chain changed.
UpdateValueMissingValidityState();

View File

@ -108,8 +108,7 @@ class HTMLTextAreaElement final : public nsGenericHTMLFormElementWithState,
// nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
const nsAString& aValue,
nsIPrincipal* aMaybeScriptedPrincipal,

View File

@ -75,11 +75,11 @@ nsresult HTMLTitleElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLTitleElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLTitleElement::UnbindFromTree(bool aNullParent) {
SendTitleChangeEvent(false);
// Let this fall through.
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
void HTMLTitleElement::DoneAddingChildren(bool aHaveNotified) {

View File

@ -42,8 +42,7 @@ class HTMLTitleElement final : public nsGenericHTMLElement,
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual void DoneAddingChildren(bool aHaveNotified) override;

View File

@ -410,7 +410,7 @@ nsresult HTMLTrackElement::BindToTree(Document* aDocument, nsIContent* aParent,
return NS_OK;
}
void HTMLTrackElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLTrackElement::UnbindFromTree(bool aNullParent) {
if (mMediaParent && aNullParent) {
// mTrack can be null if HTMLTrackElement::LoadResource has never been
// called.
@ -421,7 +421,7 @@ void HTMLTrackElement::UnbindFromTree(bool aDeep, bool aNullParent) {
mMediaParent = nullptr;
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
uint16_t HTMLTrackElement::ReadyState() const {

View File

@ -85,7 +85,7 @@ class HTMLTrackElement final : public nsGenericHTMLElement {
// the child of a media element.
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
virtual void UnbindFromTree(bool aNullParent) override;
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValue* aValue,

View File

@ -180,14 +180,14 @@ nsMapRuleToAttributesFunc HTMLVideoElement::GetAttributeMappingFunction()
return &MapAttributesIntoRule;
}
void HTMLVideoElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void HTMLVideoElement::UnbindFromTree(bool aNullParent) {
if (mVisualCloneSource) {
mVisualCloneSource->EndCloningVisually();
} else if (mVisualCloneTarget) {
EndCloningVisually();
}
HTMLMediaElement::UnbindFromTree(aDeep, aNullParent);
HTMLMediaElement::UnbindFromTree(aNullParent);
}
nsresult HTMLVideoElement::SetAcceptHeader(nsIHttpChannel* aChannel) {

View File

@ -51,8 +51,7 @@ class HTMLVideoElement final : public HTMLMediaElement {
virtual nsresult Clone(NodeInfo*, nsINode** aResult) const override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
// Set size with the current video frame's height and width.
// If there is no video frame, returns NS_ERROR_FAILURE.

View File

@ -452,7 +452,7 @@ nsresult nsGenericHTMLElement::BindToTree(Document* aDocument,
return rv;
}
void nsGenericHTMLElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void nsGenericHTMLElement::UnbindFromTree(bool aNullParent) {
if (IsInUncomposedDoc()) {
UnregAccessKey();
}
@ -467,7 +467,7 @@ void nsGenericHTMLElement::UnbindFromTree(bool aDeep, bool aNullParent) {
}
}
nsStyledElement::UnbindFromTree(aDeep, aNullParent);
nsStyledElement::UnbindFromTree(aNullParent);
// Invalidate .labels list. It will be repopulated when used the next time.
nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
@ -1628,7 +1628,7 @@ nsresult nsGenericHTMLFormElement::BindToTree(Document* aDocument,
return NS_OK;
}
void nsGenericHTMLFormElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void nsGenericHTMLFormElement::UnbindFromTree(bool aNullParent) {
// Save state before doing anything
SaveState();
@ -1660,7 +1660,7 @@ void nsGenericHTMLFormElement::UnbindFromTree(bool aDeep, bool aNullParent) {
RemoveFormIdObserver();
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
// The element might not have a fieldset anymore.
UpdateFieldSet(false);

View File

@ -242,8 +242,7 @@ class nsGenericHTMLElement : public nsGenericHTMLElementBase {
// Implementation for nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual bool IsFocusableInternal(int32_t* aTabIndex,
bool aWithMouse) override {
@ -935,8 +934,7 @@ class nsGenericHTMLFormElement : public nsGenericHTMLElement,
// nsIContent
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual IMEState GetDesiredIMEState() override;
virtual mozilla::EventStates IntrinsicState() const override;

View File

@ -236,7 +236,7 @@ nsresult nsGenericHTMLFrameElement::BindToTree(Document* aDocument,
return rv;
}
void nsGenericHTMLFrameElement::UnbindFromTree(bool aDeep, bool aNullParent) {
void nsGenericHTMLFrameElement::UnbindFromTree(bool aNullParent) {
if (mFrameLoader) {
// This iframe is being taken out of the document, destroy the
// iframe's frame loader (doing that will tear down the window in
@ -248,7 +248,7 @@ void nsGenericHTMLFrameElement::UnbindFromTree(bool aDeep, bool aNullParent) {
mFrameLoader = nullptr;
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
nsGenericHTMLElement::UnbindFromTree(aNullParent);
}
/* static */

View File

@ -65,8 +65,7 @@ class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
int32_t* aTabIndex) override;
virtual nsresult BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual void UnbindFromTree(bool aNullParent = true) override;
virtual void DestroyContent() override;
nsresult CopyInnerTo(mozilla::dom::Element* aDest);

View File

@ -4,6 +4,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifdef ACCESSIBILITY
# include "mozilla/a11y/DocAccessibleParent.h"
#endif
#include "mozilla/dom/BrowserBridgeParent.h"
#include "mozilla/dom/BrowserParent.h"
#include "mozilla/dom/ContentParent.h"
@ -19,7 +22,8 @@ using namespace mozilla::hal;
namespace mozilla {
namespace dom {
BrowserBridgeParent::BrowserBridgeParent() : mIPCOpen(false) {}
BrowserBridgeParent::BrowserBridgeParent()
: mEmbedderAccessibleID(0), mIPCOpen(false) {}
BrowserBridgeParent::~BrowserBridgeParent() { Destroy(); }
@ -204,6 +208,15 @@ IPCResult BrowserBridgeParent::RecvSetIsUnderHiddenEmbedderElement(
return IPC_OK();
}
IPCResult BrowserBridgeParent::RecvSetEmbedderAccessible(
PDocAccessibleParent* aDoc, uint64_t aID) {
#ifdef ACCESSIBILITY
mEmbedderAccessibleDoc = static_cast<a11y::DocAccessibleParent*>(aDoc);
mEmbedderAccessibleID = aID;
#endif
return IPC_OK();
}
void BrowserBridgeParent::ActorDestroy(ActorDestroyReason aWhy) {
mIPCOpen = false;
Destroy();

Some files were not shown because too many files have changed in this diff Show More