Calling CreateReferenceRenderingContext currently returns a non-recording DrawTarget even
when the nsIDeviceContextSpec within the nsDeviceContext has a DrawEventRecorder, due to
bug 1354624. Since we've already called BeginPage we can call CreateRenderingContext instead
though and that will give us a recording DrawTarget as we require to record the canvas drawing.
ScrollFrameActivityTracker::NotifyExpired() will be invoked by
nsExpirationTracker::TimerCallback() from an unlabeled runnable.
We provide a SystemGroup EventTarget for the invocation of this
callback since there's nothing within a page that would rely on
the timer firing at a particular time (i.e., it doesn't matter
when this timer's callback is scheduled, relative to other
runnables dispatched for the page).
MozReview-Commit-ID: 9QEjxCtFhve
--HG--
extra : rebase_source : 06b979835363b9c4288dd218d2a4ca2dc111169b
This patch is just flipping some logic in a way that should produce the same
outcome, so it shouldn't affect behavior.
MozReview-Commit-ID: LM4HbJD3D9w
This patch shouldn't change our layout order or paint order for flex items
(though it will change our behavior for the better when an abspos child is
present, as discussed in bug 1345873).
This patch *will* change the tab-index behavior of flex items. Previously, the
default tab order would match the visual order (i.e. it would respect "order"),
because it depends on the frame tree, and we sorted the frame tree by
"order". Now, the tab-index will come from the DOM order (the unmodified frame
tree), as the spec requires.
MozReview-Commit-ID: 9OsqQX1sEn3
This patch just adds an optional codepath that isn't taken yet, so it shouldn't
affect our behavior. (The next patch in the series will make use of this new
codepath.)
Note: the large code-comment that this patch adds is taken mostly-verbatim from
some nsFlexContainerFrame.cpp code. (The original copy will be removed by the
next patch in this series, when we switch to take advantage of this new
mechanism.)
MozReview-Commit-ID: 9pkJ346rrXg
NotifyApproximateFrameVisibilityUpdate gets the displayport so we want the base rect set before calling it.
We also don't want to record the displayport if we ignored it in the actual visibility pass.
This protects all accesses to the frame property table with a bit stored
on the frame. This means we avoid hashtable operations when asking
about frame properties on frames that have no properties.
The changes to RestyleManager, and the new HasSkippingBitCheck API, are
needed because RestyleManager depended on being able to ask for
properties on a deleted frame (knowing that the property in question
could not have been set on any new frames since the deleted frame was
destroyed), in order to use the destruction of the properties that
happens at frame destruction as a mechanism for learning that the frame
was destroyed. The changes there preserve the use of that mechanism,
although it becomes a bit uglier. The ugliness is well-deserved.
MozReview-Commit-ID: BScmDUlWq65
--HG--
extra : transplant_source : %C8%C0%CD%DC%12g%5B%8ER%3A%FF%A7a%F8%91%D4%2C%9BF%2B
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed. I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.
This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.
MozReview-Commit-ID: IJ9JnGzdH51
--HG--
extra : transplant_source : %D4%DF%04%91_q%E6%CF%B3N%82%2C%A5%CB0%3A%B6%810%ED
This replaces the usage of |PR_LogPrint| with either |printf_stderr| or
|MOZ_LOG| where appropriate. |printf_stderr| is used where a logger is not
actually available or if log levels are not being used as expected.
This protects all accesses to the frame property table with a bit stored
on the frame. This means we avoid hashtable operations when asking
about frame properties on frames that have no properties.
The changes to RestyleManager, and the new HasSkippingBitCheck API, are
needed because RestyleManager depended on being able to ask for
properties on a deleted frame (knowing that the property in question
could not have been set on any new frames since the deleted frame was
destroyed), in order to use the destruction of the properties that
happens at frame destruction as a mechanism for learning that the frame
was destroyed. The changes there preserve the use of that mechanism,
although it becomes a bit uglier. The ugliness is well-deserved.
MozReview-Commit-ID: BScmDUlWq65
--HG--
extra : transplant_source : %95%A2%9B%A1M%1F%86%A8%E0%FF%7B%E4%83%24%83%16%BE%FA%08T
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed. I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.
This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.
MozReview-Commit-ID: IJ9JnGzdH51
--HG--
extra : transplant_source : %91%D6%C7%01hC%B3z%90%B6%93%93qcAK%CB%09%D6z
This switches over layout's usage of PLArena to ArenaAllocator. This allows
us to build more files in unified sources and gets rid of various CONST masks.
MozReview-Commit-ID: Aaf3Dl2kaoz
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
Note that this removes the useless (because this anon box is never absolutely
positioned) "clip: inherit" style.
MozReview-Commit-ID: iJJdv5VL06
--HG--
extra : rebase_source : d7a8697a89391eb6a80683dcbe8e3fa6f76c6a41
This makes the display-reflow information for
layout/reftests/w3c-css/submitted/css21/pagination/moz-css21-float-page-break-inside-avoid-4.html
more clear, since it means we include previously-omitted
inline-break-before statuses (not really inline in this case!), such as:
status=[Complete=Y,NIF=N,Truncated=N,Break=B,FirstLetter=N]
It was useful when debugging various tests for bug 1308876.
MozReview-Commit-ID: AL38FH6wuOa
--HG--
extra : transplant_source : 15%21%86%3C%1B%5C%C5s%7C9%26%FEo%B5%20%F7%E6%E4x
::first-letter is not support by stylo yet. (bug 1324618)
MozReview-Commit-ID: KwQk2jhn53c
--HG--
extra : rebase_source : 9bafad53a38fd11aae7be09780ee7680d9a40e1c