Commit Graph
118 Commits
Author SHA1 Message Date
Markus Stange beccb1dcb3 Bug 1401037 - Propagate nsDisplayList::mForceTransparentSurface to the parent list when recursing into flattened items. r=miko
MozReview-Commit-ID: 9iS9fwtUAaJ
2017-09-19 15:52:20 -04:00
Matt Woodrow fa04c82b0d Bug 1397060 - Don't call ComputeOpaqueRect unless we're going to make use of the result. r=mstange
MozReview-Commit-ID: 2yGybisiLcx
2017-09-12 14:14:27 -04:00
Markus Stange 35882b6218 Bug 1387594 - Stop getting the font smoothing background color from the theme. r=mattwoodrow
MozReview-Commit-ID: 2r1B8SvEkEl
2017-09-14 23:09:47 +02:00
Sebastian Hengst 3fdb5e5a73 Backed out changeset b507473b9b75 (bug 1397060) for almost permafailing reftest box-decoration-break-with-outset-box-shadow-1.html on stylo. r=backout a=backout
MozReview-Commit-ID: FOAcq7soe89
2017-09-14 10:44:03 +02:00
Miko Mynttinen ad9cd57bca Bug 1359584 - Part 5: Change nsDisplayItem merging logic to non-destructive r=mstange
MozReview-Commit-ID: CiN2yUOyaMX
2017-08-23 21:01:28 +02:00
Miko Mynttinen 009039f6a8 Bug 1359584 - Part 4: Refactor FrameLayerBuilder::ProcessDisplayItems() to be recursive r=mstange
MozReview-Commit-ID: JaC3SFGcpzK
2017-08-25 12:34:40 +02:00
Jeff Muizelaar c1f4c90bc8 Bug 1392523. Remove duplicated gfxContext* parameter. r=mattwoodrow
All of the callers are passing in the same value for
both gfxContexts.
2017-09-12 22:17:43 -04:00
Matt Woodrow ec2ab09fbb Bug 1397060 - Don't call ComputeOpaqueRect unless we're going to make use of the result. r=mstange
MozReview-Commit-ID: 2yGybisiLcx
2017-09-12 14:14:27 -04:00
Bas Schouten c339878984 Bug 1363922 - Part 2: Estimate scale of frames using their transformation relative to the root frame. r=mstange
MozReview-Commit-ID: HTDaOz7sz5c
2017-08-25 00:21:55 +02:00
Wes Kocher f4e87a1fb3 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 7sFZmPUXSx6
2017-08-18 17:21:29 -07:00
Nicholas Nethercote 44857dd152 Bug 1386103 (part 0) - Don't pass lambdas to CreateOrRecycledMaskImageLayerFor. r=kats.
They cause inexplicable and monstrously complex compile errors in Android NDK
code in combination with the (entirely unrelated) changes in the next patch.
2017-08-10 16:02:01 +10:00
Sebastian Hengst 2e8a05e802 Backed out changeset 189abf9f8d6d (bug 1363922) 2017-08-17 16:11:28 +02:00
Bas Schouten 849de61dab Bug 1363922 - Part 2: Estimate scale of frames based on their PresShell resolution. r=mstange
MozReview-Commit-ID: 8f6T3PiPkF8
2017-08-17 15:45:31 +02:00
Kartikaya Gupta f6c8665c06 Bug 1389143 - Refactor to extract helper method. r=jrmuizel
MozReview-Commit-ID: 5FxrP280i5m
2017-08-18 13:06:30 -04:00
Matt Woodrow 8370362323 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange
* * *
[mq]: fix

MozReview-Commit-ID: LUXZAIL73BJ
2017-08-07 16:07:43 +12:00
Sebastian Hengst 1e52933103 Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
Matt Woodrow b0bdae09c7 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange 2017-08-07 16:07:43 +12:00
sotaro 49080d36ac Bug 1388639 - Use KnowsCompositor instead of ShadowForwarder in MaskImageData and MaskLayerImageCache r=nical 2017-08-10 11:43:11 +09:00
David Anderson 5b30fd2693 Handle bounds overflow in consumers of LayerTreeInvalidation. (bug 1345891 part 2, r=mattwoodrow) 2017-08-03 21:22:48 -07:00
Jamie Nicol 69b424457b Bug 1360306 - Clamp layer scale if it has recently been animated. r=mstange
When a container layer's transform has an animated scale, we clamp it
to a near power of two so that descendent layers' resolutions do not
keep changing and we minimize repainting. The current behaviour only
clamps the scale when it has not changed with respect to the previous
transaction. In animations where the scale usually changes, but
happens to remain constant between two consecutive transactions, this
is bad.

