Commit Graph

11332 Commits

Author SHA1 Message Date
Kartikaya Gupta
d6673c9aad Bug 1449620 - Extract an APZUpdater class from APZSampler. r=botond
The APZUpdater class holds the methods that are to be run on the updater
thread. Note that there are a few differences between the APZSampler and
APZUpdater classes - most notably, APZSampler no longer has a
"RunOnSamplerThread" function because there should never be any need to
dispatch runnables to the sampler thread. There is still a
RunOnUpdaterThread in APZUpdater, as well as a mechanism for dispatching
runnables to the controller thread via the updater thread.

MozReview-Commit-ID: LLVWzRyhYWl

--HG--
extra : rebase_source : d3d2ae18b40f24473cab5567a48b67b8f478a733
2018-03-28 18:36:42 -04:00
Gurzau Raul
caf04b916e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-29 00:59:08 +03:00
Gurzau Raul
d117255a14 Merge inbound to mozilla-central. a=merge 2018-03-29 00:55:16 +03:00
Andrew Osmond
9fdad4e863 Bug 1433351 - Add nsBaseHashtable::EntryPtr::OrRemove method to abort nsBaseHashtable::LookupForAdd on miss. r=froydnj
In SourceSurfaceImage::GetTextureClient, we use LookupForAdd. This is
because we typically will create a new TextureClient if there isn't
already one created. This creation can fail because the size is too big,
or we don't have the memory available for it. Unfortunately LookupForAdd
is an infallible operation; it is expected we will always add something
to the hashtable if we don't find an entry. This patch adds an OrRemove
method to cover the corner case where we are unable to complete the
insertion.
2018-03-28 12:58:49 -04:00
Ryan Hunt
2be42a45f6 Bug 1448485 - Remove assert in APZCallbackHelper and add comment about case it was triggered by. r=kats
MozReview-Commit-ID: IbXNISatv3Q

--HG--
extra : rebase_source : d88637454e58be5c18a1fa1dc0588a04eddc274c
2018-03-27 16:16:26 -05:00
Kartikaya Gupta
fb7f70182b Bug 1447299 - Ensure all APZSampler functions run on the sampler thread. r=botond
Functions in APZSampler that are only invoked without WR (e.g. from
AsyncCompositionManager only) can be asserted as running on the sampler
thread. Functions that are invoked with WR need to be bounced onto the
sampler thread. In all cases the functions are called from the
compositor thread, and so we assert that as well.

MozReview-Commit-ID: JPgGlgUUsgg

--HG--
extra : rebase_source : 8b950d3386e1e64e766b76edaa7894b251fb8664
2018-03-28 14:57:06 -04:00
Kartikaya Gupta
b015c3b3ec Bug 1447299 - Bounce PAPZCTreeManager controller messages through the sampler thread. r=botond
The methods on PAPZCTreeManagerParent are always invoked on the
compositor thread, which currently is always the same as the sampler
thread. When it does RunOnControllerThread calls, there is an implicit
ordering with respect to the sampler thread, because the controller
thread messages are always dispatched *from* the sampler thread.
When we move the sampler thread to be the render backend thread, we have
to preseve this implicit ordering, but we have to make it more explicit.

For example, if a content process sends a layers update followed by
a SetTargetAPZC message, it expects that the APZ will process them in
that order, as the SetTargetAPZC might refer to a scrollframe that was
just layerized. Currently, both these messages arrive on the compositor
thread; the layers update is processed directly as the compositor thread
is the sampler thread, and then the SetTargetAPZC message is bounced to
the controller thread. However, if the compositor thread is not the
sampler thread, then we would bounce the layers update to the sampler
thread, and bounce the SetTargetAPZC to the controller thread,
introducing a race. If SetTargetAPZC runs first bad things happen. The
solution in this patch is to bounce the SetTargetAPZC to the sampler
thread as well, so that it gets bounced to the controller thread only
after we have processed the layers update.

This patch accomplishes that by introducing a method on APZSampler that
does this "double bounce".

MozReview-Commit-ID: KI9wQQ9PZT4

