Commit graph

2505 commits

Author SHA1 Message Date
Kartikaya Gupta
463cce7a87 Bug 1415225 - Small early-exit optimization. r=botond
MozReview-Commit-ID: A3UuqKKOsjA

--HG--
extra : rebase_source : 78042095524bda3371f347817b2ff201c9863729
2017-11-09 09:03:52 -05:00
Mats Palmgren
1c2b8c222e 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
cd1604ef74 Bug 1414397 - Make sure we properly invalidate the entire frame subtree when detecting a caret frame change. r=miko
--HG--
extra : rebase_source : add63296c95ea090ca79ab120bede8038ce4f59e
2017-11-08 15:33:34 +13:00
Matt Woodrow
fca4960b0f Bug 1412110 - Make sure we build a wrap list for the caret frame, since it will have multiple display items. r=miko
--HG--
extra : rebase_source : b59ff089835023c96daa1e1bf1c7f5bde6c75f15
2017-11-08 15:32:27 +13:00
Matt Woodrow
0cd1c74fe2 Bug 1413833 - Don't use WeakFrame for the modified frame list since get slow with large numbers of frames. r=miko
--HG--
extra : rebase_source : c2c2f2c6435ad1b2f246d1339ee548dc60cec4b4
2017-11-08 15:25:44 +13:00
Matt Woodrow
09ea8a23b0 Bug 1413833 - Cap the number of modified frames that we track to avoid the overhead getting too large. r=miko
--HG--
extra : rebase_source : cc26dd15613b9bbe6ca199d21817cbed16143dfe
2017-11-08 15:23:34 +13:00
Sebastian Hengst
af670f4147 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-11-07 02:47:30 +02:00
Mats Palmgren
652757273a 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
a496c4a782 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
25cd0c37f7 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
0f51960be1 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

--HG--
extra : rebase_source : 3c40d0077c4b38771deed7055fbc5e22be8a071f
2017-11-06 09:18:27 +09:00
Markus Stange
18637eaeaf Bug 1414097 - Convert nsDisplaySelectionOverlay to WebRender. r=ethlin
MozReview-Commit-ID: 5icpe4OR0Qa

--HG--
extra : rebase_source : 514e126218e6c44cbf1016bd027c3d80c6e99734
2017-11-02 19:43:08 -04:00
Botond Ballo
e084a3a187 Bug 1382534 - Try to give nsDisplayMask items proper scroll metadata. r=mstange
MozReview-Commit-ID: L6kYkzC1F8S

--HG--
extra : rebase_source : 0d90b1c859d98e2aef254d0e528be27c130a78f8
2017-10-20 18:16:50 -04:00
Daniel Holbert
680815cd6e 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

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Sebastian Hengst
d10e26c913 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-27 00:00:25 +02:00
Hiroyuki Ikezoe
abef3a3a96 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

--HG--
extra : rebase_source : de1dead6e67a44691887c8364be23734c3b1adef
2017-10-26 18:09:32 +09:00
cku
3ccdb4a184 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

--HG--
extra : source : 835239788497126e3be33a0dbbb0543e94fc9f18
extra : amend_source : b3e94ac2c639d89bac4745350f88d3383e6faf76
2017-10-13 14:03:44 +08:00
Matt Woodrow
07aad81564 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
--HG--
extra : rebase_source : 78e330fc4ffe589c8b831f470cbd3858f0f5ec00
2017-10-25 14:17:25 +13:00
Matt Woodrow
9c1811b258 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 ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
e97adfa0ce Bug 1404181 - Part 27: Add some retained-dl debugging tools. r=mstange
MozReview-Commit-ID: EQO1lAbUnpY

--HG--
extra : rebase_source : a11bfd8055bd83e9215211a4e48d43735d7010ba
2017-10-21 16:54:24 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
efab685984 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

--HG--
extra : rebase_source : 13e83b57da66c78e0a50268b1bb760e0f57399bf
2017-09-29 10:56:31 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
3fa03bb34e 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

--HG--
extra : rebase_source : 4eadb82e5e0b3264cc7d6aeef2693ce8aea69b43
2017-09-29 10:51:49 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
6b56c65932 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

--HG--
extra : rebase_source : d17c49b0602d750cc6d0f018f88745cd0ff4d0d2
2017-10-18 16:09:07 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
396cd36361 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

--HG--
extra : rebase_source : b27538ae5bef1b468ed6d8d3ac403e34f54f87c0
2017-09-28 14:23:03 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
57c2ad8249 Bug 1404181 - Part 17: Track will-change contributions per-frame so that can remove contributions from invalidated frames. r=mstange
MozReview-Commit-ID: 54LwXKkjfFX

--HG--
extra : rebase_source : da30652842727f5b22174c3c5059a01b48a36a59
2017-09-28 13:53:25 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
2cc4d6f2d0 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

--HG--
extra : rebase_source : b490e72e7061e64abf169db55731fe9424d6b442
2017-09-28 14:20:13 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
db37a82e0b 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

--HG--
extra : rebase_source : f6277bbe2c8ffd571e32bb886903243df655918e
2017-09-27 17:17:11 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
fd73cf2b01 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

--HG--
extra : rebase_source : 9902d33d1e7e28bfd1d6a5ed4e780262fce0b749
2017-10-21 21:01:50 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
b1280ebc2c Bug 1404181 - Part 3: Track the current set of alive display items on nsIFrame. r=mstange
MozReview-Commit-ID: BgB1XBMpJ8t

--HG--
extra : rebase_source : 2528eeadfbd0edca54efde8f5d427abd8e29f16d
2017-09-27 15:35:29 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
31e9b3f8cd 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

--HG--
extra : rebase_source : e7bf5eacba44ce9cf77c55d623edef33a85f0492
2017-10-04 14:28:38 +13:00
Hiroyuki Ikezoe
e355bb02a6 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

--HG--
extra : rebase_source : 6ebcd354be300b779e84f013fa4db7d13e36c551
2017-10-18 10:43:22 +09:00
Ya-Chieh Wu
064ab5680a Bug 1410826 - Check IsPrimaryFrame() first in nsIFrame::HasAnimationOfTransform. r=mats
MozReview-Commit-ID: BFJGmr19ESL
2017-10-25 20:11:00 -04:00
Matt Woodrow
d8a662f0d2 Bug 1406727. r=mstange,froydnj a=abillings
--HG--
extra : rebase_source : a9932eb10d3ca451e1ce3a424cd48e957801f593
2017-10-17 15:19:44 +13:00
Hiroyuki Ikezoe
f987000e82 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

--HG--
extra : rebase_source : bde757fe5ae7efb9ed739d542ee92665e66da261
2017-10-15 09:56:17 +09:00
Hiroyuki Ikezoe
aa273f9a51 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

--HG--
extra : rebase_source : 4a87cbfdb6f069654bb2fe829824d45a7956f0f6
2017-10-15 09:56:17 +09:00
Boris Zbarsky
d939b75081 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
5b1a5502d7 Bug 1407246 - Split out Variables struct difference calculation. r=emilio
MozReview-Commit-ID: CtWtG3zkD1D

--HG--
extra : rebase_source : 0e1efeb844cde641288a6aecb15b1285cb37ea3f
2017-10-12 09:12:30 +08:00
Nicholas Nethercote
d225f7151b 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

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
L. David Baron
41e56eef86 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
3997f2cb11 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

--HG--
extra : rebase_source : aef80444e94d3af7eca776c981f8faded03bc985
2017-10-03 11:29:19 +08:00
Hiroyuki Ikezoe
653e15ba32 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
9304acdbbb 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
Matt Woodrow
d58801ad81 Bug 1402197 - Add an option for GetTransformToAncestor to stop at stacking contexts and displayport. r=mstange 2017-09-26 15:57:55 +13:00
Sebastian Hengst
bc68e8f407 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9Z3Ly8icnvh
2017-09-20 11:48:02 +02:00
Ethan Lin
b7c9633e30 Bug 1397375 - Part3. Remove the related webrender user data when destroying a frame. r=jrmuizel
MozReview-Commit-ID: IYjfqWiiPZ

--HG--
extra : rebase_source : 81785d6695b830c41ad6d97b5e632f7a655f9cea
2017-09-14 14:40:31 +08:00
Jonathan Watt
341ea5e4f1 Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
Jonathan Watt
0e4feb75d3 Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr
--HG--
rename : layout/svg/nsSVGEffects.cpp => layout/svg/SVGObserverUtils.cpp
rename : layout/svg/nsSVGEffects.h => layout/svg/SVGObserverUtils.h
2017-08-30 14:14:46 +01:00
Jonathan Watt
107bd0b650 Bug 1399824, part 2 - Always use nsIFrame::AddStateBits instead of manual bit twiddling. r=xidorn
MozReview-Commit-ID: JoEiQQI2kZ5
2017-08-24 12:09:42 +01:00
Jonathan Watt
9d21fb29ff Bug 1399824, part 1 - Always use nsIFrame::RemoveStateBits instead of manual bit twiddling. r=xidorn
MozReview-Commit-ID: KynEge1U4aS
2017-08-24 10:55:28 +01:00
Ting-Yu Lin
2e869d8f3d Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4

--HG--
extra : rebase_source : e1fe6a775ad97e16a6d7cc224634ff962ccb0fbf
2017-09-13 18:00:25 +08:00