This allows keyboard shortcuts containing both "Ctrl" and "Alt" in the
manifest of webextensions (in the "commands" -> "suggested_key" key),
rather than just one of these modifiers. The equivalent combinations
on MacOS (any two of "Command", "Alt" and "MacCtrl") are also allowed.
Non-sensical combinations (such as "Ctrl+Command" or "Ctrl+Ctrl") are
forbidden.
MozReview-Commit-ID: 59tC2efLm5q
--HG--
extra : rebase_source : 5a9375116aab6b3c4abe96c4850e4ff857d93532
extra : intermediate-source : 507b35de0e93baccb54f83e8bce6cedfe9754dd9
extra : source : 115c5332fadc1d52940f8356f6273f0e9680657f
If discard is used immediately after creating a tab, restoring the tab
resulted in an unusable tab. This was due to the sessionstate not being
ready. This adds enough sessionstate to restore when this occurs.
MozReview-Commit-ID: 6PIc71BS8VU
--HG--
extra : rebase_source : 1bb9627eee561e9bf924e9eb2a34a5071cae3742
The thing that it's testing is being removed.
I couldn't think of something that I could replace the test with. Maybe once we have
bug 1457481 we can check in an actual ELF binary and check that we're dumping its
symbol table correctly.
MozReview-Commit-ID: 9AXUwqPrivl
--HG--
extra : rebase_source : 70f7bd07804552c59a0d1ab0a1b6b344f9e6d308
I think that the intermittent error in the bug may be caused by
a pending executeScript call that is somehow handled around the
shutdown of the extension.
To verify this hypothesis, the test now explicitly waits for the
result of the first executeScript call before executing the last
script that is responsible for test completion.
The test should explicitly be checking for the error anyway.
And clean up comments and add reference to bug 1435100 in an
existing comment.
MozReview-Commit-ID: 6gV30Z6zQc4
--HG--
extra : rebase_source : d2d2f20336390ef61fefe247b3d1ae8668da7067
- Previously, if a port is disconnected by the other end, then memory
would be leaked to `ProxyMessenger.ports` in ExtensionParent.jsm.
To fix this, the port descriptor is now saved separately, keyed by
port ID instead of message manager.
- Previously, when a message manager was disconnected (e.g. window
closed/tab crashed), the port is disconnected only if the port was
created from that page.
This patch adds bookkeeping to keep track of the message managers at
both the sender and receiver's side, so that the port is always
disconnected when the other side goes away.
- The new test browser_ext_port_disconnect_on_crash.js checks whether
the ports are disconnected as expected. Previously, the subtest
connect_from_tab_to_bg_and_crash_tab failed because of the previous
point.
- Although not as deterministic as the crash test, the new
browser_ext_port_disconnect_on_window_close.js reproduces the original
test failure and serves as a regression test for the bug.
- Previously, the data structure in ProxyMessenger.ports contained
the original `sender` and `recipient`. For the purpose of sending
port disconnection messages, these are not necessary and therefore
they have been removed.
- Fix incorrect JSDoc (type of portId is number, not string)
MozReview-Commit-ID: BoaKRVAUKuq
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.
MozReview-Commit-ID: DCChktTc5TW
--HG--
extra : rebase_source : cffb1c9762191c579d1397c8169e6e7635d229da
extra : histedit_source : dea59ddd2daaae52069c5faceae9149a4f08dd73
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.
MozReview-Commit-ID: IE7B8Czv8DH
--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
Apparently BrowserTestUtils.removeTab(gBrowser.selectedTab) does not
close the ?discoTest tab, which causes the test to fail eventually.
See comment 6 of bug 1453163 for more details.
MozReview-Commit-ID: 3UgEaVW083i
--HG--
extra : rebase_source : b1d901a611c27a269fa8129f172cfdafb7f6d81c
This patch requests a bit longer test timeout for browser_ext_devtools_panel.js, similarly
to other tests that open/close the devtools toolbox multiple times, because it often
timeouts on linux32 debug builds after we added a couple more "toolbox open/close" cycles
to test Bug 1394750 changes (and also made the devtools theme API tests more readable
by splitting it from the test case that verifies the rest of the devtools panel API).
MozReview-Commit-ID: 3JRWobPRwr5
--HG--
extra : rebase_source : 352fd4870048afa789d10afd2dd05bad9daa87ef
Use a more specific entry point for the test than
"http://mochitest.test:8888" to make sure that the test is only started
once, when the test opens a tab with the entry point.
MozReview-Commit-ID: 7iAFREDuACu
--HG--
extra : rebase_source : 6ab46b1114dc824f29d0bf21ffa784cd14651447
Extension ports are automatically closed when the message manager of
the source is destroyed. When a tab is detached from a window, its
frameloader is moved to the new window and the original message
manager is destroyed.
Bug 1445537 started listening for SwapDocShells events, but that only
works for the first swap (e.g. detaching a tab once). To avoid early
disconnection of the port, we should continue to subscribe to
SwapDocShells events.
MozReview-Commit-ID: G2ZYAhNyHIL
--HG--
extra : rebase_source : 9f888482e63d2768adf3dbd1c484a483dc307b2b
Contexts for active extension views are kept in a Set on the owning extension.
That list is meant to be kept current, with views added and removed as they're
created and unloaded. A refactoring at some point in the past, though, changed
that so that we only cleaned up parent views at extension shutdown, not at
view shutdown.
MozReview-Commit-ID: FW8KHPOD9qc
--HG--
extra : rebase_source : fab255ba2fb5ee55be41c252c89930d38f6edbe8
extra : amend_source : 54863d79a1d571a7354aa15f74e2fc4448297777
If commands are used with the page action panel, they will toggle open or
closed. We need to keep a handle on our custom panel so we can close it.
MozReview-Commit-ID: JfxwlyK8g8g
--HG--
extra : rebase_source : 25b4fbe794040d6769fa498cee5fcad154e002f9
Now that WebExtensions run OOP in Windows by default, and we have no intention
of going back, there's no need to run an extra set of in-process tests for
them.
MozReview-Commit-ID: t8ryuuNFHe
--HG--
extra : amend_source : 90e006ca618206a943991b14cb11779baa7b8934
Calling into the Photon PageAction API to update a property is orders of
magnitude more expensive than the simple DOM-based updates we used previously.
To make matters worse, a lot of our caching was removed during the migration,
and the Photon API introduces a lot of duplicated work when selecting icons.
This patch caches the last known state for each property to avoid calling into
the Photon APIs to update each property more than necessary, and removes the
extraneous preferred icon size calculations that the Photon code already
duplicates.
MozReview-Commit-ID: LjPPxolmcd6
--HG--
extra : rebase_source : 70bce5b1460c93cc738999b1e167eb17a39259b1
The shims that this rule tests for no longer exist.
MozReview-Commit-ID: DMgP7Hczavc
--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
Now we're loading the sizemode attribute earlier, doing this on load stops
working.
MozReview-Commit-ID: ToiJiYrvFw
--HG--
extra : rebase_source : 48ad80e5535ecc5f7c8c8297f417f797deddc017
extra : source : 80194b5bf0e7bbcccf727d2fec140e747ebd0949
extra : histedit_source : 2b7755fece2a564fc806369280559c8829d3d486
Ensure remoteWebProgress is initialized for remote browsers. Includes devtools fix from jryans.
MozReview-Commit-ID: Ce3TzwkNnyi
--HG--
extra : rebase_source : 0f2bcb96ef04f4eaee447180dc21400dca3bf410
Add filtering of urls, properties, window and tab id to onUpdated events to
help reduce the quantity of update events that are dispatched.
MozReview-Commit-ID: J8Rh9uEt1gW
--HG--
extra : rebase_source : df821e63a3029e9970f6174f8132f30003b77221
Regression from bug 1398713. Before that, we reloaded the entire webext-panel.xul if the
sidebar changed. This verifies we don't reload unecessarily as well as discards
the browser to force a runtime disconnect for the extension if it does change.
MozReview-Commit-ID: LuYxmj9mSb7
--HG--
extra : rebase_source : 9839d7b96195f2323328d1a37c3d946032bbb652
This test has been disabled because it was failing intermittently with a pretty high
frequency on the Windows platform, the reasons behind the failures have been fixed
in Bug 1435100.
MozReview-Commit-ID: FNJqocBcxnf
--HG--
extra : rebase_source : f5fd1392bc53f137c8e48e433fddd103af74eaad
We need a static disable event so we can handle shutdown
of extensions using hidden tabs. This allows us to handle
shutdown when the extension has not yet used the API (thus
the ext-tabs api has not loaded).
MozReview-Commit-ID: BxV5PmbHJ8o
--HG--
extra : rebase_source : 78dd8b6e6b6ee1b09d446545dc8b38e32d7e9969
KeyframeEffect and KeyframeEffectReadOnly constructors can run in the caller
compartment, which is okay because the current compartment is used in the
following places and all of them are safe:
1. GlobalObject::CallerType(), that is ultimately passed to
nsDocument::IsWebAnimationsEnabled in KeyframeEffectParamsFromUnion,
to decide whether to copy mIterationComposite/mComposite to
KeyframeEffectParams.
GlobalObject::CallerType() can now be different than the target window's one,
if the caller has the system principal and the target is web content, and
in that case nsDocument::IsWebAnimationsEnabled there always returns true
while Web Animations can be disabled on web content.
honoring the mIterationComposite/mComposite properties is OK, since it just
changes the animation behavior, and this is disabled by default until
remaining spec issues are resolved.
2. GlobalObject::Context(), that is ultimately passed to
KeyframeUtils::GetKeyframesFromObject and used while extracting information
from passed-in keyframe object, with iterable/iterator protocols.
Performing that operation in the caller side is okay, since the same thing
can be done on caller, and the operation doesn't perform any GCThing
allocation on the target window global.
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.
MozReview-Commit-ID: De4enbjux3T
--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
KeyframeEffect and KeyframeEffectReadOnly constructors can run in the caller
compartment, which is okay because of the following reasons:
1. The target window global is used for most operation:
* KeyframeEffectReadOnly::ConstructKeyframeEffect uses the target window
global instead of current global.
* KeyframeEffectParamsFromUnion which receives `aGlobal.CallerType()`
In Xray case, Web Animations API can be disabled on web content
(currently disabled on beta/release by default), and in that case some API
won't work even it's triggered from WebExtensions, but it should be fine.
2. GetKeyframesFromObject is executed in the caller's compartment to access
the passed-in JSObject that is keyframe, with iterable/iterator protocols.
This operation doesn't perform any GCThing allocation on the target window
global.