This fixes the failure of
layout/reftests/css-grid/grid-min-max-content-sizing-002.html with the
primary patch in bug 1308876 (which causes a child whose parent is dirty
to pick up the dirty bit from the parent only the first reflow of the
child if the parent reflows the child multiple times). A simplified
testcase for that failure is
https://bugzilla.mozilla.org/attachment.cgi?id=8849771 .
The failure was caused by an error in height calculation of the first
<x> in the test. The div that is the parent of that x has a definite
height (presumably due to rules in grid), and the x has a specified
height. The div gets three reflows: two measuring reflows (from
MinContentContribution and then from MaxContentContribution) and then a
final reflow from nsGridContainerFrame::ReflowInFlowChild. Prior to the
primary patch in this bug, the div was marked dirty on all three
reflows, but with it it is marked dirty only on the first. This means
that, without the block-resize flag, the div optimizes away the reflow
of its children, since ShouldReflowAllKids returns false because
IsBResize() is false, even though NS_FRAME_CONTAINS_RELATIVE_BSIZE is
correctly set.
In order to fix this, we need to make sure the BResize flag on the
reflow state in at least some cases (see the comments in the patch for
when, and for how the cases could be optimized in the future).
Note that:
* when the dirty bit is set on the grid container, the new behavior
(with the combination of the patches) is strictly more efficient than
the old, since we will sometimes do non-dirty reflows on the grid
items (with the b-resize flag)
* when the dirty bit is *not* set on the grid container, the new
behavior is less efficient than the old, since we will set the
b-resize flag when we did not do so before. However, this slowdown
fixes existing bugs such as the one in the reftest.
Given that I was able to construct a reftest that triggers the failure
without the changes from bug 1308876, I've moved this to a separate bug.
Without the patch, grid-measuring-reflow-resize-dynamic-001.html fails,
but grid-measuring-reflow-resize-static-001.html passes. With the patch
both tests pass. (And without the patch, doing a text zoom on the
dynamic test fixes the layout error.)
MozReview-Commit-ID: JQOdVTQIkU0
--HG--
extra : transplant_source : %8B%2ARO%3B%D0%7B%EC%C9_%B3%60Sp%F9T%14X%85%DC
These files were being excluding because we thought they used plarena.h, but it
turns out they did not. A few tweaks needed to be made to clarify whether we
wanted to use mozilla::UniquePtr or js::UniquePtr.
MozReview-Commit-ID: 1su5dO3rR0T
This updates the unifed sources for a few netwerk build files. In some cases
files were excluded because we thought they used plarena.h, but that turned
to be false.
A few files needed to be updated to add missing imports/exports due to shifting
of compilation units.
MozReview-Commit-ID: 4mh8VApFoe1
This changeset updates the handling of the variables based on
chunk.GetDuration() within the OpusTrackEncoder. This changeset alters places
where overflow could have taken place previously. It also adds asserts with
the dual purpose of defense and documentation for future developers.
MozReview-Commit-ID: 28vmAfE84ik
--HG--
extra : rebase_source : ebbd5f0d55c793324aec6b095dbe5403a7bf7b4c
extra : source : 21705a96856dc54a3330de9a55f19eef31badeec
For very long chunks, the opus encoder could run into issues with processing.
This changeset seeks to address that by using CheckedInt to prevent a potential
int overflow when encountering extremely long durations.
MozReview-Commit-ID: 7uLZAARLf5w
--HG--
extra : rebase_source : 9519ce2a9e171c2e56fa445699770ab84596cdad
extra : source : fdbc277dbcc49c3a6785bfefe4ba7d80e03817d2
This adds an arena allocator that can be used as a drop-in replacement for
NSPR's PLArena. Example usage for defining an 8-byte aligned allocator that
uses a 4K arena size:
mozilla::ArenaAllocator<4096,8> a;
void* memory = a.Allocate(200);