In nsDisplayListBuilder keep track of the total area of frames which
have been made animated geometry roots due to having animated offset or
margin properties. This is in order to reduce the total area of created
layers. Once the area has reached a certain limit do not allow any more
frames to be AGRs for this reason.
Currently this only applies to AGRs created due to frames having
animated offset or margin properties. This is because we believe this is
a major source of over-layerisation and too high memory usage. This
could easily be extended to include the creation of AGRs due to other
reasons too.
Note that this technically limits the area of AGR frames, not the area
of layers, though it will have a fairly direct impact.
MozReview-Commit-ID: BvgRrC8KMIp
--HG--
extra : transplant_source : %F3rp%193%1A%E4i%8B%E8%24%B1%FE%81%C2U%F8%3A%AEQ
Bug 1241917 made it so that a subframe's displayport base is restricted
to the root composition bounds (in addition to its previous
restrictions). This involved an expensive coordinate transformation
causing a scrolling performance regression.
This avoids restricting the displayport base to the root composition
bounds unless the frame has a display port, avoiding the expensive
computation unless necessary.
MozReview-Commit-ID: FVacUscAfu2
--HG--
extra : transplant_source : %F9%E9%19%06/%9C%EA%8C%D1%D5%BD%ED%26C%97y%15%92%7E%CB
After calling FlushLayout(), PresShell::Destroy() might be called and we
should consider PresShell and other resources will be no longer valid.
Before this patch, AccessibleCaretManager and AccessibleCaret(s) are
deallocated in PresShell::Destroy(). However FlushLayout() are all
invoked in AccessibleCaretManager, we need to keep manager alive to
clean up after PresShell::Destroy().
This patch makes AccessibleCaretManager live after PresShell::Destroy(),
and use IsTerminated() to check whether PreShell is vaild after each
FlushLayout() calls.
Note that event though AccessibleCaretEventHub will be unref in
PresShell::Destroy(), all the callers to AccessibleCaretEventHub's
public methods already add a ref to AccessibleCaretEventHub. So we don't
need to worry about AccessibleCaretEventHub and AccessibleCaretManager
die immediately after PresShell::Destroy().
MozReview-Commit-ID: DDpXZ7v3zyo
--HG--
extra : rebase_source : 2698f0313e394b64ff8caacf21493c874510a7ce
Fennec enables sCaretsExtendedVisibility which uses
Appearance::NormalNotShown instead of Appearance::None to keep actionbar
shown during scrolling. This breaks selection mode update when the
positions of the carets are not changed after scrolling.
To fix this, we need to implement appearance recovering for selection
mode scrolling like we did for cursor mode in bug 1212732, and make
UpdateCaretsForSelectionMode() respects UpdateCaretsHint.
MozReview-Commit-ID: LkfUIGKHL0h
--HG--
extra : rebase_source : 2e68786e09046967f7c6af16fa6b393f133dc12c
Pings are sent in the implementations of the nsISelectionController methods
ScrollLine, ScrollPage, ScrollCharacter, and CompleteScroll. It is assumed
that these methods are triggered by keyboard input.
A small number of false positives can occur if these methods are called
in response to something other than keyboard input; this is considered
acceptable.
--HG--
extra : commitid : JDXW8ptuXkF
extra : rebase_source : c45fe2b16484ad370edb852d8eafbc76ca7d0bac
extra : amend_source : b4af21228768221211a42c11a2ff306a6f2bb402
extra : histedit_source : 7cdc4b4df3579682fad194ddfc04c7a5d02c0d3e
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check
- the outdated 0666 octal constant is still parsed correctly,
- the outdated 0666 octal constant raises syntax error flag
in strict mode, etc.
So leave them alone.
Add helper function nsIFrame::In3DContextAndBackfaceIsHidden() which
checks both if a frame is backface-hidden and whether it is within a
3D-transform context.
In FrameLayerBuilder, check this function rather than BackfaceIsHidden()
to determine whether a frame needs a backface-hidden layer. This will
avoid creating unnecessary extra layers for non-3d-transformed items
which for some reason have backface-hidden set.
I confirmed locally that this patch does fix the assertion in the
crashtest.
MozReview-Commit-ID: L1TIAZZ1aNu
--HG--
extra : transplant_source : %FE_N%7D%AE%11%0D%92B%93%F6%3D%CFyY%3D5%7EFt
I confirmed locally that, without the following patch, the crashtest
harness does detect the single assertion.
MozReview-Commit-ID: FRkCdxSSa7V
--HG--
extra : transplant_source : xF%BC%7E%03%B3%1Bp%EF%07%D9%28%F6C%B5s%C7%C2%15%C1
Also I removed the 'explicit' keywords from the constructor since they have no
argument so nothing can be implicited converted to them.
MozReview-Commit-ID: GrFcqO0Uf1o
--HG--
extra : rebase_source : 5994787b7feccf409db1faf6359676b5170ea203
extra : source : a27cd3e26cc146006db501efb86b54b097f28b57
In order to convert CSSPseudoElementType into its underlying type easier,
we define CSSPseudoElementTypeBase. However, keep using uint8_t directly for
forward declarations.
Using explicit iteration at measurement sites is much simpler and nicer than
using callbacks.
--HG--
extra : rebase_source : 8b3f7aa702743b665383766b66a866a2c3d17240
Also I removed the 'explicit' keywords from the constructor since they have no
argument so nothing can be implicited converted to them.
MozReview-Commit-ID: GrFcqO0Uf1o
--HG--
extra : rebase_source : c4747c5e3ea09ddfc08bfc1b0c8e4bcedb1d75ce
extra : amend_source : 6289aaff79b22956b72956734e4d99bdd3b7977d
After calling FlushLayout(), PresShell::Destroy() might be called and we
should consider PresShell and other resources will be no longer valid.
Before this patch, AccessibleCaretManager and AccessibleCaret(s) are
deallocated in PresShell::Destroy(). However FlushLayout() are all
invoked in AccessibleCaretManager, we need to keep manager alive to
clean up after PresShell::Destroy().
This patch makes AccessibleCaretManager live after PresShell::Destroy(),
and use IsTerminated() to check whether PreShell is vaild after each
FlushLayout() calls.
Note that event though AccessibleCaretEventHub will be unref in
PresShell::Destroy(), all the callers to AccessibleCaretEventHub's
public methods already add a ref to AccessibleCaretEventHub. So we don't
need to worry about AccessibleCaretEventHub and AccessibleCaretManager
die immediately after PresShell::Destroy().
MozReview-Commit-ID: DDpXZ7v3zyo
--HG--
extra : rebase_source : 280e2512fb9f28d933f5b8d65a9f303ac81c58e5
extra : source : 10e71da98b144fbf42aaa81a1056910a3766a6cb
Fennec enables sCaretsExtendedVisibility which uses
Appearance::NormalNotShown instead of Appearance::None to keep actionbar
shown during scrolling. This breaks selection mode update when the
positions of the carets are not changed after scrolling.
To fix this, we need to implement appearance recovering for selection
mode scrolling like we did for cursor mode in bug 1212732, and make
UpdateCaretsForSelectionMode() respects UpdateCaretsHint.
MozReview-Commit-ID: LkfUIGKHL0h
--HG--
extra : rebase_source : 0ef8d28ce55c3ddd29ea32ee6888ee7fe14c34ad
extra : source : bc3e37b63defca87d0de165fe167ef7f8a7db651
- Generate and pass sequential frame indexes into the ovr_GetTrackingState call and the corresponding call to ovr_SubmitFrame
MozReview-Commit-ID: 5tJl5YJt7Eo
--HG--
extra : rebase_source : 5dbb35ea1451a9f378e28d81a8704b63b1b72b4d
In ActiveLayerTracker check if the value of a property has actually
changed, rather than being set to its existing value, before treating
the property as animated. This will help avoid over-layerization of some
frames.
On Fennec, it's possible that after automatically zooming an editable
input, the mImaginaryCaretRect for the caret remains the same. Only the
zoom level is changed. Therefore, the zoom level should also be
considered to determine whether the position is changed or not so that
the caret can get updated.
MozReview-Commit-ID: CrictS4S0Yl
--HG--
extra : rebase_source : f26f89cb72a9ae8a55104054121486a67e841513
It's not obvious that it does this (unless you read the comment or the code), and we don't gain much by doing it.
Also we need to split it up for the next patch in this bug.
- The VR specific render path in ContainerLayerComposite does not
handle nsBackdropFrame correctly, resulting in a alternate frame
strobing effect in the Oculus Headset. As VR content is composed
of a Canvas element that is scaled to the extents of the surface,
the backdrop would otherwise not have an effect for VR content,
which means we can simply suppress the backdrop.
MozReview-Commit-ID: 3bCTOApiH8E
--HG--
extra : rebase_source : 015e15dee2ac3235e1e571642d3988b66b97dfd1
CLOSED TREE
Backed out changeset dbadb8fe5803 (bug 1216001)
Backed out changeset a30593ebd58e (bug 1216001)
Backed out changeset c1646ffa71b4 (bug 1216001)
There is an ImportError on Android, as well as a log related
regression from the structured log patch once that is fixed.
MozReview-Commit-ID: KxSEotr38qO
--HG--
extra : rebase_source : 15d8421aab813d9e0dbf6d00611f921aaa779a49
To retain backward compatibility, <details> tags should not collapse its
children when dom.details_element.enabled = false.
--HG--
extra : rebase_source : 6b47e64672720ffecd23f670c31de1c7d92bee8c
test_value_storage.html needs floating point numbers to round trip through css
parsing and serialization, but floating point isn't exact so we should be
careful what numbers we test. It turns out the value 0.9 the test was using is
close to the border between 229 and 230 when converted to an 8 bit int, but 0.8
is safer so change to that since the test doesn't depend on the value. Note
that this does not fix the issue that numbers don't always round trip, but only
wall papers over it by changing the test.
Structured logs bring many benefits. We can stop parsing the logs for magic strings, we
can modify the format without breaking things, and we can stream results into systems like
ActiveData. The structured logs originate primarily in reftest.js. StructuredLog.jsm is
used to generate the JSON-based log stream. Finally OutputHandler in the python harness
reads structured output from stdout, and formats it into human readable form.
MozReview-Commit-ID: G3ZLkMRl6p7
--HG--
extra : commitid : J3ui9XYWR3Q
extra : rebase_source : 77ed0ba842cc8e557141fb3494212b06868c728a
extra : amend_source : 735d48225a2e627e0fe45fc11b50b6c49a885a4b
extra : source : d1779fe421c3c7cd8e3d191816776390dc104f37
This is a regression by "Bug 1121468 - Go to NoActionState after
receiving release on LongTapState."
When receiving a scroll event in LongTapState, i.e. apz starts, we
should call OnScrollStart() and move to the ScrollState.
--HG--
extra : commitid : GsQNnTtqhzh
extra : rebase_source : 0a6ad44a4bf97ed15b374094929df5409deeba41
This means that we won't associate animations with additional frames.
In this case, this fixes associating off-main-thread animations with a
table outer frame, when they should have been associated only with the
table frame.
Locally, the test fails without the patch (with opacity in the test
being 0.36 instead of the expected 0.6), and passes with the patch.
(Opacity 0.36 gives a color of rgb(163,163,255), whereas 0.6 gives
rgb(102,102,255).)
--HG--
extra : commitid : 7wtkIDLDHBF
Without this patch, patch 2 will cause assertions since
nsFrame::DestroyFrom calls nsFrame::HasCSSAnimations (at a time when the
child frame has been destroyed), which calls into the code modified in
patch 2 to call GetStyleFrame.
--HG--
extra : commitid : EkhtcNIf7ye
Structured logs bring many benefits. We can stop parsing the logs for magic strings, we
can modify the format without breaking things, and we can stream results into systems like
ActiveData. The structured logs originate primarily in reftest.js. StructuredLog.jsm is
used to generate the JSON-based log stream. Finally OutputHandler in the python harness
reads structured output from stdout, and formats it into human readable form.
--HG--
extra : commitid : J3ui9XYWR3Q
extra : rebase_source : 6bae978126dbd5beddc39332c7cbce0c1354cd87
extra : amend_source : 735d48225a2e627e0fe45fc11b50b6c49a885a4b
Previously displayport bases were computed as the intersection of the
scrollport with the dirtyrect. However the dirtyrect covers what is
rendered, and with displayports what we render can be much larger than
what is visible. With displayport bases intended to represent what was
visible, this was a problem. By restricting them to the root composition
size this makes them more closely match what is visible. To do this more
properly we'd want to intersect the dirtyrect with the scroll clip of
every ancestor scroll frame, not just the root composition bounds.
When double-clicking on a default anonymous <summary> element, the first
eMouseClick will make the summary element being removed from the
document. This generates an assert in
PresShell::HandleEventWithTarget().
To prevent this assert, ensure the mouseContent is in document before
dispatching the eMouseDoubleClick event.
Since GetCrossShadowCurrentDoc() was deprecated, replace it with
GetComposedDoc().
--HG--
extra : commitid : K9pCdof8z3f
extra : rebase_source : 3adfdb9938de30fd0ca365168c33dcdcef8ca285
If a <details> lacks a direct <summary> child, we need to construct a
default one.
--HG--
extra : commitid : ApnP20Mrr33
extra : rebase_source : 4b059f4e7fa32bac665487aa8a266ba58597b184
Our behavior on these tests is reasonably close to matching Chromium
thanks to the combination of patches 1, 3, and 4, and 5.
--HG--
extra : commitid : BzErQKgv86B
This restores the quirky behavior for text inputs, which was removed by
patch 2, but only halfway (for width but not max-width), which matches
Chromium and Edge.
--HG--
extra : commitid : 7uk3XdYc1LC
This just reorders the if-else chain to change which conditions are
tested first. Prior to patch 1, the order didn't matter, but with patch
1, the order does matter, and the order that we happened to have was the
opposite of the one that matches Chromium and Edge.
--HG--
extra : commitid : 6sFft3gnM2g
This reduces the set of elements to which this quirky behavior applies.
This matches the behavior of Chromium and Edge.
--HG--
extra : commitid : 9qz7ODJhNzS
This (modulo changes in later patches) matches the behavior of Chromium
and Edge. It increases the set of elements to which this quirky
behavior applies.
--HG--
extra : commitid : 4nWEgnUB0rt
What's happening here is that we enter an infinite loop by oscillating
between two states. The code assumes that (a) the available space will
never grow, only stay the same or shrink, and (b) that we should break
out of the loop if it stays the same. This also means we hit the
assertion about the available space growing every other time through the
loop.
This is in the inner loop in nsBlockFrame::ReflowBlockFrame that was
introduced in https://hg.mozilla.org/mozilla-central/rev/80ef9bb2c2e9 .
The problem is fundamentally a logic error in that code. The makes the
assumption that if you reduce the width available to a block formatting
context or replaced block-level element, its height does not shrink.
(The "replaced block" (really block formatting context) in this case, as
in the original testcase, is a scroll frame. I didn't debug the
original testcase enough to figure out what caused its sizing
characteristics, although a percentage-width image does seem like the
most likely candidate.)
Without the patch, the reftest test (but not reference) hangs, as does
the semi-simplified test in the bug (given a narrow window).
With the patch, neither the semi-simplified test in the bug nor the
reference hangs, and the reftest passes.
--HG--
extra : commitid : APy8PfXlvvz
Per request in bug 1240917 comment 15, we decided not to show caret when
single press on an empty input. This effectively reverts the work in Bug
1230582.
--HG--
extra : commitid : IjKGpqAR6zP
extra : rebase_source : d476618b4f419cf2d96bb33264cfd8ccb6e3fa61
nsImageFrame::OnSizeAvailable will update the intrinsic ratio and ask for a reflow. Then nsImageFrame::NotifyNewCurrentRequest will be called when the image is finished loading. It previously would do a predictive decode if the intrinsic size hadn't changed.
This was a mistake in http://hg.mozilla.org/mozilla-central/rev/146f1bea4147 (bug 1151359).
OnSizeAvailable has this structure:
if (intrinsicSizeChanged && gotInitialReflow) {
if (!sizeConstrained) {
requestReflow();
}
}
NotifyNewCurrentRequest has this structure:
if (gotInitialReflow) {
if (!sizeConstrained && intrinsicSizeChanged) {
requestReflow();
}
}
Bug 1151359 added a predictive decode in a new else branch to both inner if statements. The meaning of this is obviously quite different.
This changes some function signatures to take a nsTArray<T>& instead of a
FallibleTArray<T>& because AutoTArray does not inherit from FallibleTArray.
This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
This refrest fails on MacOS 10.10 debug build on try server.
* This failure can not be reproduced on local MacOS 10.10. (as far as I tried)
* Removing all '東京特許許可局' in the table does not cause the intermittent failure.
* Removing all words whose font is thinner than 500 does not cause the intermittent failure.
* Using only one downloadable(mplus-1p-medium) font does not cause the intermittent failure.
I am going to investigate the failure reason in the future when I get to know more about layout codes.
Nothing() represents linear function, i.e. skip calculation.
ParseEasing is changed to return a Maybe<ComputedTimingFunction>,
if timing function is linear function, ParseEasing returns Nothing().
This is a patch for compositor side to represent linear function as null_t/Nothing().
Also the first argument of ToTimingFunction changes to a Maybe<ComputedTimingFunction>.
As a result of this change we can also use ToTimingFunction for animation
effect's timing function.
This changes some function signatures to take a nsTArray<T>& instead of a
FallibleTArray<T>& because AutoTArray does not inherit from FallibleTArray.
This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
This adds the value -moz-window-dragging: default as the initial value of the property,
and makes it a [reset] property. This allows us to change the way the window dragging
region is calculated: Elements with -moz-window-dragging: no-drag will now always be
undraggable, even if they are overlapped by -moz-window-dragging: drag elements. That
way we can keep the region calculation simple and don't have to add code to respect
z-ordering.
--HG--
extra : commitid : GX3ApAyzKi7
extra : rebase_source : 61cab4e535c6c5da75fe79eb1886b6c5b7d136ea
extra : amend_source : 0f461782b8f65eca1009c2f6c192b5b80b908233
Since nsIFrame::GetChildList() is a const function, PrincipalChildList()
should be a const function as well.
--HG--
extra : commitid : Hjvhy6cUWTF
extra : rebase_source : 0a998e5420b81827e478b403744cd9e5a11eb584
By changing signature of those two functions, we make compiler complain about
all their existing uses, so we can find all of them and convert them.
Some of the callsites of Get() with those properties are also converted, but not
all of them. It is fine because if there is any incorrect conversion, compilers
is able to find out now. So they are completely typesafe.
--HG--
extra : source : 808415985d3d446f18941eb007a9be9d69d180ce
This patch makes methods of FramePropertyTable and FrameProperties to be
simple template wrapper functions. Then it converts all references to
FramePropertyDescriptor to use "void" parameter to simulate the current
unsafe behavior.
SmallValueHolder is used for storing small values like int32_t, float,
which can fit in the size of a pointer directly, and thus no lifetime
management is needed.
--HG--
extra : source : 88b2723cddf119d73d8a442d8238b50406e9d604
Note that nsMathMLContainerFrame and its subclasses are unchanged since
they are not target of fullscreen (and thus no backdrop frame), and they
have an assertion to ensure we really don't pass any unexpected list in.
--HG--
extra : source : a1f7ff18a69cc116120de33f14ae62f576a4b55a
Also, add an opt-out for crashtest/reftest for the view-source thing so they don't all break, r=bz
--HG--
extra : commitid : 8NqvmbphSgh
extra : rebase_source : bbe0b6f11a77d7e6241a5733931d9baa95bb3fed
This makes the state change match the user action. No functionality
changes is expected.
--HG--
extra : commitid : 4MyRasp0lRE
extra : rebase_source : 611819cb3419ffdf76a002d937f3541dc285ef4d
The blur event will hide the carets and produces a standalone selection
highlight without carets. When a user long-pressing on the highlight, we
should show carets for the original selection highlight instead of
select a new word.
The helper UpdateCaretsWithHapticFeedback() should only be needed when
long-pressing. It should suffice to live within SelectWordOrShortcut()
instead of being a member function.
--HG--
extra : commitid : 789VwIRV03I
extra : rebase_source : ef4e9dd1260cec7fd900f68aacdc405bc018b3ce
Both 'auto' and 'auto*' do not change the type inference. However, auto*
make 'self' only accept a pointer which is our intent here.
--HG--
extra : commitid : IvzkNKYE1Q4
extra : rebase_source : 7ea447ff8dae04751afe5ab3e5c84231a5fb8649