Add a ToTArray version that works with LinkedList.
This is much like what we do for other containers, but without walking the list
twice.
Differential Revision: https://phabricator.services.mozilla.com/D225001
Only the bottom 64 bits will be preserved by C++ code so we shouldn't treat the SIMD registers
as non-volatile.
The patch in bug 1919803 has a Wasm test for this.
Differential Revision: https://phabricator.services.mozilla.com/D225646
In `SubstringKernel`, if the substring spans both the left and right child of a rope,
we could create two dependent strings and a new rope for the substring. If the substring is long
and we do this repeatedly, this could backfire because flattening each of these new ropes later
is much more expensive than flattening the original rope once and then creating dependent
strings for it.
This patch keeps the optimization in `SubstringKernel` when both children are linear and the
substring fits in an inline string, because this is a safe and reasonable optimization, but we
no longer allocate rope strings.
This speeds up the Monaco editor case in the bug from 6300 ms to 250 ms. It also makes
JetStream's WSL-Stdlib 49% faster. This case doesn't hit on Speedometer 3 so it shouldn't
be affected.
The original optimization was added in bug 851064. Testing with the shell test case there, it
hit this case only three times and this patch doesn't measurably affect its performance.
Differential Revision: https://phabricator.services.mozilla.com/D225619
This case is pretty common and we should optimize it to not flatten the rope
or allocate new strings.
This also matches the Ion inline code for `LSubstr` because it does the length
check before checking if the string is a rope.
A full Speedometer 3 run has only a few hundred calls to `SubstringKernel` with a
rope, but more than 95% of them are for this case.
Differential Revision: https://phabricator.services.mozilla.com/D225618
I think this was needed before bug 1924375 because it was applied as a
regular transform (not child-only transform) and thus was affected by
transform-origin and so on (which was not reset to 0 0 on the anon
frame). So this was basically undoing the effect of transform-origin I
believe.
Thus the right thing to do is:
* Not trying to to undo the translation in SVGOuterSVGFrame.
* Avoid doing it in the display list to begin with. This is what
papered the issue without viewbox to begin with, the math just
happened to add up when no scale was present.
This gets the right behavior and is less hacky. I think I convinced
myself this is the right thing to do, but it'd be nice to get another
pair of eyes.
Differential Revision: https://phabricator.services.mozilla.com/D225540
This adds an asynchronous method to lock the startup files using the same
lock that we use during normal startup.
The profile service then uses this lock to gate access to the profiles.ini
files adding a method to async flush the entire database or in the case
that the on-disk database has changed a way to mergwe in some properties
about the current profile into the on-disk version.
Differential Revision: https://phabricator.services.mozilla.com/D222662
When I make `ContentCacheInParent` manage the pending content command events, I forgot
to make `BrowserChild::RecvInsertText()` and `BrowserChild::RecvReplaceText()` call
`SendOnEventNeedingAckHandled()` because they have existed and I added
`BrowserChild::RecvSimpleContentCommandEvent()`. Therefore, this patch makes them call
`SendOnEventNeedingAckHandled()`.
Additionally, `ContentCacheInParent::OnEventNeedingAckHandled()` returns without
managing the count if it's called for the content command events. Therefore, this patch
fixes the early return bug too.
Differential Revision: https://phabricator.services.mozilla.com/D225749
Automatic update from web-platform-tests
[@container] Change serialization of general-enclosed in test
There is an open issue saying this needs to be specified[1].
Change the expectation to align with Gecko and Chromium for now, which
both keep the original serialization for general-enclosed.
[1] https://github.com/w3c/csswg-drafts/issues/7266
Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Steinar H Gunderson <sesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1368182}
--
wpt-commits: 598e86ac6913319529be27d0f1e53d79773c72cc
wpt-pr: 48596
Automatic update from web-platform-tests
Add WPTs that opus supports both mono and stereo signals.
Currently the first test passes (channelCount:1) but the second test
fails (channelCount:2) because today SDP must be modified to say
"stereo=1".
However the opus spec says that "stereo=1" is just an optional receiver
preference and should not be mandatory to do stereo. Even if it is
missing both mono and stereo should be supported.
The added tests negotiate opus and expect remote track's channel count
to match the local track's channel count in a simple loopback call in
the case that we don't SDP munge.
In a future CL we may want to also test the "stereo=1" SDP munging path
but here we are only concerned with default feature support.
Bug: webrtc:42233792
Change-Id: Ica97b30736d56117b260501e5ccd1c66f2d73fae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925771
Reviewed-by: Ale Bzk <alessiob@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1368159}
--
wpt-commits: aca05ab75401856bfec3963399c35bdafa7ac862
wpt-pr: 48599
Automatic update from web-platform-tests
Use selection focus for caret position while navigating using arrow keys
While moving cursor up and down, the cursor should come exactly above
and below the previous position respectively. Currently the cursor
position is not correct in these scenarios since we pass
|selection_.Start()| to calculate the x position while editing, instead
we should pass |selection_.Focus()| since focus will be having the last
position of the caret. This change is Firefox compatible.
Updated some existing web_tests that were using selection modifier and
after this CL, the caret position is now changed so these web_tests
needed to adhere to the updated caret positioning.
Updated tests:
web_tests/editing/pasteboard/paste-list-002.html
web_tests/editing/pasteboard/paste-list-003.html
web_tests/editing/pasteboard/paste-list-004.html
web_tests/editing/selection/move-3875618-fix.html
web_tests/editing/inserting/insert-3786362-fix-expected.txt
Bug: 40658856
Change-Id: Id6f00889621003072d7f88bcc00d10f8318ad8f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5804495
Reviewed-by: Siye Liu <siliu@microsoft.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Utkarsh Pathak <utpathak@microsoft.com>
Reviewed-by: Sanket Joshi <sajos@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1368113}
--
wpt-commits: 1e0eb917a4db14710f3eefd9b7ffc5f7066fd08b
wpt-pr: 48546
The planned group (eTLD+1 domain) support in OriginScope will require access to
the group of a particular origin. PrincipalMetadata will not only allow easy
access to the group, but it will also allow further DirectoryLockImpl cleanup.
Differential Revision: https://phabricator.services.mozilla.com/D196034
Unfortunately, the code does not work well only in `white-space: pre-line`.
The rending itself is broken, so, it won't work well on Firefox anyway and
this style is not so useful with editable content. Therefore, this patch
does not fix the issue.
Differential Revision: https://phabricator.services.mozilla.com/D225039
Both Chrome and Safari clean up unnecessary padding line breaks when they become
unnecessary. Therefore, we should follow that.
Differential Revision: https://phabricator.services.mozilla.com/D225038
Basically, in order to allow turning on JS execution tracing from a convenient place
within the profiler, we want a threadsafe endpoint hanging off of the
`CycleCollectedJSContext`. The profiler holds onto a pointer to the `CycleCollectedJSContext`
controlled via `PROFILER_SET|CLEAR_JS_CONTEXT` and calls this from a background thread
when profiling starts, or from the cx's own thread if the profiler is already running
when it is registered.
Differential Revision: https://phabricator.services.mozilla.com/D222755
The changes in the rest of this patch to support tracing via the profiler
make the devtools endpoint obsolete. This just cleans that up.
Differential Revision: https://phabricator.services.mozilla.com/D221914
This patch allows us to start and stop the execution tracer from a native
endpoint rather than through the debugger object, and allows us to read the
trace into a native struct rather than a JS object. Giving a thread safe
native endpoint makes integration very easy for the profiler, and is also
more efficient than writing to and reading from an intermediary JS object.
Differential Revision: https://phabricator.services.mozilla.com/D221102