Commit Graph

2663 Commits

Author SHA1 Message Date
Ya-Chieh Wu
c470d0ce9d Bug 1381153 - Part 1: Cache MayHaveOpacityAnimation and MayHaveTransformAnimation in nsIFrame. r=mstange, r=mats
There are two places where I have to cache the status of MayHaveOpacityAnimation
and MayHaveTransformAnimation. First place is in |nsIFrame:init()| where an
element is associated with a frame. Second place is in
|KeyframeEffectReadOnly::UpdateEffectSet()| where the script can add animations
on element.

btw I keep the original two flags of MayHaveOpacityAnimation and
MayHaveTransformAnimation in EffectSet because there is no guarantee that
an element has been associated with a frame when we call to |UpdateEffectSet()|.
But we still want to keep the benefits that we can quickly look up
MayHaveOpacityAnimation or MayHaveTransformAnimation. So I keep them in
EffectSet and transfer the status into nsIFrame when we bind an element
to a frame in nsIFrame:Init().

MozReview-Commit-ID: JDwyAQQTKA7
2017-11-13 18:15:00 -05:00
Sebastian Hengst
1f9977f734 merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-11-14 14:48:43 +02:00
Sebastian Hengst
a191aa1438 Backed out changeset 32958aa32cb5 (bug 1415485) for frequently failing for failing reftest layout/reftests/async-scrolling/position-fixed-in-scroll-container.html on Linux x64 QuantumRender. r=backout a=backout on a CLOSED TREE 2017-11-14 14:47:14 +02:00
Miko Mynttinen
209af6ddf3 Bug 1415485 - Make the pref layout.display-list.retain live again r=mattwoodrow
MozReview-Commit-ID: 6QFc4Sq3WiC
2017-11-09 16:10:21 +01:00
Ting-Yu Lin
7170cf8dab Bug 1416962 - Remove the support for disabling "drag and select" on touchable devices. r=mats
The pref "browser.ignoreNativeFrameTextSelection" was used only by B2G, and
currently not enabled elsewhere, so this code is dead now. Also, this
functionality is obsoleted by AccessibleCaret.

MozReview-Commit-ID: 2kHYXLueFH5
2017-11-14 11:22:59 +08:00
Jeremy Chen
bfa4bf8716 Bug 1416689 - fix frame dump code in nsIFrame::ListGeneric. r=TYLin
I believe this is a typo. This fix will not affect the existing frame dump result
because the input parameter, i.e., aTo, has been initialized to empty string by
the caller before calling. So, the first line of nsIFrame::ListGeneric can be
written as:

a) aTo =+ aPrefix;
b) aTo += aPrefix;
c) aTo = aPrefix;

and all three results are the same at present.

In this patch, we fix the typo by choosing (b) to make it align the rest parts
of nsIFrame::ListGeneric.

MozReview-Commit-ID: CHJDyVSJj5W
2017-11-13 17:12:03 +08:00
Chris Peterson
c5d0841695 Bug 1416164 - Replace NS_POSTCONDITION with MOZ_ASSERT. r=froydnj
MozReview-Commit-ID: 9K3Ksf36uxr
2017-11-04 22:48:48 -07:00
Matt Woodrow
5d70087147 Bug 1413073 - Part 3: Recompute ASR and clip-chains on wrap lists when merging. r=mstange 2017-11-10 13:16:55 +13:00
Kartikaya Gupta
8bfdaafe71 Bug 1415225 - Small early-exit optimization. r=botond
MozReview-Commit-ID: A3UuqKKOsjA
2017-11-09 09:03:52 -05:00
Mats Palmgren
2544eb586c Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Matt Woodrow
a853c7cd03 Bug 1414397 - Make sure we properly invalidate the entire frame subtree when detecting a caret frame change. r=miko 2017-11-08 15:33:34 +13:00
Matt Woodrow
95c277a7f0 Bug 1412110 - Make sure we build a wrap list for the caret frame, since it will have multiple display items. r=miko 2017-11-08 15:32:27 +13:00
Matt Woodrow
c8fd52f4c3 Bug 1413833 - Don't use WeakFrame for the modified frame list since get slow with large numbers of frames. r=miko 2017-11-08 15:25:44 +13:00
Matt Woodrow
ef713ab44c Bug 1413833 - Cap the number of modified frames that we track to avoid the overhead getting too large. r=miko 2017-11-08 15:23:34 +13:00
Sebastian Hengst
ca62aaeac7 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-11-07 02:47:30 +02:00
Mats Palmgren
0fe608900c Bug 1400618 part 6 - Remove the workaround for the broken IsPrimaryFrame() in nsFrame::DestroyFrom since it now works also for NAC frames. r=bz
MozReview-Commit-ID: 1DFyWZBpzwP
2017-11-07 01:20:34 +01:00
Mats Palmgren
26c8be1e23 Bug 1400618 part 2 - Remove the nsIFrame::GenConProperty property and make aPostDestroyData deal with unbinding it. r=bz
MozReview-Commit-ID: HJ5OTJ4v4Y1
2017-11-07 01:20:34 +01:00
Mats Palmgren
616f910f82 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Hiroyuki Ikezoe
0df8b63109 Bug 1414690 - Remove nsIFrame::IsPseudoStackingContextFromStyle. r=dholbert
The last places that call this function have been removed in
https://hg.mozilla.org/mozilla-central/rev/0f7e0529ee3f,
and never been used since then.