--HG--
extra : rebase_source : 79d0d36a649f11cc795148cc86539a526c8beeae
2018-03-28 14:57:01 -04:00
Kartikaya Gupta
cf0569e64e Bug 1447299 - Have the APZCTreeManagerParent store a reference to the APZSampler. r=botond
MozReview-Commit-ID: BNhkhFAmYP8

--HG--
extra : rebase_source : 43ff9d5f74add3b8b8b0cf651d06a14d8ec82885
2018-03-28 14:56:55 -04:00
Kartikaya Gupta
eacf1f2dcc Bug 1447299 - Move the RunOnControllerThread from APZCTreeManager::SetLongTapEnabled to the caller. r=botond
This is functionally a no-op (it just moves the thread-bouncing code
from inside APZCTreeManager::SetLongTapEnabled to the call site in
APZCTreeManagerParent. The other call site, in
widget/android/nsWindow.cpp, is already known to be running on the
controller thread (which would be the Java UI thread in that case).

This makes the code in APZCTreeManagerParent more consistent and
simplifies the next changes.

MozReview-Commit-ID: 8VfEDVVFNl8

--HG--
extra : rebase_source : 02225ed5b80129a1d18b429eff93866a33d4ea86
2018-03-28 14:56:48 -04:00
Kartikaya Gupta
3c26f7183f Bug 1447299 - Move the sampler thread util functions from APZThreadUtils to APZSampler. r=botond
Note that this also makes the utility functions instance methods,
because each APZSampler might have a different sampler thread instance.

MozReview-Commit-ID: 9dY8ZzVX6lR

--HG--
extra : rebase_source : 4dd58400aee5d9f2063abe0a912488b28ff74f9f
2018-03-28 14:56:41 -04:00
Kartikaya Gupta
4bbad90793 Bug 1447299 - Have the APZCTreeManager keep a pointer to the sampler. r=botond
MozReview-Commit-ID: GiITwCDuWAW

--HG--
extra : rebase_source : 13a288785c0c3d7d0374e253f4211bfe7c5540bc
2018-03-28 14:55:58 -04:00
Nicolas Silva
b9c3c7eeb7 Bug 1449242 - Don't delay image key deletions by an extra transaction. r=sotaro 2018-03-28 15:33:21 +02:00
Andi-Bogdan Postelnicu
a10bc600e1 Bug 1449145 - Improve by modernising code in gfx/layers/apz. r=botond
MozReview-Commit-ID: FxYKhXPsiTD

--HG--
extra : rebase_source : 54204905a105352c53cc696ad31d55f81cd808b7
2018-03-28 21:41:00 +03:00
Botond Ballo
38444e7793 Bug 1447131 - Mochitest for hit-testing over backface-visibility:hidden element. r=kats
MozReview-Commit-ID: EeQlvluPQD1

--HG--
extra : rebase_source : 074ba63d6c4d9a69393cce691988697def556818
2018-03-28 14:22:54 -04:00
Botond Ballo
1b44d973ee Bug 1447131 - Move centerOf() into apz_test_utils.js. r=kats
MozReview-Commit-ID: CwO5SnWmhb9

--HG--
extra : rebase_source : ad39696f8573e2e5119720c7495ce1b21cf62f82
2018-03-28 14:22:42 -04:00
Botond Ballo
3552e7b87f Bug 1447131 - Handle backface-visibility:hidden in compositor hit testing. r=kats
MozReview-Commit-ID: EZhhSk3EZAL

--HG--
extra : rebase_source : be2e6a1e3fc651cb26bf90b77077ca0a5de8d80a
2018-03-28 14:22:30 -04:00
Xidorn Quan
efc0cdde02 Bug 1447828 part 8 - Remove remaining uses of StyleBackendType as well as the type itself. r=emilio
MozReview-Commit-ID: 6sh4eKvDpRF

--HG--
extra : rebase_source : 7d83f2b2d4e2739333016ed82754bf3a4a700de4
extra : source : 147ca562a24652c3f30add793213db70aff65e9e
2018-03-29 02:34:34 +11:00
Kartikaya Gupta
1ad07c54db Bug 1449478 - Avoid clobbering transforms in the WebRenderScrollData. r=jrmuizel
Due to an oversight in bug 1423370, the code I added was setting the
transform on a WebRenderLayerScrollData after initializing it, but the
initialization might have populated the transform. Thus the
transform-set that I added would have clobbered the transform. This
updates the code to combine the two transforms instead which avoids
the clobber.

MozReview-Commit-ID: 4mKJTLSMD9J

--HG--
extra : rebase_source : c486c5866739ab040d81f9f9a43b2b8a04c2d383
2018-03-28 06:32:06 -04:00
Lee Salzman
0cd370450a Bug 1447910 - move WR font key deletion to the end of a transaction. r=jrmuizel
MozReview-Commit-ID: LL94sMCvNyK
2018-03-27 18:06:31 -04:00
Margareta Eliza Balazs
ecdbb83fa1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-28 01:00:31 +03:00
Jeff Muizelaar
d07c300116 Bug 1388842. Add blob invalidation. r=mstange
MozReview-Commit-ID: 5xwqlULUbZe
2018-03-27 17:31:04 -04:00
Kartikaya Gupta
3c7d5a8b07 Bug 1423370 - Create fewer WebRenderLayerScrollData items for transformed items. r=jrmuizel
Instead of creating a new layer scroll data for every single
nsDisplayTransform item, we only create a new layer scroll data for
nsDisplayTransform items with perspective. In addition, we save the
transform from the non-perspective nsDisplayTransform items on the
StackingContextHelper, and then apply it to layer scroll data items that
are created by display items nested inside those nsDisplayTransforms.

This effectively makes two changes to the structure of the layer scroll
data sent to APZ:
(1) we will drop layer scroll data items for transforms that APZ doesn't
care about (i.e. the non-perspective ones that don't wrap APZ-relevant
display items).
(2) we will collapse layer scroll data items that only had a transform
into its descendant layer scroll data items. This should be functionally
equivalent, since the transform is still in the right place relative to
everything else.

The net result is fewer layer scroll data items.

MozReview-Commit-ID: HV6QPfuUrje

--HG--
extra : rebase_source : ecfe1810f9889e7ce5096e1bc42cc30a92b43b4a
2018-03-27 12:02:28 -04:00
Martin Robinson
f55533615b Bug 1444904 - Get the root scroll frame id from WebRender r=kats
Instead of hard-cording the root scroll frame id, get the value from
WebRender. This was previously hard-coded to 0, so when WebRender
switched to using 1 for the root scroll frame id, the positioning of
sticky frames were broken in subtle ways. This happened because they
were being parented to a root reference frame (which now uses the 0 id)
instead of the root scroll frame.

MozReview-Commit-ID: 66ArgKHGpWE

--HG--
extra : rebase_source : ff6937bf7fc8d4472eb074d0466c8dcd6fba54a8
2018-03-26 18:13:07 +02:00
Botond Ballo
af24ea01cd Bug 1425603 - APZ mochitest for obeying overscroll-behavior when scrolling over a checkerboarded area. r=kats
MozReview-Commit-ID: JMWBVf2bKKP

--HG--
rename : gfx/layers/apz/test/mochitest/helper_scroll_overscroll_behavior.html => gfx/layers/apz/test/mochitest/helper_overscroll_behavior_bug1425573.html
extra : rebase_source : be9f67885ef2fd13b6e3bc377903da7878d53ed1
2018-03-21 18:59:38 -04:00
Kartikaya Gupta
395eaf8c66 Bug 1448490 - Make the layers id a struct instead of a uint64_t. r=mattwoodrow
The new struct is in LayersTypes.h, all the rest of the changes are just
replacing existing uint64_t instances with the new LayersId struct.

Note that there is one functional change, in
CompositorBridgeParent::DeallocPWebRenderBridgeParent, where we now
correctly convert the PipelineId to a LayersId before using it to index
into sIndirectLayerTrees, whereas before we were incorrectly just using
the mHandle part of the PipelineId.

MozReview-Commit-ID: GFHZSZiwMrP

--HG--
extra : rebase_source : d2b274f63aaee2ee9bba030297e0a37a19af0d6c
2018-03-24 19:06:01 -04:00
Emilio Cobos Álvarez
126534b1e9 Bug 1446108: Don't create bogus angles in layers animation code. r=kats
Summary:
I can propagate the error up if needed, but looks like the code should cope with
it just fine with this change.

Reviewers: kats

Bug #: 1446108

Differential Revision: https://phabricator.services.mozilla.com/D794

MozReview-Commit-ID: Dm6EKIC6F5i
2018-03-23 19:09:42 +01:00
Brindusan Cristian
bfd45c93ba Backed out 2 changesets (bug 1446108) for build bustages on build\src\obj-firefox\dist\include\mozilla/Alignment.h(29) CLOSED TREE
Backed out changeset 08814c30af6d (bug 1446108)
Backed out changeset 7977451e9641 (bug 1446108)
2018-03-23 18:44:07 +02:00
Emilio Cobos Álvarez
005aa351c9 Bug 1446108: Don't create bogus angles in layers animation code. r=kats
Summary:
I can propagate the error up if needed, but looks like the code should cope with
it just fine with this change.

Reviewers: kats

Bug #: 1446108

Differential Revision: https://phabricator.services.mozilla.com/D794

MozReview-Commit-ID: Dm6EKIC6F5i
2018-03-23 16:40:55 +01:00
Cosmin Sabou
56274d0a01 Backed out changeset c652b6d362f6 (bug 1440753) for permafailing on layout/reftests/scrolling/iframe-scrolling-attr-2.html a=backout 2018-03-23 16:54:23 +02:00
Bas Schouten
8f930c02f7 Bug 1440753: Replace pixman regions with our own region code. r=mattwoodrow
MozReview-Commit-ID: KPsTAw3Uwa2
2018-03-09 05:27:15 +01:00
Kartikaya Gupta
8831866d46 Bug 1448490 - Follow-up to fix compilation of disabled-by-default logging. r=me and DONTBUILD
MozReview-Commit-ID: CQhx0Ty5tKw
2018-03-28 06:31:03 -04:00
jlogandavison
27858eb98f Bug 1428387 - Tests for APZC pinch locking mechanism. r=botond
MozReview-Commit-ID: 5c74fV0mLVT

--HG--
extra : rebase_source : 4f4f889e30d7eb78de680e9cb3004bac32dba97d
extra : amend_source : c19f1219fde2b2d0fdb9c6a46dfa94cbeccac0b7
2018-03-02 19:59:01 +00:00
arthur.iakab
24af737f4c Merge inbound to mozilla-central. a=merge 2018-03-22 01:46:39 +02:00
arthur.iakab
fda9fc4c79 Merge mozilla-central to autoland 2018-03-21 21:28:49 +02:00
arthur.iakab
abcb47d8cc Merge inbound to mozilla-central. a=merge 2018-03-21 21:13:11 +02:00
Jeff Muizelaar
1fde5d7706 Bug 1447450. Delete WebRenderUserDataTable when its clear. r=kats
FrameProperties have Remove() and Delete() methods. If you call
Remove() you now own the result, therefore we should delete it.

MozReview-Commit-ID: FybBYcbIZIH

--HG--
extra : rebase_source : fe1dc29d5a9bf5bac7b35452d3ad49b8aa0beb6a
2018-03-20 16:48:35 -04:00
arthur.iakab
5e8092339a Merge mozilla-central to inbound
--HG--
rename : browser/base/content/test/general/bug364677-data.xml => browser/components/feeds/test/bug364677-data.xml
rename : browser/base/content/test/general/bug364677-data.xml^headers^ => browser/components/feeds/test/bug364677-data.xml^headers^
rename : browser/base/content/test/general/test_bug364677.html => browser/components/feeds/test/test_bug364677.html
rename : services/sync/tps/extensions/tps/bootstrap.js => services/sync/tps/extensions/tps/components/tps-cmdline.js
rename : testing/talos/talos/pageloader/bootstrap.js => testing/talos/talos/pageloader/components/tp-cmdline.js
rename : testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js => testing/talos/talos/startup_test/sessionrestore/addon/SessionRestoreTalosTest.js
rename : testing/talos/talos/talos-powers/bootstrap.js => testing/talos/talos/talos-powers/components/TalosPowersService.js
rename : tools/quitter/bootstrap.js => tools/quitter/QuitterObserver.js
extra : rebase_source : 5801e95a945b54754f27571e7b211e1eac132d67
2018-03-21 22:27:21 +02:00
Ryan Hunt
aae4eeb5a2 Respect SYNC_DECODE when deciding to use Webrender for nsDisplayBackgroundImage. (bug 1439960, r=mstange)
Previously CreateWebrenderCommands would use GetLayerState to determine whether to use Webrender or
take the fallback path. GetLayerState would then under some cases call CanOptimizeToImageLayer()
which would get the image container using the appropriate flags for sync decoding.

Now nsDisplayBackgroundImage only uses CanCreateWebrenderCommands, which doesn't pass the correct
flags to image container, leading to reftest failures in some cases. This commit fixes that.

MozReview-Commit-ID: KlslXVHlRi5

--HG--
extra : rebase_source : aacb5fcae966cb9af8d8607e6c10e4c0822ea88d
2018-03-20 13:42:05 -05:00
Jeff Muizelaar
4338f2052b Bug 1388842. Add support for updating blob images. r=mstange
Currently, we use a simple merging algorithm, because the more
complicated ones didn't work.

This code won't actually be used until we do blob image invalidation
in a follow up.

MozReview-Commit-ID: Q2Em3QC195
2018-03-20 10:30:26 -04:00
Ryan Hunt
e34eeaaa86 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 05bda872389db5cc61e805c3eb48e70eb5d95cbe
2018-02-21 09:29:49 -06:00
Emilio Cobos Álvarez
f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Cosmin Sabou
e997286c08 Backed out 3 changesets (bug 1439960) for build bustages on APZInputBridgeChild.cpp and FrameBuilder.cpp. CLOSED TREE
Backed out changeset b8057c06fc4c (bug 1439960)
Backed out changeset c8d6b0fa1447 (bug 1439960)
Backed out changeset e6bd6ebc8597 (bug 1439960)
2018-03-20 23:18:44 +02:00
Ryan Hunt
7648df8622 Fix unified build bustage for missing include. (bug 1439960, r=me) on a CLOSED TREE 2018-03-20 16:00:27 -05:00
Ryan Hunt
1fe1a843f9 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 447e835dc664549a8bdbd4097d42773acf523f08
extra : histedit_source : d98b0f0654c2214a368313de84f11160a3fa7030
2018-02-21 09:29:49 -06:00
shindli
55e9f63bac Merge inbound to mozilla-central. a=merge 2018-03-20 12:11:27 +02:00
Boris Zbarsky
89ea512161 Bug 1446711 part 7. Switch the nsIDOMMouseEvent::MOZ_SOURCE_* constants over to MouseEventBinding. r=qdot
We can't include MouseEventBinding.h in MouseEvents.h because that produces
this include loop:

MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> MouseEventBinding.h

MozReview-Commit-ID: 6FNksGil7uD
2018-03-20 00:16:06 -04:00
Boris Zbarsky
1a7c5067ca Bug 1446851. Get rid of nsIDOMWheelEvent. r=qdot
We can't include WheelEventBinding.h in MouseEvents.h because that produces
this include loop:

WheelEventBinding.h -> MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> WheelEventBinding.h

MozReview-Commit-ID: 5KNwH69aJYW
2018-03-20 00:16:05 -04:00
Kartikaya Gupta
e862bb4f2f Bug 1447157 - Avoid crashing if an unregistered layer tree gets adopted. r=botond
It looks like we can get layer tree adopted messages when the compositor
doesn't have an entry for that layer tree in sIndirectLayerTrees. So we
need to null-check all the things we pull out of that structure - all
the properties are already null-checked except for the mParent. This
patch adds a null check around that as well.

MozReview-Commit-ID: 2fb4SdvgSrG

--HG--
extra : rebase_source : d6d053e1ae11288f4bfc5459993564ed6ba22133
2018-03-20 10:01:27 -04:00
Bogdan Tara
4785e99532 Merge inbound to mozilla-central. a=merge 2018-03-17 12:29:57 +02:00
Jeff Muizelaar
b0c6c75854 Bug 1439006. Allow multiple kinds of WebRenderUserData on a DisplayItem. r=mstange
Currently we can only have one type of WebRenderUserData on an Item. We already
have a hash table of WebRenderUserData so it's not hard to include type in the
hash to support one per type.

MozReview-Commit-ID: geJ0BeWv8b
2018-03-16 19:15:27 -04:00