Rather than only checking against the previous scale value, use
ActiveLayerTracker::IsScaleSubjectToAnimation() to determine whether
to clamp, as it takes into account a longer period.
2017-07-27 11:52:27 +01:00
Matt Woodrow 6678ece829 Bug 1378455 - Don't minimize the visible region for the scrollbar thumb in FrameLayerBuilder since it can move asynchronously. r=mstange 2017-08-01 11:09:53 +12:00
Lee Salzman ad5847c359 Bug 1383825 - limit the growth of scaling for animated nsDisplayTransform in fallback case. r=mattwoodrow
MozReview-Commit-ID: 25NNa1CKMEM
2017-07-26 00:55:11 -04:00
Kartikaya Gupta 4ff424cc8f Bug 1382682 - Move ViewIDForASR into nsLayoutUtils for reuse. r=mstange
MozReview-Commit-ID: IcYqDO1D2SB
2017-07-20 12:33:09 -04:00
Nicolas Silva 7e4459cea9 Bug 1377595 - Mark display items that should be painted on the content side. r=jnicol 2017-07-20 11:34:15 +02:00
Sylvestre Ledru 9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Kartikaya Gupta 793d78e155 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn
2017-07-05 11:18:49 -04:00
Jeff Muizelaar 5aac4bed60 Bug 1375972 - Avoid copying the visible region. r=mstange 2017-06-23 16:03:59 -04:00
Nicholas Nethercote a58025002f Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.
2017-06-22 17:08:53 +10:00
Matt Woodrow ca458fdcc5 Bug 1373479 - Don't intersect with the visible rect for async animations, since we want to keep the prerendered area as visible too. r=mstange 2017-06-22 12:41:36 +12:00
Sebastian Hengst 71eb9bfeb4 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: DPQl41S3ZkU
2017-06-17 22:26:03 +02:00
Mats Palmgren 97e492eb6a Bug 1371958 part 2 - Move a mPaintedLayerItems.GetEntry() call into the else-branch where its result is actually used to avoid an unnecessary hashtable lookup when we don't take the else-branch. r=froydnj
MozReview-Commit-ID: sOwNzB8mxj
2017-06-17 00:06:04 +02:00
Mats Palmgren 18dda9a553 Bug 1371958 part 1 - Use EnsureRemoved instead of Contains+RemoveEntry to avoid an unnecessary hashtable lookup. r=froydnj
MozReview-Commit-ID: 6SPQrQCLBjF
2017-06-17 00:06:04 +02:00
Markus Stange f86e1a999d Bug 1368386 - Add PaintedLayer::InvalidateWholeLayer(). r=mattwoodrow
MozReview-Commit-ID: 7sgQDs82Wwt
2017-06-15 17:29:18 -04:00
Botond Ballo 611e3d8a2f Bug 1369910 - Simplify AddingOwnLayer() call sites in ProcessDisplayItems(). r=mstange
MozReview-Commit-ID: 3kH48WPAOv7
2017-06-09 16:26:47 -04:00
Matt Woodrow ab4fcfb959 Bug 1359709 - Scale visible region for preserve-3d layers correctly. r=thinker 2017-06-14 13:48:28 +12:00
Alexis Beingessner 3117218f13 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst 1b1d14e565 Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c6fbc5e17e Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Ryan VanderMeulen 75cc747ca2 Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE
2017-06-07 22:55:56 -04:00
L. David Baron 03d37750a7 Bug 1369260 - Remove use of MOZ_ASSERT_IF in layout. r=heycam
As I've said before, as module owner I prefer that MOZ_ASSERT_IF not be
used in the module because I consider it to be unreadable.  However, a
few uses have crept in, and this patch removes them.

I consider it to be unreadable because the name looks like a name that
uses smalltalk-ish naming conventions, i.e., with a part of the name
corresponding to each parameter, in order.  However, the parameters are
in the order opposite the name.