MozReview-Commit-ID: FQtnwRHQ8cH
2017-11-06 09:18:27 +09:00
Markus Stange
6d9891d83a Bug 1414097 - Convert nsDisplaySelectionOverlay to WebRender. r=ethlin
MozReview-Commit-ID: 5icpe4OR0Qa
2017-11-02 19:43:08 -04:00
Botond Ballo
031df70d41 Bug 1382534 - Try to give nsDisplayMask items proper scroll metadata. r=mstange
MozReview-Commit-ID: L6kYkzC1F8S
2017-10-20 18:16:50 -04:00
Daniel Holbert
8fea3c215f Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK
2017-10-27 10:33:53 -07:00
Sebastian Hengst
274ffbb5a5 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-27 00:00:25 +02:00
Hiroyuki Ikezoe
6e34a2f0f4 Bug 1409166 - Check whether the target animating frame is scrolled out of each scrollable ancestor. r=birtles,mattwoodrow
Before this patch, we had been checking each scrollable ancestor is scrolled
out of its scrollable ancestor.  So if the target animating frame is at the
bottom of its scrollable parent and if half of the scrollable parent is
scrolled out of its ancestor, the animating frame was considered as 'in-view'.

MozReview-Commit-ID: BDueuF3cT4I
2017-10-26 18:09:32 +09:00
cku
f52362de29 Bug 1402157 - Disassociate a frame with an image loader if that frame indeed has any image request. r=heycam
Before enable stylo, an image request is always been resolved before the
creation time of that request object[1].
As a result, in AddAndRemoveImageAssociations, we always associate the request
objects of style images with the given frame(since they are resolved).

After enable stylo, an image request is resolved after that object been created[2].
We may hit the assertion reported in this bug by the following senario:
1. AddAndRemoveImageAssociations is called. The image request is not resolved
   yet, so we do not associate that frame with that image request.
2. That image request is been resolved via nsStyleXXXX::FinishStyle.
3. Style changed. AddAndRemoveImageAssociations is called again. We try to
   dis-associate the frame with image request and hit this assertion since
   this frame is not associate with any image request at step #1.

