We can remove isOnlyToplevelInTabGroup entirely since we have
BrowsingContext/BrowsingContextGroup exposed through
chrome-webidl. Checking if a browsing context is the only top level
(auxilliary or otherwise) is only a matter of checking that there
isn't a parent, and that the size of the browsing context group is 1.
Differential Revision: https://phabricator.services.mozilla.com/D46590
--HG--
extra : moz-landing-system : lando
We can remove isOnlyToplevelInTabGroup entirely since we have
BrowsingContext/BrowsingContextGroup exposed through
chrome-webidl. Checking if a browsing context is the only top level
(auxilliary or otherwise) is only a matter of checking that there
isn't a parent, and that the size of the browsing context group is 1.
Differential Revision: https://phabricator.services.mozilla.com/D46590
--HG--
extra : moz-landing-system : lando
This also allows us to remove TabGroup::FindItemWithName, which is a
big step towards removing TabGroup entirely.
Differential Revision: https://phabricator.services.mozilla.com/D46285
--HG--
extra : moz-landing-system : lando
This also allows us to remove TabGroup::FindItemWithName, which is a
big step towards removing TabGroup entirely.
Differential Revision: https://phabricator.services.mozilla.com/D46285
--HG--
extra : moz-landing-system : lando
To hide some functions from `AudioChannelAgent` to avoid an access from `AudioChannelAgentCallback` (eg. media element, audio destination node...), and only allow `AudioChannelService` to use those functions.
Differential Revision: https://phabricator.services.mozilla.com/D45755
--HG--
extra : moz-landing-system : lando
Now other `WindowXXXChanged()` would receive the change directly from their input parameter, we should make `WindowVolumeChanged()` consistent with them, instead of asking `AudioChannelService` again.
Differential Revision: https://phabricator.services.mozilla.com/D45754
--HG--
extra : moz-landing-system : lando
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.
Differential Revision: https://phabricator.services.mozilla.com/D45753
--HG--
extra : moz-landing-system : lando
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.
We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.
Differential Revision: https://phabricator.services.mozilla.com/D45752
--HG--
extra : moz-landing-system : lando
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.
In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.
Differential Revision: https://phabricator.services.mozilla.com/D45751
--HG--
extra : moz-landing-system : lando
The suspend state and muted state are two different things, so changing the suspended state should not affect on the muted state.
As nsAPI doesn't provide suspending API, both muting and suspending are actually sharing the same implementation, which is to mute/unmute nsAPI.
Although we have used two separate variables to store muted and suspended state, in order to make them independent, we still don't want to unexpectedly unmute nsAPI when resuming from suspended state.
Therefore, before unmuting nsAPI, we should consider both states.
Differential Revision: https://phabricator.services.mozilla.com/D46319
--HG--
extra : moz-landing-system : lando
We have already had the same checking in `AudioCaptureStreamChange()`, so we can remove the checking in `AudioCaptureStreamChangeIfNeeded()`.
Differential Revision: https://phabricator.services.mozilla.com/D45749
--HG--
extra : moz-landing-system : lando
`nsIAudioChannelAgent` was created a common interface for a usage of in both js and C++ before, now we have no any JS code would use `nsIAudioChannelAgent`, it's only used in C++ code.
Therefore, in a coming refactoring (bug1580662), we will remove `nsIAudioChannelAgent` and use `AudioChannelAgent` as the only interface. Here we can make these classes start to reference `AudioChannelAgent`, instead of `nsIAudioChannelAgent`.
Differential Revision: https://phabricator.services.mozilla.com/D45748
--HG--
extra : moz-landing-system : lando
We can remove this once [PrimaryGlobal] goes away, but for now we need to not
have this issue, which actually bit me when converting NavigatorLanguage to a
mixin.
Differential Revision: https://phabricator.services.mozilla.com/D46510
--HG--
extra : moz-landing-system : lando
Most of these tests have been disabled for a long time; they run well
in the current test environment.
Differential Revision: https://phabricator.services.mozilla.com/D46642
--HG--
extra : moz-landing-system : lando
Also, update the serialization by the shorter perference because this is
a new feature and using older syntax doesn't make sense.
Besides, use `cssOffset` for web animation IDL attribute name.
Differential Revision: https://phabricator.services.mozilla.com/D45607
--HG--
extra : moz-landing-system : lando
The two remaining consumers don't seem to depend on actually using this
specific nsresult in any way.
Differential Revision: https://phabricator.services.mozilla.com/D46462
--HG--
extra : moz-landing-system : lando
The changes to the return type of MerchantValidationEvent::init are because
Result doesn't allow having an ErrorResult (or any other type without a copy
constructor) as its error type. Plus we would have had the impedance mismatch
between Result<Ok, nsresult> (which is what URL resolution on the document
returns) and Result<Ok, ErrorResult> anyway.
Differential Revision: https://phabricator.services.mozilla.com/D46461
--HG--
extra : moz-landing-system : lando
People keep adding useless null-checks and it was not clear what the consensus
was from bug 1441165, but this should be unobjectionable I guess.
Differential Revision: https://phabricator.services.mozilla.com/D46781
--HG--
extra : moz-landing-system : lando
People keep adding useless null-checks and it was not clear what the consensus
was from bug 1441165, but this should be unobjectionable I guess.
Differential Revision: https://phabricator.services.mozilla.com/D46781
--HG--
extra : moz-landing-system : lando
Our implementation modified the state, in addition to throwing the exception.
And the tests not only didn't test for this, but wouldn't have reached that
code anyway, due to the harness giving up as soon as anything failed.
Differential Revision: https://phabricator.services.mozilla.com/D46106
--HG--
extra : moz-landing-system : lando
It doesn't really make sense to enforce this behavior for calls on stack
variables (which presumably we then want to do something with) and doesn't
necessarily make sense to enforce it for member variables either.
Differential Revision: https://phabricator.services.mozilla.com/D46105
--HG--
extra : moz-landing-system : lando
Tasks dispatched from RunInStableState() can be cancelled if there's a load in
between, so this is not sound.
See nsSyncSection::IsCancelled().
This is the only patch in this bug that is worth uplifting IMO.
Differential Revision: https://phabricator.services.mozilla.com/D46773
--HG--
extra : moz-landing-system : lando
Instead, rely on the proper initialization of `mWrapColumn` via
`nsPlainTextSerializer::Init`.
This will allow to move `mWrapColumn` to `nsPlainTextSerializer::Settings::mWrapColumn`,
simplifying reasoning about it.
Differential Revision: https://phabricator.services.mozilla.com/D46129
--HG--
extra : moz-landing-system : lando
`TextEditor::SetWrapWidth` already sets `nsIDocumentEncoder`'s wrap
column which is propagated to `nsPlainTextSerializer`. So this should be
a safe change.
Differential Revision: https://phabricator.services.mozilla.com/D46008
--HG--
extra : moz-landing-system : lando
Also while doing it:
* Ensure activity observers get notified after visibility is computed already.
This is how we notify all other activity observers already, and we are
double-notifying in the case we actually get a page show _and_ a visibility
change, but this is a pre-existing problem.
* Remove special-cases for InFrameSwap() from MediaRecorder. Now that pagehide
doesn't mess up with our visibility state the regular check just works. I
ensured I didn't regress bug 1444541.
* Had to fix a UITour test that relied on the visibility changing back and
forth for the detached tab. It seems there's no real place in UITour that
listens to that event so we should be good.
* Added tests, verifying that they both fail without the patch.
After this we can remove nsDocShell::InFrameSwap(), as the only caller is the
assertion, but I wanted to keep it regardless, at least for now, until this
patch has been in for a bit.
Differential Revision: https://phabricator.services.mozilla.com/D45906
--HG--
extra : moz-landing-system : lando
Also while doing it:
* Ensure activity observers get notified after visibility is computed already.
This is how we notify all other activity observers already, and we are
double-notifying in the case we actually get a page show _and_ a visibility
change, but this is a pre-existing problem.
* Remove special-cases for InFrameSwap() from MediaRecorder. Now that pagehide
doesn't mess up with our visibility state the regular check just works. I
ensured I didn't regress bug 1444541.
* Had to fix a UITour test that relied on the visibility changing back and
forth for the detached tab. It seems there's no real place in UITour that
listens to that event so we should be good.
* Added tests, verifying that they both fail without the patch.
After this we can remove nsDocShell::InFrameSwap(), as the only caller is the
assertion, but I wanted to keep it regardless, at least for now, until this
patch has been in for a bit.
Differential Revision: https://phabricator.services.mozilla.com/D45906
--HG--
extra : moz-landing-system : lando
Actually, CAUSE_UNKNOWN_CHROME is set when caller is chrome process. I would
like to change that this value is called from chrome or native.
Differential Revision: https://phabricator.services.mozilla.com/D44104
--HG--
extra : moz-landing-system : lando
Similar to MozPromise::FromGeckoResult.
Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.
Differential Revision: https://phabricator.services.mozilla.com/D46017
--HG--
extra : moz-landing-system : lando
* Let layout.css.use-counters.enabled be independent from the unimplemented
property counters.
* Always count in the style system (that is, always create
Document::mStyleUseCounters), so that the warning from bug 1582374 works
irrespective of these prefs.
* Add a pref check to the SVGElement code path so that the prefs properly
reflect whether the histograms end up being recorded or not.
* Make the pref checks consistent (check both when reporting telemetry, not
earlier).
Differential Revision: https://phabricator.services.mozilla.com/D46633
--HG--
extra : moz-landing-system : lando
Both of these files obviously use things from the newly-included
headers, but they were not including them prior to this point.
Differential Revision: https://phabricator.services.mozilla.com/D46632
--HG--
extra : moz-landing-system : lando
This fixes both our failure to register load blockers for remote frames and
our failure to keep the load event blocked during frameloader rebuilding on
remoteness change.
Differential Revision: https://phabricator.services.mozilla.com/D46503
--HG--
extra : source : dff7756afe8ede1e03d775ec4999d4807d82c1da
extra : histedit_source : b02eae2b652683ef17be3e0ff6a908b4bec311f5%2Cc62c8e5e4ca066f8f526a81a9aae0feeb84326a5
`IMEContentObserver` sends selection change notification only when it receives
a DOM `Selection` change notification received. However, selection range in
plaintext offset may be changed when changing previous content of caret is
changed. In this case, currently we notify IME of only text change and
that causes IME keep caching selection offsets in previous content. This
causes IME queries character rect out of bounds. Therefore, even if
`IMEContentObserver` hasn't received DOM `Selection` change notification,
it should recompute selection range and if it's changed, it should notify
IME of selection change too.
Differential Revision: https://phabricator.services.mozilla.com/D46251
--HG--
extra : moz-landing-system : lando
This fixes both our failure to register load blockers for remote frames and
our failure to keep the load event blocked during frameloader rebuilding on
remoteness change.
Differential Revision: https://phabricator.services.mozilla.com/D46503
--HG--
extra : moz-landing-system : lando
Using the BrowsingUsing parent chain is able to avoid 1) obtaining a wrong
root in cross-process documents and also avoid 2) not being able to obtain
the proper root in same-origin documents in the case where there is a
cross-process document in between the top level document and the same-origin
documents.
dom/base/test/test_intersectionobservers.html is a test of case 1).
testing/web-platform/tests/intersection-observer/same-origin-grand-child-iframe.sub.html
is a test case of case 2).
Differential Revision: https://phabricator.services.mozilla.com/D46432
--HG--
extra : moz-landing-system : lando
This replaces the instances where Length was being called on an interval set
to determine if it was empty or not empty. IsEmpty makes the intention in these
cases more immediately obvious, and avoids the need to think about ints as
bools in cases like `if(!mySet.Length())`.
Depends on D46638
Differential Revision: https://phabricator.services.mozilla.com/D46639
--HG--
extra : moz-landing-system : lando
Restyle include guard + includes to conform to new style rules.
Depends on D46637
Differential Revision: https://phabricator.services.mozilla.com/D46638
--HG--
extra : moz-landing-system : lando
This is a quality of life improvement:
- More concise than checking if Length() == 0.
- More readable then if(mySet.Length()) (in my opinion).
- We already have checks that test if IntervalSets are empty by looking at their
length, so there is a use case for this.
Differential Revision: https://phabricator.services.mozilla.com/D46637
--HG--
extra : moz-landing-system : lando
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)
Differential Revision: https://phabricator.services.mozilla.com/D45162
--HG--
extra : moz-landing-system : lando
Set a trivial duration (1us) on 0 duration samples before feeding them to the
WMF MFT decoder to prevent it from estimating the duration for such samples.
Differential Revision: https://phabricator.services.mozilla.com/D46516
--HG--
extra : moz-landing-system : lando
This is a back out of changeset c52127007a01, i.e. reverts bug 1560440. That bug
was itself reverting a prior bug where we started setting the duration.
There are two scenarios involved, each with their own issues:
- We don't set the duration when feeding the decoder (what we're doing prior to
this change). In this case the decoder will estimate durations for all
samples. This works in many cases, but leads to issues with files that have
non-uniform durations - as seen in bug 1576990 (this bug).
- We do set the duration when feeding the decoder (what will happen after this
change). In this case the decoder will not estimate durations, except it still
seems to do so when fed 0 duration samples. Since our demuxing pipeline can
create 0 duration samples, this leads to issues with such files (as seen in
bug 1560440).
This patch fixes the former of the above, and the next patch in the chain will
address the latter.
Differential Revision: https://phabricator.services.mozilla.com/D46515
--HG--
extra : moz-landing-system : lando
* wpt runs chrome priv for a subset of tests (mostly things testing toolkit chrome stuff), but it's still in the content process
* we only ever hit this case if the test is explicitly loaded as chrome. originally added for a couple osx tests at https://bugzilla.mozilla.org/show_bug.cgi?id=1465457. then expanded for all xul tests at https://bugzilla.mozilla.org/show_bug.cgi?id=1557371
* so what we used to do here is run xul/xbl in the content process (not chrome priv)
* the change here is that with our chrome Custom Elements we need to run with chrome priv for https://searchfox.org/mozilla-central/rev/4218cb868d8deed13e902718ba2595d85e12b86b/toolkit/components/processsingleton/CustomElementsListener.jsm#16 to load the elements
* so we made it explicit. the alternative at the time was to change wpt harness to load these tests in parent process, but it was too complex for what we needed (discussed with dbaron)
* this parentprocess check was meant kind of as an optimization so that we wouldn't have to check priv on random pages. but (a) that's short circuited anyway by the xul elem check and (b) this is only called when attachShadow is called on a non-html element so not in any kind of hot path
Differential Revision: https://phabricator.services.mozilla.com/D46310
--HG--
extra : moz-landing-system : lando
Assuming our caller didn't mess up passing the reference (and code inspection
suggests callers did not thus mess up), we should not have null when we take a
pointer to the reference.
Differential Revision: https://phabricator.services.mozilla.com/D46506
--HG--
extra : moz-landing-system : lando
CubebDeviceEnumerator already knows when an audio device changes. It is enhanced to allow listeners/observers registration and to create notifications when that happens. Also, it is hooked to the existing notification path.
On a minor note, it has been revisited the way the enumerator is touched in MediaEngineWebRTC class.
Differential Revision: https://phabricator.services.mozilla.com/D46271
--HG--
extra : moz-landing-system : lando
DeviceChangeCallback class implements the observer pattern. However, the role of the observer and the subject is integrated into the same class which makes use of virtual methods to allow a separation of the roles. This makes code reading difficult. Also, it does not allow from a class to inherit only the observer role or the subject role. This patch breaks the DeviceChangeCallback class into two classes according to the observer or subject functionality.
Differential Revision: https://phabricator.services.mozilla.com/D46270
--HG--
extra : moz-landing-system : lando
This patch nulls out a Document's promises when it is destroyed to break cycles going through them and ensure Documents are cleaned up sooner.
Differential Revision: https://phabricator.services.mozilla.com/D46286
--HG--
extra : moz-landing-system : lando
It appears possible for data eviction to take place despite the manager not
currently having any buffered ranges. This shouldn't happen, but if it can if
the buffers have become full with 0 duration data. This patch attempts to
mitigate that case by removing all coded frames. This prevents a bad access on
the buffered ranges and should clear up space in the buffers to append more
data.
Differential Revision: https://phabricator.services.mozilla.com/D44711
--HG--
extra : moz-landing-system : lando
Similar to MozPromise::FromGeckoResult.
Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.
Differential Revision: https://phabricator.services.mozilla.com/D46017
--HG--
extra : moz-landing-system : lando
Now that we count them, I think we should do this.
This property is pretty painful for various reasons:
* It's a pretty awkward non-standard property.
* Has a pretty short name, so people use it instead of the standard
alternatives.
* We cannot really even implement it easily anyhow, without breaking a whole
bunch of stuff, because pages do things like:
```
myelement {
zoom: 0.5;
-moz-transform: scale(0.5);
transform-origin: 0 0;
}
```
For now this is only recorded when CSS use counters are enabled (Nightly for
now), but I want to change it once bug 1578661 is in central.
The hope is that this warning slightly raises awareness of this property not
being standard. You get a CSS parsing error in the console, but those are
usually too noisy and disabled by default.
Differential Revision: https://phabricator.services.mozilla.com/D46430
--HG--
extra : moz-landing-system : lando
Just use conventions properly. As much as I dislike it.
I wanted to do it because I wanted to add a console message on load for a few
situations (bug 1582374), but I found a better place to put it.
Differential Revision: https://phabricator.services.mozilla.com/D46431
--HG--
extra : moz-landing-system : lando
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)
Differential Revision: https://phabricator.services.mozilla.com/D45162
--HG--
extra : moz-landing-system : lando
We log to MOZ_LOG, report an error to the console, send telemetry, and in debug builds - crash
Differential Revision: https://phabricator.services.mozilla.com/D45055
--HG--
extra : moz-landing-system : lando
This avoids relying on the accessibility.tabfocus
pref having been set by a previous test.
Differential Revision: https://phabricator.services.mozilla.com/D46374
--HG--
extra : moz-landing-system : lando
The ideal situation for media control should be incooperated with the audio competition so that we only have to control one controller.
However, if it's multiple controllers at the same time, we would tend to only control the last one in order to reduce confustion.
Ex. If we pause controller A first, and then start controller B. So what should we do when we press `play/pause` hardware key? To resume controller A or to stop controller B, or do both things at the same time?
Differential Revision: https://phabricator.services.mozilla.com/D43315
--HG--
extra : moz-landing-system : lando
In order to receive platform level media hardward keys event, we create a `MediaHardwareKeysEventSource` which is used to implement intercepting those events according to different platforms.
We can add a `MediaHardwareKeysEventListener` onto `MediaHardwareKeysEventSource`, so that we can get notification whenever hardware media keys are being pressed.
`MediaHardwareKeysManager` is used to encapsulate all these details, it would create a source and corresponding listener.
Differential Revision: https://phabricator.services.mozilla.com/D43313
--HG--
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.
Differential Revision: https://phabricator.services.mozilla.com/D44697
--HG--
extra : moz-landing-system : lando
And add them to the UseCounter enum. Also add some sanity-check assertions that
the reporting code relies on.
This works much like the deprecated operation list.
Differential Revision: https://phabricator.services.mozilla.com/D44696
--HG--
extra : moz-landing-system : lando
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.
Differential Revision: https://phabricator.services.mozilla.com/D44695
--HG--
extra : moz-landing-system : lando
Adds nsIOSPermissionRequest::MaybeRequestScreenCapturePermission() to allow front-end code to trigger a screen-recording permission request dialog.
Depends on D46093
Differential Revision: https://phabricator.services.mozilla.com/D46094
--HG--
extra : moz-landing-system : lando
Adds nsIOSPermissionRequest::GetScreenCapturePermissionState() to allow front-end code to check if Firefox has already been granted permission to record the screen.
Differential Revision: https://phabricator.services.mozilla.com/D46093
--HG--
extra : moz-landing-system : lando
Now, we can get rid of `TextEditRules` and `HTMLEditRules` completely.
And also this patch renames their cpp files to `TextEditSubActionHandler`
and `HTMLEditSubActionHandler`.
`TextEditor::Init()` and `HTMLEditor::Init()` are still complicated due to
`AutoEditInitRulesTrigger`. The following patch will remove it.
Differential Revision: https://phabricator.services.mozilla.com/D45792
--HG--
rename : editor/libeditor/HTMLEditRules.cpp => editor/libeditor/HTMLEditSubActionHandler.cpp
rename : editor/libeditor/TextEditRules.cpp => editor/libeditor/TextEditSubActionHandler.cpp
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.
Differential Revision: https://phabricator.services.mozilla.com/D44697
--HG--
extra : moz-landing-system : lando
And add them to the UseCounter enum. Also add some sanity-check assertions that
the reporting code relies on.
This works much like the deprecated operation list.
Differential Revision: https://phabricator.services.mozilla.com/D44696
--HG--
extra : moz-landing-system : lando
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.
Differential Revision: https://phabricator.services.mozilla.com/D44695
--HG--
extra : moz-landing-system : lando
Adds a ServiceWorkerDelegate to GeckoRuntime that allows GeckoView applications
to handle ServiceWorkerClient.openWindow() requests.
Differential Revision: https://phabricator.services.mozilla.com/D45572
--HG--
extra : moz-landing-system : lando
Storing a DocShell rather than a BrowsingContext causes a number of problems
when dealing with cross-process navigations. The most immediate in this case
is that some cross-origin-allowed operations only work after a local-to-remote
navigation only until the original DocShell is destroyed, which causes
intermittent test failures.
It also means, though, that after a local-to-remote navigation, where the
DocShell has not been destroyed, attempts to read same-origin properties still
end up at the old DocShell, and as a result, lie about the current state of
the BrowsingContext.
Differential Revision: https://phabricator.services.mozilla.com/D46100
MANUAL PUSH: Cannot update re-opened Phabricator revisions.
--HG--
extra : source : 6ba3bcede28a51512b8f17606b917024813e98b9
extra : histedit_source : 8dcc4aaabfc3db541a1269dfcd6414c4009d1c47%2C424b940eac29b4e916ea390223103ca41922375d
Storing a DocShell rather than a BrowsingContext causes a number of problems
when dealing with cross-process navigations. The most immediate in this case
is that some cross-origin-allowed operations only work after a local-to-remote
navigation only until the original DocShell is destroyed, which causes
intermittent test failures.
It also means, though, that after a local-to-remote navigation, where the
DocShell has not been destroyed, attempts to read same-origin properties still
end up at the old DocShell, and as a result, lie about the current state of
the BrowsingContext.
Differential Revision: https://phabricator.services.mozilla.com/D46100
MANUAL PUSH: Cannot update re-opened Phabricator revisions.
--HG--
extra : rebase_source : 417335868d70932981ae0b8908f60a22bdffb62c
extra : amend_source : 135861c9d33ec4b4d84c2ec36aa407ec91df9130
In places where profiler_is_active() was used around a profiler_add_marker() (or
similar) call, replace it with profiler_can_accept_markers().
Differential Revision: https://phabricator.services.mozilla.com/D44435
--HG--
extra : moz-landing-system : lando
Payloads will serialize themselves into a `BlocksRingBuffer` entry when first
captured.
Later they will be deserialized, to stream JSON for the output profile.
Differential Revision: https://phabricator.services.mozilla.com/D43428
--HG--
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando
By reporting the properties in MappedAttrParser that we used to (the test relies
on counting those), and by adjusting the histogram name to the new thing.
Differential Revision: https://phabricator.services.mozilla.com/D44697
--HG--
extra : moz-landing-system : lando
And add them to the UseCounter enum. Also add some sanity-check assertions that
the reporting code relies on.
This works much like the deprecated operation list.
Differential Revision: https://phabricator.services.mozilla.com/D44696
--HG--
extra : moz-landing-system : lando
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.
Differential Revision: https://phabricator.services.mozilla.com/D44695
--HG--
extra : moz-landing-system : lando
In places where profiler_is_active() was used around a profiler_add_marker() (or
similar) call, replace it with profiler_can_accept_markers().
Differential Revision: https://phabricator.services.mozilla.com/D44435
--HG--
extra : moz-landing-system : lando
Payloads will serialize themselves into a `BlocksRingBuffer` entry when first
captured.
Later they will be deserialized, to stream JSON for the output profile.
Differential Revision: https://phabricator.services.mozilla.com/D43428
--HG--
extra : moz-landing-system : lando
Also removes the UA cache attached to nsILoadGroup and nsIRequestContext and the "http-on-useragent-request" observer notification.
If overriding the user agent is needed "http-on-modify-request" is equally usable (but should be used rarely, for performance reasons). A better way is using nsIDocShell.customUserAgent.
Depends on D14750
Differential Revision: https://phabricator.services.mozilla.com/D14751
--HG--
extra : moz-landing-system : lando
When we call nsContentUtils::IsPatternMatching, we swallow JS engine errors
unconditionally returning true.
This is bad, because if it happens in one of the value sets that arguably
shouldn't change the state of the element, we end up returning an arbitrary
value (true) which may or may not match the previous state of the element.
Handle error explicitly instead, by not updating the state.
Differential Revision: https://phabricator.services.mozilla.com/D45727
--HG--
extra : moz-landing-system : lando
Also removes the UA cache attached to nsILoadGroup and nsIRequestContext and the "http-on-useragent-request" observer notification.
If overriding the user agent is needed "http-on-modify-request" is equally usable (but should be used rarely, for performance reasons). A better way is using nsIDocShell.customUserAgent.
Depends on D14750
Differential Revision: https://phabricator.services.mozilla.com/D14751
--HG--
extra : moz-landing-system : lando
DocumentChannel doesn't use the REDIRECT_INTERNAL flag when replacing itself with a real channel if there has been a real redirect handled in the parent.
This is so that the docshell knows about the URI change, and to add history entries.
The timing data however always wanted to be treated as an internal redirect, so that we don't record a new 'redirectEnd' at the time of the switch.
This adds a new parameter to ConfigureReplacementChannel so that we can more accurately describe the behaviour we need.
Differential Revision: https://phabricator.services.mozilla.com/D45150
--HG--
extra : moz-landing-system : lando
This partially addresses the regression, but not fully. With this patch we don't
maintain shadow trees for nodes that we know won't get rendered.
This works fast in WebKit / Blink because of a bug in their implementation which
doesn't synchronize style attributes, introduced in [1].
You can see this clearly if you click on the bug's test-case and inspect the
<use> shadow trees (there's no style="stroke:orange" whatsoever).
They can kinda get away with it because they don't properly implement SVG 2. In
particular, in Blink / WebKit, the style of the element in the <use> shadow tree
is the style of the referenced element, which means that even if the style
attribute isn't properly synced it's ~ok since it doesn't end up mattering for
styling.
Easiest test-case for the behavior difference is:
```
<!doctype html>
<style>
rect:hover {
fill: green;
}
</style>
<svg width=300 height=300>
<g id="canvas">
<rect fill=red width=100 height=100></rect>
</g>
<g>
<use x=200 href="#canvas"></use>
</g>
</svg>
```
Where Firefox will properly update each square independently when hovered, but
Blink / WebKit won't.
This used to work faster because in this particular test-case we have 3 hidden
<use> elements whose href is the #canvas, which is basically everything.
Before moving to shadow trees we'd do it using anonymous content, and since we
never got a frame we'd never clone the subtree in the first case.
This case was faster before bug 1450250, but this approach makes other cases
slow that were fixed by that bug, like bug 1485402.
So I'll try to optimize shadow tree syncing instead, I guess, but there's no
good reason not to land this in the meantime IMHO.
[1]: f4b022e64b%5E%21/third_party/WebKit/WebCore/svg/SVGElement.cpp
Differential Revision: https://phabricator.services.mozilla.com/D45953
--HG--
extra : moz-landing-system : lando
* The test first asserts that we can actually load iframes in separate subprocesses
* The test now loads in a new tab rather than a new window
* The test no longer uses the "fission" attribute
* The test avoids the BrowsingContext.get pattern, in favour of just passing the
BrowsingContext from one actor to the other directly.
Differential Revision: https://phabricator.services.mozilla.com/D45744
--HG--
extra : moz-landing-system : lando
Also remove the definition of unused struct for tracking of input timestamp.
Depends on D45774
Differential Revision: https://phabricator.services.mozilla.com/D45775
--HG--
extra : moz-landing-system : lando
Note that I've confirmed no-cross-origin-autofocus.html works fine with
enabling fission on w3c-test.org.
Differential Revision: https://phabricator.services.mozilla.com/D44950
--HG--
extra : moz-landing-system : lando
This commit renames nsMathMLElement/nsMathMLElementFactory classes into
MathMLElement/MathMLElementFactory and moves the former into the mozilla::dom
namespace. This is a preliminary step to introduce MathML DOM (bug 1579602).
Code behavior is not changed.
Differential Revision: https://phabricator.services.mozilla.com/D45128
--HG--
rename : dom/mathml/nsMathMLElement.cpp => dom/mathml/MathMLElement.cpp
rename : dom/mathml/nsMathMLElement.h => dom/mathml/MathMLElement.h
rename : dom/mathml/nsMathMLElementFactory.cpp => dom/mathml/MathMLElementFactory.cpp
extra : moz-landing-system : lando
Removes API 19 specifier from test manifests.
There aren't many, but best to clean them up.
Differential Revision: https://phabricator.services.mozilla.com/D45766
--HG--
extra : moz-landing-system : lando
Also removes the UA cache attached to nsILoadGroup and nsIRequestContext and the "http-on-useragent-request" observer notification.
If overriding the user agent is needed "http-on-modify-request" is equally usable (but should be used rarely, for performance reasons). A better way is using nsIDocShell.customUserAgent.
Depends on D14750
Differential Revision: https://phabricator.services.mozilla.com/D14751
--HG--
extra : moz-landing-system : lando
Storing a DocShell rather than a BrowsingContext causes a number of problems
when dealing with cross-process navigations. The most immediate in this case
is that some cross-origin-allowed operations only work after a local-to-remote
navigation only until the original DocShell is destroyed, which causes
intermittent test failures.
It also means, though, that after a local-to-remote navigation, where the
DocShell has not been destroyed, attempts to read same-origin properties still
end up at the old DocShell, and as a result, lie about the current state of
the BrowsingContext.
Differential Revision: https://phabricator.services.mozilla.com/D46100
--HG--
extra : moz-landing-system : lando
`TextEditRules::DocumentIsEmpty()` is a wrapper of `TextEditor::IsEmpty()` so
that we can get rid of it simply.
`HTMLEditRules::DocumentIsEmpty()` needs to change. It's oddly checks only
`EditorBase::mPaddingBRElementForEmptyEditor` is `nullptr` or not. However,
the editor may be completely empty. And the result may be different from
`TextEditor::IsEmpty()` which is not overridden by `HTMLEditor`. For partially
solving this issue, this patch makes `HTMLEditor` overrides `IsEmpty()` and
optimizes `TextEditor::IsEmpty()`.
With this change, the caller of `HTMLEditRules::DocumentIsEmpty()` may behave
differently in the only caller, `HTMLEditor::SelectEntireDocument()`. And
unfortunately, its root called from `SelectAllCommand::DoCommand()`. However,
it does just collapse `Selection` into the root element (`<body>` or
`Document.documentElement`) if it returns `true`. Therefore, this change
must be safe since anyway `SelectionRefPtr()->SelectAllChildren()` with
the root element is exactly same as `SelectionRefPtr()->Collapse()` with
the empty root element if it's truly empty.
Differential Revision: https://phabricator.services.mozilla.com/D45784
--HG--
extra : moz-landing-system : lando
ServiceWorker mochitests fail for Fission is fixed by bug 1542415.
Remove the skip-if for tests
Differential Revision: https://phabricator.services.mozilla.com/D46030
--HG--
extra : moz-landing-system : lando
PaymentRequestChild could be nullptr while PaymentRequest's owner is nullptr.
Differential Revision: https://phabricator.services.mozilla.com/D46012
--HG--
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando