When wayland surface is newly created or resized,
postpone buffer commit (drawing) until gecko updates whole screen
and don't publish partial updates.
Differential Revision: https://phabricator.services.mozilla.com/D23857
--HG--
extra : moz-landing-system : lando
This adds the Firefox-required build.rs hack and reverts the commit
that added bitmasks in a way that depends on Rust 1.34 compiler
internals.
Depends on D20288
Differential Revision: https://phabricator.services.mozilla.com/D20289
--HG--
extra : moz-landing-system : lando
This changeset requires nightly Rust (to be changed in the next part).
Depends on D21891
Differential Revision: https://phabricator.services.mozilla.com/D20288
--HG--
rename : third_party/rust/simd/LICENSE-APACHE => third_party/rust/packed_simd/LICENSE-APACHE
rename : third_party/rust/simd/LICENSE-MIT => third_party/rust/packed_simd/LICENSE-MIT
extra : moz-landing-system : lando
It's useful to be able to use the AutoStructuredSpewer without necessarily
having a script at that moment.
Channels that use this won't be able to filter by script.
Differential Revision: https://phabricator.services.mozilla.com/D24559
--HG--
extra : moz-landing-system : lando
The goal of this testcase is to provide an easier way to add callsites
to test if it is correctly classified. This is a first step, more callsites should be added to
the testcase(See Bug 1532691)
Flow of the test case:
1. setup the server(trackerFrame.sjs) with the expceted number of request it should receive
2. load the test frame(trackerFrame.html) with cookie restriction off, to ensure all the tracking requests contain cookies
3. server responses a list of tracker's request with cookie after reciving all the requests
4. the list should contain all the trackers in the test frame.
5. enable cookie restriction and load the test frame again.
6. server responses a list of tracker's request without cookie after reciving all the requests
7. the list should contain all the trackers in the test frame.
Differential Revision: https://phabricator.services.mozilla.com/D22116
--HG--
extra : moz-landing-system : lando
This patch adds a xpcsehll-test which tests all the combinations of
those parameters used by the heuristic classification algorithm.
Differential Revision: https://phabricator.services.mozilla.com/D22115
--HG--
extra : moz-landing-system : lando
Some testcases are chrome scope testcase hence the resources it loads are triggered by
"system principal". This will exempt the resource from classification.
So in this patch, we used a new window to for the tracker test frame.
The window creation code is referenced from test_privatebrowsing_trackingprotection.html.
Differential Revision: https://phabricator.services.mozilla.com/D22114
--HG--
extra : moz-landing-system : lando
We want to ensure SafeBrowsing update request is never classified so we
can recover from a bad SafeBrowsing database.
SafeBrowsing lookup request is also critical because if it is blocked,
it means SafeBrowsing is out of function.
Differential Revision: https://phabricator.services.mozilla.com/D22113
--HG--
extra : moz-landing-system : lando
This patch uses the flag to exempt channels from classification, but it
doesn't include the use cases of this flag.
See Bug 1442496 for the list of the call sites should use this flag.
Differential Revision: https://phabricator.services.mozilla.com/D22112
--HG--
extra : moz-landing-system : lando
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.
Differential Revision: https://phabricator.services.mozilla.com/D22111
--HG--
extra : moz-landing-system : lando
In this patch, we move from a model where URL classification is opt-in
(by specifying LOAD_CLASSIFIER_URI) to a model where it is enforced by
default unless a channel opts out or is deemed to be a critical channel
based on simple heuristics.
The heuristics exempt a channel from classification if it is triggered
by system with an exception when it is a top level load.
To ensure critical channels are never classified, we also exempt
channels which are flagged as "BeConservative" (implemented in bug 1321783).
Another load flag LOAD_BYPASS_URL_CLASSIFIER is also introduced
for the same reason.
Differential Revision: https://phabricator.services.mozilla.com/D22110
--HG--
extra : moz-landing-system : lando
This ensures test stability, and avoids leaking browser windows when we're closing the private browsing window in the test.
Depends on D24529
Differential Revision: https://phabricator.services.mozilla.com/D24530
--HG--
extra : moz-landing-system : lando
It looks like we don't need to stop ADB. Most of the logic can stay, in order to start and stop the devices polling.
Differential Revision: https://phabricator.services.mozilla.com/D24398
--HG--
extra : moz-landing-system : lando
This can happen, for example, when GetAccessibleOrContainer is called within SelectionManager::ProcessSelectionChanged due to focusing a direct child of a shadow root.
In this case, the common ancestor is the shadow root itself.
Previously, we returned null in this case because GetFlattenedTreeParent doesn't work on the shadow root itself.
Now, we check if the given node is the shadow root, and if so, we use the shadow host instead.
This prevents the "We must reach document accessible implementing text interface!" assertion in SelectionManager::ProcessSelectionChanged when a direct child of a shadow root gets focus.
Differential Revision: https://phabricator.services.mozilla.com/D21349
--HG--
extra : moz-landing-system : lando
This commit changes the mirror to store divergent structure, instead
of dropping or trying to fix up records as they're stored.
* We no longer ignore records for items with invalid GUIDs. Instead,
we store them in the mirror, and make new GUIDs for them. Dogear
takes care of marking the old GUID as deleted, and flagging the item
and its parent for reupload.
* Each item stores its `parentid` in the database, so we can fix up
orphans and parent-child disagreements.
* Each item also stores a new validity state: valid, reupload, or
replace. An item marked with "reupload" can be applied, but should be
updated remotely. We use this to rewrite legacy tag queries. An item
marked with "replace" can't be applied; for example, a bookmark or
query without a valid URL. If the item exists locally, we can replace
the server's invalid copy with a valid local copy. If not, we must
delete it from the server.
* We don't need to protect the mirror's roots, since Dogear fixes them
for us.
Differential Revision: https://phabricator.services.mozilla.com/D20077
--HG--
extra : moz-landing-system : lando
This commit introduces a Rust XPCOM component,
`mozISyncedBookmarksMerger`, that wraps the Dogear crate for
merging and applying synced bookmarks.
How this works: `SyncedBookmarksMirror.jsm` manages opening
the connection, initializing the schema, and writing incoming
items into the mirror database. The new `mozISyncedBookmarksMerger`
holds a handle to the same connection. When JS code calls
`mozISyncedBookmarksMerger::apply`, the merger builds local and
remote trees, produces a merged tree, applies the tree back to Places,
and stages outgoing items for upload in a temp table, all on the
storage thread. It then calls back in to JS, which inflates Sync
records for outgoing items, notifies Places observers, and cleans up.
Since Dogear has a more robust merging algorithm that attempts to fix
up invalid trees, `test_bookmark_corruption.js` intentionally fails.
This is fixed in the next commit, which changes the merger to handle
invalid structure.
Differential Revision: https://phabricator.services.mozilla.com/D20076
--HG--
extra : moz-landing-system : lando
This commit adds `ThreadPtr{Handle, Holder}` to wrap an `XpCom` object
with thread-safe refcounting. These are analagous to
`nsMainThreadPtr{Handle, Holder}`, but can hold references to
objects from any thread, not just the main thread.
`ThreadPtrHolder` is similar to `ThreadBoundRefPtr`. However, it's
not possible to clone a `ThreadBoundRefPtr`, so it can't be shared
among tasks. This is fine for objects that are only used once, like
callbacks. However, `ThreadBoundRefPtr` doesn't work well for loggers
or event emitters, which might need to be called multiple times on
the owning thread.
Unlike a `ThreadBoundRefPtr`, it's allowed and expected to
clone and drop a `ThreadPtrHolder` on other threads. Internally,
the holder keeps an atomic refcount, and releases the wrapped object
on the owning thread once the count reaches zero.
This commit also changes `TaskRunnable` to support dispatching from
threads other than the main thread.
Differential Revision: https://phabricator.services.mozilla.com/D20074
--HG--
extra : moz-landing-system : lando
This commit wraps just enough of the mozStorage API to support the
bookmarks mirror. It's not complete: for example, there's no way
to open, clone, or close a connection, because the mirror handles
that from JS. The wrapper also omits shutdown blocking and retrying on
`SQLITE_BUSY`.
This commit also changes the behavior of sync and async mozStorage
connections. Async (`mozIStorageAsyncConnection`) methods may be called
from any thread on any connection. Sync (`mozIStorageConnection`)
methods may be called from any thread on a sync connection, and from
background threads on an async connection. All connections now QI
to `mozIStorageConnection`, but attempting to call a sync method on
an async connection from the main thread throws.
Finally, this commit exposes an `OpenedConnection::unsafeRawConnection`
getter in Sqlite.jsm, for JS code to access the underlying connection.
Differential Revision: https://phabricator.services.mozilla.com/D20073
--HG--
extra : moz-landing-system : lando
The `tabModal` property getter can return null so we need to check it before accessing sub-properties.
Differential Revision: https://phabricator.services.mozilla.com/D24738
--HG--
extra : moz-landing-system : lando
1. Register with the root document window's parent target, since this receives events for iframes and shadow DOM. (The root document itself doesn't.)
2. Hold onto the target node when scheduling processing of the DOM event, as GetOriginalTarget returns null when we process shadow DOM events async.
Depends on D21349
Differential Revision: https://phabricator.services.mozilla.com/D21350
--HG--
extra : moz-landing-system : lando