[1]
We use this constructor if the backend is gecko
https://hg.mozilla.org/mozilla-central/file/5ed2f3c94155/layout/style/nsStyleStruct.cpp#l2131
[2]
We use this constructor if the backend is stylo
https://hg.mozilla.org/mozilla-central/file/5ed2f3c94155/layout/style/nsStyleStruct.cpp#l2147
MozReview-Commit-ID: 22trSbdogUH
2017-10-13 14:03:44 +08:00
Matt Woodrow
23385146c1 Bug 1405146 - Don't make the decision to build nsDisplayWrapList based on the number of child items, since this can vary when doing partial display list builds. r=mstange 2017-10-25 14:17:25 +13:00
Matt Woodrow
e3ab3eecac Bug 1411426 - When deleting a frame, make sure we invalidate any frames that had display items dependent on us so that they get rebuilt. r=miko 2017-10-25 12:15:11 +13:00
Matt Woodrow
bace862100 Bug 1404181 - Part 27: Add some retained-dl debugging tools. r=mstange
MozReview-Commit-ID: EQO1lAbUnpY
2017-10-21 16:54:24 +13:00
Matt Woodrow
02f1e24195 Bug 1404181 - Part 24: Rebuild all display items when we encounter a blend mode, since we can't easily track changes to whether we need the blend container or not. r=mstange
MozReview-Commit-ID: 9vw1vgDUp60
2017-09-29 10:56:31 +13:00
Matt Woodrow
5475958284 Bug 1404181 - Part 22: Make sure we mark frames as modified any time they change position or style data and make sure we don't accidentally mark the root as being modified when we don't need to. r=mstange
MozReview-Commit-ID: J5ov5cwvvrE
2017-09-29 10:51:49 +13:00
Matt Woodrow
163895d5c2 Bug 1404181 - Part 21: Add RetainedDisplayListBuilder with the code for doing partial display list builds, and merging it into an existing display list. r=mstange
MozReview-Commit-ID: 8pZG5xq3nSB
2017-10-18 16:09:07 +13:00
Matt Woodrow
de10332349 Bug 1404181 - Part 20: Add code to override the display list builder dirty area for a stacking context or displayport. This lets us restrict partial building to within one of these contexts. r=mstange
MozReview-Commit-ID: Dn46eaqeyPX
2017-09-28 14:23:03 +13:00
Matt Woodrow
054cf34569 Bug 1404181 - Part 17: Track will-change contributions per-frame so that can remove contributions from invalidated frames. r=mstange
MozReview-Commit-ID: 54LwXKkjfFX
2017-09-28 13:53:25 +13:00
Matt Woodrow
2c41044ac8 Bug 1404181 - Part 15: Add the notion of 'modified' frames, that need new display items built for them (and all their descendants). r=mstange
MozReview-Commit-ID: 66vbfSDeOpK
2017-09-28 14:20:13 +13:00
Matt Woodrow
6f5cac7650 Bug 1404181 - Part 9: Add code for detecting if display list building happened for a given frame, and use it to add some tests for retained display lists. r=mstange
MozReview-Commit-ID: AIb0AWU7iiS
2017-09-27 17:17:11 +13:00
Matt Woodrow
bbae43b96d Bug 1404181 - Part 5: Store an annotated list of rectangles in nsDisplayLayerEventRegions so that we can remove contributions that belong to invalidated frames. r=mstange
MozReview-Commit-ID: G2kTPnrhxs4
2017-10-21 21:01:50 +13:00
Matt Woodrow
97bacba1d6 Bug 1404181 - Part 3: Track the current set of alive display items on nsIFrame. r=mstange
MozReview-Commit-ID: BgB1XBMpJ8t
2017-09-27 15:35:29 +13:00
Matt Woodrow
90fe1ff121 Bug 1404181 - Part 2: Track a 'visible' rect for display list building as well as the 'dirty' rect, so that we can do partial building by specifying a smaller 'dirty' rect. r=mstange
MozReview-Commit-ID: 7DUV9dl4zb1
2017-10-04 14:28:38 +13:00
Hiroyuki Ikezoe
5ddf2667fa Bug 1385013 - Check all vertexes for the target frame are outside of the parent frame if the target frame is empty. r=birtles
We create empty rectangle (zero-height or zero-width) frame for element which
has no content inside it, e.g.  '<p></p>'.  And nsRect.Intersects returns false
if either of the rectangles are empty, so if we check
!transformedRect.Intersects(scrollableRect) and transformedRect is empty, we
will end up returning true from IsFrameScrolledOutOfView even though the point
represented by the empty transformedRect might be inside the
scrollableRect.

The reftest causes timeout without this fix since the animation never updates
after the initial paint.

MozReview-Commit-ID: FymFJfjxyGc
2017-10-18 10:43:22 +09:00
Ya-Chieh Wu
bdb5eed911 Bug 1410826 - Check IsPrimaryFrame() first in nsIFrame::HasAnimationOfTransform. r=mats
MozReview-Commit-ID: BFJGmr19ESL
2017-10-25 20:11:00 -04:00
Matt Woodrow
24ca46729c Bug 1406727. r=mstange,froydnj a=abillings 2017-10-17 15:19:44 +13:00
Hiroyuki Ikezoe
0715b582fd Bug 1406211 - Check whether the frame is one of continuation or ib-split-sinbling frames for animating element in nsIFrame::HasOpacityInternal(). r=dbaron
We need this change to generate nsDisplayOpacity for the continuation or
ib-split-sibling frames other than the first continuation so the opacity
animation on the continuation frames runs on the compositor.
When we generate an nsDisplayOpacity, the animation runs on the compositor,
but when we don't, the animation never updates since the animation is throttled
on the main thread.

