This is what the documentation says we should be doing (and it's clearly the
right thing to do). We miss decoding a packet otherwise.
Depends on D150974
Differential Revision: https://phabricator.services.mozilla.com/D150975
This patch helps with a high rate of crashes on windows x86, where the GMP
process crashes after _exit(0) while trying to delay-load oleaut32.dll.
Differential Revision: https://phabricator.services.mozilla.com/D154787
The fix is the one line in
nsImageLoadingContent::MaybeForceSyncDecoding, but I added new asserts
that should prevent this from regressing in the future.
Differential Revision: https://phabricator.services.mozilla.com/D154815
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
useful when the string already exists somewhere, or needs to be returned from
a function (so we avoid another conversion when returning).
Differential Revision: https://phabricator.services.mozilla.com/D154618
mWriter is now a reference, and the ownership is optional through a separate
member variable that could stay null.
User can now choose to keep the JSONWriteFunc on their stack, which saves a
heap allocation, and makes it easier to access the concrete JSONWriteFunc
implementation directly (instead of through WriteFunc()).
Differential Revision: https://phabricator.services.mozilla.com/D154617
This test will only pass on platform that accurately report the color
depth in their VideoInfo structures. Presently that is only macOS, so the
test has a conditional task that only runs on macOS.
Differential Revision: https://phabricator.services.mozilla.com/D153284
Some information that VideoInfo needs is not available from the metadata
header. This change makes it so that VideoInfo structure is updated with
color depth information from the VideoData Image as frames come in.
Each Image implementation is responsible for returning the correct
GetColorDepth value. The virtual implementation returns COLOR_8, which
matches the existing default value in VideoData.
Differential Revision: https://phabricator.services.mozilla.com/D153282
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
useful when the string already exists somewhere, or needs to be returned from
a function (so we avoid another conversion when returning).
Depends on D154617
Differential Revision: https://phabricator.services.mozilla.com/D154618
mWriter is now a reference, and the ownership is optional through a separate
member variable that could stay null.
User can now choose to keep the JSONWriteFunc on their stack, which saves a
heap allocation, and makes it easier to access the concrete JSONWriteFunc
implementation directly (instead of through WriteFunc()).
Depends on D154616
Differential Revision: https://phabricator.services.mozilla.com/D154617
When we are rendering dark-on-light text, we invert the bitmap after
rendering to produce a standard white-on-black mask, since we must actually
render that as black-on-white to get CoreText to produce the correct dilation.
However, when we know we're rendering bitmap fonts for emoji, we don't actually
want this inversion to happen at all. So we need to ensure bitmaps go through
the normal light-on-dark path that doesn't do this.
Differential Revision: https://phabricator.services.mozilla.com/D154777
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.
We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.
To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.
This feature is controlled by two prefs:
* browser.opaqueResponseBlocking.syntheticBrowsingContext
This triggers the creation of synthetic documents for images loaded
in <object> or embed.
* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter
This turns on the filtering of synthetic browsing contexts in named
targeting, `Window.length` and `Window.frames`.
Differential Revision: https://phabricator.services.mozilla.com/D148117
If viewport clipping is applied to the bounds of glyphs, we can end up finding the
wrong entry if the clipping would differ, since we no longer compare the bounds to
the entry bounds when searching for a matching entry in an effort to reduce the
amount of bounds computations in the common case.
To workaround this, each entry now remembers its full, unclipped bounds. Upon
finding a candidate entry, we offset the full bounds to the new offset and reapply
clipping. If the bounds then match with the old clipped bounds with the new offset
applied, then we know the amount of applied clipping is the same, and it is safe
to reuse the entry.
Differential Revision: https://phabricator.services.mozilla.com/D154490
If `<a href="...">` element has editable elements and clicked in it, focus will
be moved to the editing host of the clicked element. Therefore,
`Element::PostHandleEventForLinks` shouldn't set focus to the link element in
the case.
Differential Revision: https://phabricator.services.mozilla.com/D154363
Async clipboard API used to have same capability as DataTransfer for clipobard
read operation. But after this patch, we intent to use the nsIClipboard service
directly in async clipboard, which also includes some changes on mime types support
for read operation. Now async clipboard read supports only built-in types, i.e.
text/plain, text/html and image/png. This also align with other browsers.
Depends on D150164
Differential Revision: https://phabricator.services.mozilla.com/D145379
In D145379, ItemEntry will be used in lambda capture, it is much safer to make
it a reference counted object to ensue the captured object lives long enough.
Depends on D152516
Differential Revision: https://phabricator.services.mozilla.com/D150164
Set the Content-Type to an empty string for an blob when the type was not
given. Ensure that the channel Content-Type is not overriden in the case
that it was previously set and the blob type is not valid.
Depends on D147568
Differential Revision: https://phabricator.services.mozilla.com/D147481
- Remove the preference and corresponding tests.
- nsMathMLmencloseFrame continues to implement the radical notation for
now, since it's still used by nsMathMLmsqrtFrame. Ideally, we should
refactor our code so that msqrt/mroot share the same implementation.
Differential Revision: https://phabricator.services.mozilla.com/D154194