This was written primarily with the vim commands:
:%s/MOZ_ASSERT_IF(\([^,]*\),/MOZ_ASSERT(!\1 ||/
:wn
followed by manual cleanup for indentation and removal of !!.

MozReview-Commit-ID: G6rLbOn7k8d
2017-06-06 22:27:17 -07:00
Wes Kocher 467f1c5cfe Backed out changeset 5450b06e79e5 (bug 1369910) for assertions in FrameLayerBuilder.cpp CLOSED TREE
MozReview-Commit-ID: 9m63lG6kj7B
2017-06-05 10:28:32 -07:00
Botond Ballo 9d97b9c429 Bug 1369910 - Simplify AddingOwnLayer() call sites in ProcessDisplayItems(). r=mstange
MozReview-Commit-ID: 3kH48WPAOv7
2017-06-02 16:43:33 -04:00
Miko Mynttinen a0e285ca8d Bug 1367219 - Avoid multiple hashtable lookups in DisplayItemData destructor r=mattwoodrow
MozReview-Commit-ID: Jr4yx5A9gWd
2017-06-06 18:12:17 +02:00
Botond Ballo e1dda14275 Bug 1367488 - Pre-render offscreen portions of scrollbar thumbs inside an iframe. r=mstange
MozReview-Commit-ID: LCBHnFJdGtp
2017-05-29 18:05:05 -04:00
Ethan Lin c0f55543e3 Bug 1367991 - Check mask layer's draw result to make sure we will repaint it in the next transaction if the image is not ready. r=cjku 2017-05-31 14:38:25 +08:00
cku 82e4f45c2e Bug 1362000 - (followup) remove unused headers. r=me
MozReview-Commit-ID: 4SO8tdhbIHt
2017-05-27 16:57:44 +08:00
cku 5a4ea93291 Bug 1350663 - Repaint mask layer when the offset between mask region and mask layer changed. r=mstange
Let's said we have a div,
  <div id="outer" style="width:200px, height:200px;
  mask="url(opaque-200X100-transparent-200X100.png)"">
    <div id="innter" style="position:fixed;
                            left:0px; top:0px; width:200px; height:100px;
                            mask-repeat: no-repeat;
                            background-color: blue;"></div>
  </div>

Some hints:
1. '#inner' is out-of-flow
2. '#outer' itself does not draw any things, no background/ border, etc....
3. Mask applied on '#outer'.
4. opaque-100X200-transparent-100X200.png is a 200X200 image. The upper side of
   this image is opaque; the lower side of this image is transparent.

After page load, you will see a 200X100 blue rect on left-top corner. This blue
rect is contributed by 200X100 blue '#inner' and 200X100 opaque upper part of
mask. So far so good.

Then you scroll down 100px. '#inner' is not moved, since it's an out-of-flow
element, mask move up 100px with '#outter'. Ideally, you should see nothing in
the view, since '#inner' is now masked by transparent part of the image mask.

On FF, you will still see a 200X100 blue rect in view as if no scrolling at all,
which is wrong.

Here is the root cause of this bug:
1. At beginning, we create a 200X100 mask layer, which fit the size of '#inner'.
   Not 200X200 of '#outer', since '#outer' basically draw nothing, we smartly
   choose a more compact draw target for painting the mask.
2. Things go wrong after scrolling down. By scroll down 100px, the size of the
   mask layer is still "200X100", so we _think_ cached mask layer is still
   reusable, but it is not.
   Before scrolling, we paint (0, 0, 200, 100) portion of the 200X200 mask onto
   mask layer; after scrolling, we should paint (0, _100_, 200, 100) portion of
   mask onto mask layer. We did not keep this kind of offset information in
   CSSMaskLayerUserData, so we don't know that the cached mask layer should be
   rejected.

It's difficult to create a reftest for this bug as well. With scrollTo, we may
mimic an environment of this error, but since reftest harness will trigger
whole viewport repaint while taking a snapshot, we actually can not repro this
issue on it.

MozReview-Commit-ID: H5xaUSssMRh
2017-05-14 19:28:01 +08:00
cku 5b77de49c2 Bug 1362000 - (follow-up) Simplify match logic in CSSMaskLayerUserData::operator==. r=mstange
Remove HasUserSpaceOnUseUnitsMaskOrClipPath since it's not necessary.
MozReview-Commit-ID: 2sen23m5GjE
2017-05-27 01:38:54 +08:00
cku 594d3c206b Bug 1362000 - When the position of masked frame changed, always regenerate mask layer if any of maskUnits/maskContentUnits/clipPathUnits is userSpaceOnUse. r=cjku
For SVG mask/clipPath, comparison at [1] is not enough to detect whether cached
mask layer is reusable duriang animation. Since aMaskItem->IsInvalid() may keep
return fasle during OMTA. Bring in new condition check in
CSSMaskLayerUserData::IsMaskReusable..

I do not create a reftest for this bug, the reason is almost the same with bug
1350663.

So I manually verified paiting result by visit this three pages:
 https://codepen.io/tadeuszwojcik/pen/ZKJwRE
 https://codepen.io/tadeuszwojcik/pen/oWexWW
 http://codepen.io/iiroullin/pen/oWEOOM

[1] https://hg.mozilla.org/mozilla-central/file/2bc714f86791/layout/painting/FrameLayerBuilder.cpp#l3887

MozReview-Commit-ID: 7lUKTMYPFXo
2017-05-12 20:17:14 +08:00
cku 113f0f59e7 Bug 1351440 - Part 3. Pass imgDrawingParams to nsSVGMaskFrame::GetMaskForMaskedFrame. r=jwatt
The reason of this change is the same as for Part 2, except this commit fixes
nsSVGMaskFrame::GetMaskForMaskedFrame rather than PaintSVG.

MozReview-Commit-ID: DS0eG6eKDgs
2017-05-18 22:03:45 +02:00