MozReview-Commit-ID: DESftTLt0wq
2017-10-15 09:56:17 +09:00
Hiroyuki Ikezoe
ae86782910 Bug 1406211 - Early return from nsIFrame::HasOpacityInternal if there is no EffectSet for the frame. r=dbaron
If there is no EffectSet for the frame, it means no animation runs on the
element for the frame.

MozReview-Commit-ID: Ev9Hf3jquvU
2017-10-15 09:56:17 +09:00
Boris Zbarsky
007534b28e Bug 1397815. Add memory reporting for button frame's mInnerFocusStyle and other additional style contexts. r=emilio
MozReview-Commit-ID: cJar2LDrCt
2017-10-13 14:26:55 -04:00
Cameron McCormack
b8dd60db88 Bug 1407246 - Split out Variables struct difference calculation. r=emilio
MozReview-Commit-ID: CtWtG3zkD1D
2017-10-12 09:12:30 +08:00
Nicholas Nethercote
7dbfdaf890 Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP
2017-10-03 09:05:19 +11:00
L. David Baron
374598ba46 Bug 1405875 - Remove old dump/compare regression data methods on frames, and nsIFrameUtil interface and implementation. r=mats
These became unused as a result of the removal of nsRegressionTester and
the removal of the printing debug file mechanism, earlier in this patch
sequence.

MozReview-Commit-ID: 9Tftf2AjpPb
2017-10-05 11:15:57 -07:00
cku
3460667562 Bug 1343147 - Part 1. Do not double applying transform vector of the root frame in a glyph mask into the target context. r=mstange
When we generate the glyph mask for a transformed frame in
GenerateAndPushTextMask, the transform vector had been applied into aContext[1],
so we should find a way to prevent applying the vector again when painting the
glyph mask.

In bug 1299715, I tried to prevent double apply at [2], it caused two problems:
1. We only skip generating nsDisplayTransform, but we may still create a
nsDisplayPerspactive bellow. Since the parent of a nsDisplayPerspective must be
a nsDisplayTransform, which have been ignored, so we hit this assertion.
2. We skip all transform for all frames while painting the glyph mask, which is
not correct. We should only skip double applying transform vector of the root
frame.

This patch fixes both of these issues:
a. We will still create a nsDisplayTransform for the root frame if need. But
the transform matrix we apply into the target context will be an identity
matrix, so we fix #1 above.
b. In #a, we change the transform matrix to an identity matrix only for the root
frame of the  glyph mask, so we fix #2.

[1]
https://hg.mozilla.org/mozilla-central/file/59e5ec5729db/layout/painting/nsDisplayList.cpp#l752
[2]
https://hg.mozilla.org/mozilla-central/file/ce2c129f0a87/layout/generic/nsFrame.cpp#l2806

MozReview-Commit-ID: 973lkQQxLB6
2017-10-03 11:29:19 +08:00
Hiroyuki Ikezoe
360781b203 Bug 1403433 - Add another variant of SchedulePaint that does not call InvalidateRenderingObservers for PendingAnimationTracker. r=birtles
nsFrame::SchedulePaint() invokes InvalidateRenderingObservers, and
InvalidateRenderingObservers ends up posting change hints during we are
processing sequential tasks for animations, but we don't allow posting any
change hints while we are in the middle of restyling process.

Though the change hints posted by InvalidateRenderingObservers are not harmful
in this case since the change hints will be processed in a second post
traversal without problems.  That's said, InvalidateRenderingObservers stuff
should be processed in display list based invalidation anyway (bug 1284053).

MozReview-Commit-ID: GKVRZ98lvEN
2017-09-29 19:42:13 +09:00
Matt Woodrow
aa5c01a9bd Bug 1397671 - Don't treat SVG transformed frames as being transformed for the purposes of computing Combines3DTransformWithAncestors. r=dbaron 2017-09-26 15:57:56 +13:00