getAtomName() is only used in one place -- FunctionCall::toString() -- where
the returned atom is appended to a string. This patch changes it to
appendName(), which does the appending itself. This avoids a bunch of manual
atom refcounting and the possibility of failure.
MozReview-Commit-ID: I75rO1Bv6Y8
--HG--
extra : rebase_source : ef78377db12b2e89c582e32836d3abd460bde7d0
Our Client.id values were being normalized from "{uuid}" to "uuid", but not
our FetchEvent.clientId values. Because nsID::Parse accepts both forms,
this was not being caught by any tests.
Although there are ServiceWorker WPT tests that verify consistency of
returned Client.id values across multiple matchAll invocations (ex:
client-id.https.html), there are no tests that compare Client.id with
FetchEvent.clientId. All the tests largely use Clients.get() to verify
correctness/round-tripping. I looked into adding WPT tests, but we
quickly run into the test logistics problem where it's preferable to
avoid adding tests that involve effectively global state.
So, this patch:
- Changes Clients::Get() to explicitly treat client id's that start with a
"{" as invalid. This causes existing FetchEvent.clientId-related WPT
tests to fail, as we would hope.
- Duplicates the client id normalization logic that strips {} for the
FetchEvent.clientId to its point of origin in
ContinueDispatchFetchEventRunnable::Run.
- Augments our dom/serviceworkers/test/test_match_all_client_properties.html
test, which has been enforcing {}-less UUIDs for a while, to also test
FetchEvent.clientId to verify it conforms. I added some comments to the
test files too.
--HG--
extra : rebase_source : dd6d07ea880eb2c3115d8810ea246b4469ad5f96
When dragging an image, add the image request's MIME type to the transfer
so that the MIME-extension check can be done in the parent process.
Move the MIME-extension check to the parent process to avoid
issues caused by content process sandboxing.
MozReview-Commit-ID: 3cb4fCr6GnL
--HG--
extra : rebase_source : ec49b8c83613be844fe4cd88a5024ac41a845199
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.
This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)
Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.
The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)
The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
disable warnings about (well-defined!) overflow of unsigned integer
arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
MSVC follow the C++ standard(!) and let constexpr variables have external
linkage.
- The use of -constexpr:steps300000 to increase the number of operations
allowed in a constexpr value, in order to handle gGkAtoms, which requires
hashing ~2,500 atom strings.
The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.
There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().
Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.
MozReview-Commit-ID: 4AxPv05ngZy
nsStyleStructList.h was initially made generated in bug 873368 to avoid
manually maintaining boilerplate for if-dispatch, while the if-dispatch
was replaced by jump table in bug 1171842, so the boilerplate went away.
However, in bug 1122781 (before bug 1171842), boilerplate for dependency
check, so it still needs to be generated.
The dependency table is removed in the previous patch, so we no longer
have any boilerplate in the style struct list, and thus it doesn't need
to be generated anymore.
MozReview-Commit-ID: GkbJZ98ojbE
--HG--
extra : rebase_source : a148b97c051bb6c88846cf6ba617c4edef70ca24
extra : source : f1c7d19cde195fb90ac2627d16ed69d020de01b9
The aSamePointerStructs argument is unused now.
Also, aIgnoreVariables can be true everywhere now, since variable changes can't
generate change hints, and anonymous boxes and such don't care about whether
they really changed or not.
Only one caller cares about struct equality, and that already compares variables
manually as an optimization on the rust side.
We had this optimization inconsistently in some cases but not others.
MozReview-Commit-ID: F2EISKlxR3K
The patch for bug 1387427 made us keep the source content in an array and we don't insert
it into the document anymore. The code for xslt-param and xslt-param-namespace should look
in the source content array instead of the document.
--HG--
extra : rebase_source : bbf4c6ab66357b3d7fe3f91fefc040d0a19578f5
Disable time jittering when comparing different AudioContexts because they might look
different.
MozReview-Commit-ID: A3neLqokQ5c
--HG--
extra : rebase_source : b275942db06d3bb8e80bdb6ed5f94299636d1a8f
We want to create the source fragment before trying to use it in URIUtils::ResetWithSource.
The testcase triggers an assertion related to unbalanced onload blocking/unblocking,
fixing that by blocking onload on the new document we're setting in OnTransformDone and
unblocking onload on the old document.
--HG--
extra : rebase_source : 8bbdb9ce6a38dc6b76d13dfb2c3c7d67f78ecefe
The new struct is in LayersTypes.h, all the rest of the changes are just
replacing existing uint64_t instances with the new LayersId struct.
Note that there is one functional change, in
CompositorBridgeParent::DeallocPWebRenderBridgeParent, where we now
correctly convert the PipelineId to a LayersId before using it to index
into sIndirectLayerTrees, whereas before we were incorrectly just using
the mHandle part of the PipelineId.
MozReview-Commit-ID: GFHZSZiwMrP
--HG--
extra : rebase_source : d2b274f63aaee2ee9bba030297e0a37a19af0d6c
updateLayerTree() is called from the callback of MozAfterPaint in
reftest-content.js all the time except when we specify reftest-no-sync-layers
or reftest-no-flush. If there is a throttled animation,
FlushPendingNotifications flushes the animation, thus it will fire another
MozAfterPaint event. It means we will end up waiting for the throttled
animation to finish. This reiteration MozAfterPaint events can be easily
observed in WebRender since WebRender fires MozAfterPaint event without
checking invalidation change. Whereas current Gecko fires MozAfterPaint only
if invalidation change happens and reftests for such throttled animations
specify the same value for 'from' and 'to' value, so it hasn't been a problem
there.
The FlushPendingNotifications in updateLayerTree() was introduced in bug
1083635 <https://hg.mozilla.org/mozilla-central/rev/5bebfbefb3c2> to
sync-decode images so it shouldn't matter if there are still throttled
animations.
MozReview-Commit-ID: B9KgNCX0kWq
--HG--
extra : rebase_source : 7e40a94b7ead05c708f21fb4bc897d50becd74dc
We can get button indexes in HID usage reports that do not actually
correspond to a button we store, meaning we can overstep bounds of the
button array. Check validity before accessing array.
MozReview-Commit-ID: AAQJLEgy2Ua
--HG--
extra : rebase_source : d665f7713612b76f7b36ca3d2ace1e6659bb5099
With bug 1444489, there is no longer a need to load the full xul.css into HTML
documents. This patch remove that ability and keep it as an assertion.
MozReview-Commit-ID: ChBdRts6PFX
--HG--
extra : rebase_source : b6b35af4c66d8a097f8b4787305bba2e948de554
For now we preserve the current code structure and function signatures to make
review simpler. That's about to get cleaned up.
MozReview-Commit-ID: 4epLHQiEwDV
test_bug609794.html was testing a behavior that the method before the current
method of attaching InstallTrigger to windows depended on. We don't really
need that behavior, which is good, because this change is not producing it.
MozReview-Commit-ID: GPzif89UYYl
The only caller of nsDOMConstructor::nsDOMConstructor is
nsDOMConstructor::Create which has no callers.
Also removes the now-unused nsDOMConstructorSH class.
MozReview-Commit-ID: GgOO8ugXFKb
We only have classinfo left for DOMConstructor and DOMPrototype, both of which
use nsDOMConstructorSH, which overrides PostCreatePrototype.
To avoid -Werror build failures, this changeset also removes static functions
that were only reachable from PostCreatePrototype.
MozReview-Commit-ID: JpJOuMHAAuo
We don't resolve it normally, because nsDOMConstructorSH overrides
PostCreatePrototype to be a no-op, so nsWindowSH::GlobalResolve never actually
defines the relevant property on the window. We also hide it in
nsWindowSH::NameStructEnabled. But in the Xray-to-window case we attempt to
define it. We shouldn't do that.
MozReview-Commit-ID: 3tnMnSQuvuT
The only caller is nsDOMClassInfo::RegisterClassProtos. The only caller of
that is nsDOMClassInfo::Init. In nsDOMClassInfo::Init this is called after we
have done the RegisterClassName call for "DOMConstructor".
Since the only bits of classinfo left are DOMConstructor and DOMPrototype, and
both use nsIDOMDOMConstructor as their interface, we call RegisterClassProto
with "DOMConstructor" as aClassName, find the existing nsGlobalNameStruct, and
return without doing anything. So this entire codepath can be removed.
MozReview-Commit-ID: JfXmIex7tLC
nsFrameLoader is on WebIDL bindings, so those QIs are no-ops anyway, unless the given object is no a frameloader to start with.
MozReview-Commit-ID: IPiW70H5NPc
The change from "docShell" to "mDocShell" for the SetName call in the
OwnerIsMozBrowserFrame case in nsFrameLoader::MaybeCreateDocShell is a
drive-by correctness fix for a bug the rename of "docShell" to "parentDocShell"
caught: setting the name of our _parent_ docshell based on the name attr of our
owner makes no sense.
MozReview-Commit-ID: DwnWt8jTokV
* blobImpl references are now only kept in nsHostObjectProtocolHandler
* removes nsHostObjectProtocolHandler.idl
* Makes nsHostObjectURI no longer inherit from nsSupportsWeakReference
MozReview-Commit-ID: AC1klrfsMnn
--HG--
extra : rebase_source : 142802f9a6fa6aae5611dccf117d88f96a9985a6
Non-restartless extensions are no longer supported in the wild, and none of
the remaining automation extension rely on Workers in their components.
MozReview-Commit-ID: bh3nwwfM1g
--HG--
extra : rebase_source : db16e8bfdc8148310675b1c8641f4321b2a89702
extra : source : d6bda91c66d6625fb98c427ad62b337696df5acf
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.
MozReview-Commit-ID: RbKstNx8pi
--HG--
extra : rebase_source : f81058b9bdd67c2f77bb5cd45d3838bc12f406ea
Change AudioCallbackDriver::Init() to fallback to a system clock driver if a
cubeb context can not be obtained. This should make driver init more robust in
cases where cubeb init fails and then CubebUtils::GetCubebContext() returns no
context.
MozReview-Commit-ID: IlFPytYacoI
--HG--
extra : rebase_source : 7445ceb49583ee3ae399252e995ce6f012d9da2f
Add logging was added to help diagnose gUM failures and provide more log
coverage of that code path.
MozReview-Commit-ID: A76fjlUVpmn
--HG--
extra : rebase_source : 6f67ab223739474c8dec7a72a1ff322503c4df96
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.
MozReview-Commit-ID: RbKstNx8pi
--HG--
extra : rebase_source : d7c00f2ef16623dbbd88ede0f6636ca56501e151
Bug 1408695 introduced a workaround in HTMLTrackElement for a bug in VS2017 <
15.6. Bug 1424281 bumps our minimum support versions so the workaround can be
removed.
MozReview-Commit-ID: 9aZb9ODPIlh
--HG--
extra : rebase_source : df4aac786e8db039e4ecd9912c453a74e1065876
Internal users of indexedDB were using the storage: "persistent" option to
avoid losing their data due to quota management. We would like to remove
that proprietary option and are adding a way for internal origins to be
considered persistent storage by default. This should also prevent
previous users from losing their data.
MozReview-Commit-ID: 4cbfbAlHokM
--HG--
extra : rebase_source : 0f8e4f8716a2e302e10c3ede81ceb2216706dfc7
Non-restartless extensions are no longer supported in the wild, and none of
the remaining automation extension rely on Workers in their components.
MozReview-Commit-ID: bh3nwwfM1g
--HG--
extra : rebase_source : ad3d131d6db984f4171c5f79b86de094d2cca1bf
We're not using named shared memory, and supporting only anonymous
shared memory allows using other backends that are more compatible
with preventing a process from accessing any shared memory it wasn't
explicitly granted (i.e., sandboxing).
Specifically: SharedMemory::Open is removed; SharedMemory::Create no
longer takes a name, no longer has the open_existing option which doesn't
apply to anonymous memory, and no longer supports read-only memory
(anonymous memory which can never have been written isn't very useful).
This patch also fixes some comments in what remains of SharedMemory::Create.
MozReview-Commit-ID: 4kBrURtxq20
--HG--
extra : rebase_source : f6b1fb2fc79b6e9cdd251b3d9041036c0be503f9
The camera is blocked by the sandbox hardening in part 1. This intercepts and remotes the call to CreateMutexW that causes the camera to fail.
--HG--
extra : rebase_source : 8431b9c5b4e2ca35590692e0c71e68900b7f75b1
Previously, all FunctionBrokers used the same global set of type marshalers to handle IPC. The marshaling behavior is endpoint-dependent so it is done with the EndpointHandler. This patch makes the EndpointHandler used by a specific RPC function into a template parameter to the function's FunctionBroker. It also divides up the current special type handling into two cases -- FileDlgEndpointHandler for plugin file dialog brokering, and SslEndpointHandler for SSL communication brokering.
--HG--
extra : rebase_source : 160abbc77a202b752dd41655980745e770c6b915
Level 3 changes the plugin process access token from USER_INTERACTIVE to USER_LIMITED.
--HG--
extra : rebase_source : 0a037adf08e4f729bd9e129203f5c403cfc12f4b
It seems silly to have a tiny utils class with a single function in its own
module. This patch moves it into nsStaticAtom.h/nsAtomTable.cpp. It also
renames nsAtomListUtils as nsStaticAtomUtils. Finally, it uses templates to
remove the need for the `aCount` parameter at callsites.
MozReview-Commit-ID: DvJVoZFv89c
--HG--
extra : rebase_source : 1f1dd27d56e46c71c30c10102ac6132a721e23d1
All prefs that need to be sent to a new content process are now put into the
shared memory segment, and they are identified by the pref name instead of an
index into a list. The old IPC used at process startup (in XPCOMInitData) is
removed.
Benefits:
- It removes the need for the early prefs list
(dom/ipc/ContentProcesses.{h,cpp}) and the associated checking, which is ugly
and often trips people up (e.g. bug 1432979, bug 1439406).
- Using prefnames instead of indices fixes some fragility (fixing bug 1419432).
- It fixes the problem of early prefs being installed as unlocked default
values even if they are locked and/or have user values.
MozReview-Commit-ID: FRIzHF8Tjd
The DOMMatrix.cpp changes are because it was sneaking in headers via another
unified file.
MozReview-Commit-ID: GPp9WOywI5D
--HG--
rename : dom/base/nsGenericDOMDataNode.cpp => dom/base/CharacterData.cpp
rename : dom/base/nsGenericDOMDataNode.h => dom/base/CharacterData.h
This is mostly a straightforward copy. The only change is what happens with
the return value of CloneDataNode: it's cast to Text directly, and the
null-check is replaced by an assert.
MozReview-Commit-ID: B5rnhEOneZn
This fixes these two errors:
FileMediaResource.cpp:30:36: error: invalid use of incomplete type ‘class mozilla::AbstractThread’
mCallback->AbstractMainThread()->Dispatch(
MediaTimer.cpp:50:3: error: ‘Unused’ was not declared in this scope
Unused << rv;
MozReview-Commit-ID: WkPZc22dMF
--HG--
extra : rebase_source : 5704eb8bb36398be7aabaded9284b4f7263ef477
Summary:
When the host is bound to the document, it'll also re-BindToTree the shadow
tree, which will update the stylesheets and all that.
Reviewers: xidorn
Bug #: 1446507
Differential Revision: https://phabricator.services.mozilla.com/D742
MozReview-Commit-ID: fBLq5owB7U
Summary:
I'm happy to keep it around if you think having the test_mutationobservers check
is useful.
MozReview-Commit-ID: LbWvJiO9LRZ
Reviewers: smaug
Bug #: 1446597
Differential Revision: https://phabricator.services.mozilla.com/D750
Unlike a DOM wheel event listeners which receive original delta values, plugins
receive horizontalized ones. It's not reasonable to not send original values to
plugins.
Plugin developers can do any delta adjustment, and they are also capable of
DIRECTLY getting what inputs the user is manipulating, that is to say,
developers can horizontalize scrolling for [Shift+Vertical Wheel] or other other
inputs if they want, it's just their matter; conversely, they aren't capable of
getting what delta adjustment their upstream has already encapsulated for them.
So it's not reasonable to send adjusted delta values to plugins.
This patch restores horizontalized delta values to the original for plugins.
MozReview-Commit-ID: IX8XJn0lbKq
--HG--
extra : rebase_source : ea9abef4706701e2c43ee06563bd10bc0a863614
It might be possible that the animation does not start being restyled in the
initial frame. Eventually we should drop tweakExpectedRestyleCount in bug
1425778 and replace it with a function that waits for animation.ready and waits
to start being restyled something like this;
async function waitForAnimationReadyToBeRestyled(aAnimation) {
await aAnimation.ready;
if (animationStartsRightNow(aAnimation)) {
await waitForFrame();
}
}
MozReview-Commit-ID: ByN25hMAK76
--HG--
extra : rebase_source : 6dd3a44661905ffff7bce748540572df2d40425b
We'll start to dispatch keydown event and keyup event even during composition.
So, for testing those events won't break our UI, we should make
EventUtils.synhtesizeComposition() and EventUtils.synthesizeCompositionChange()
dispatch keydown event and keyup event even if callers don't specify keyboard
event explicitly.
Typically, "keydown" event is marked as "processed by IME", i.e., keyCode
value is set to DOM_VK_PROCESSKEY and key is set to "Process", with our
widget which handles native IME and key input. On the other hand, "keyup"
is NOT marked as so.
Therefore, this patch makes TextInputProcessor emulates this behavior without
any new special flags. And for making possible to emulate special cases,
this patch adds two flags to nsITextInputProcessor. One is
KEY_DONT_MARK_KEYDOWN_AS_PROCESSED. The other is KEY_MARK_KEYUP_AS_PROCESSED.
Unfortunately, those flags have opposite meaning but this must be better than
making necessary to one flag for emulating usual keydown/keyup events.
Finally, this makes some tests specify better keyboard information to
synthesizeComposition() and synthesizeCompositionChange() to emulate
actual keyboard events during composition.
MozReview-Commit-ID: ItYaXILkNQE
--HG--
extra : rebase_source : e50cc77c1efbc12686d7ea334d41926c7392b30d