Commit Graph

385 Commits

Author SHA1 Message Date
Kartikaya Gupta
78dba184db Bug 1461313 - Handle invalid clip-path URIs with WebRender. r=mstange
In the case of an invalid clip-path, the browser is supposed to discard the
mask entirely. In the non-webrender codepath this would happen
implicitly because the computed MaskUsage would have no flags set, and
so no actions would be taken on the gfxContext which contained the
display items rasterized so far. In the WebRender codepath, though, we
invoke the code on a A8 drawtarget that's zero-filled, so if PaintMask
fails to rasterize anything into it, it gets treated as a "mask everything
out" mask. Instead, this patch makes it so that we detect the scenario
where the computed MaskUsage is a no-op, and ensure that we don't apply
the mask in that case.

An alternative approach considered was to initialize the A8 drawtarget to
white instead of black but in cases where there is an actual mask, the
rest of the code assumes it is zero-filled and so that doesn't work.

MozReview-Commit-ID: Hw7nCiUXVJl

--HG--
extra : rebase_source : 241d550fa0ed1b3bd088c73d9565b166acbcece8
2018-07-05 08:05:34 -04:00
Ryan Hunt
0412e688a8 Bug 1473301 - Remove BorderLayer. r=mattwoodrow
MozReview-Commit-ID: KGXW2lYBZ3c

--HG--
extra : rebase_source : a782ec3fb1c87d1d034219cbd7fd1b8d9d751559
extra : amend_source : ec7c8f7b4080c53a851117cfb1c7611c3606c562
2018-07-03 16:15:58 -05:00
Jamie Nicol
a1d1e03224 Bug 1470758 - Ensure we don't merge items with the same frame. r=mattwoodrow 2018-07-03 21:31:26 -04:00
Bas Schouten
a95db7c11a Bug 1473136: Cache mNeedsActiveLayer once for nsDisplayOpacity. r=mattwoodrow 2018-07-03 23:07:44 +00:00
Bas Schouten
7f6794045e Bug 1472830: Reuse the work from ApplyOpacityToChildren when possible. r=mattwoodrow 2018-07-03 20:26:40 +00:00
Bas Schouten
43ddb842d7 Bug 1471437 - Part 2: Reset mPaintRect only when the new building rect is different, and update mPaintRectValid when it is. r=mattwoodrow
MozReview-Commit-ID: 5djSr7eNk8W
2018-06-27 16:47:55 +02:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Ryan Hunt
27b4840273 Bug 1466146 - Add FlushRasterization as a metric for CONTENT_PAINT_PHASE_WEIGHT. r=mattwoodrow, data-review=francois
--HG--
extra : rebase_source : dcbf77adc7891b5f9ca49627370ce71f64ab3b87
2018-06-05 12:30:42 -05:00
Jamie Nicol
f2b10c6146 Bug 1469472 - Ensure we don't merge multiple display items with the same frame. r=mattwoodrow 2018-06-20 23:00:48 +01:00
Matt Woodrow
668b361a1d Bug 1466024 - Cleanup nsDisplaySubDocument display items when we swap the subdoc into a different outer document. r=miko
MozReview-Commit-ID: E4NKiIdXZsY

--HG--
extra : rebase_source : afdce58ba43dbf9bd93d971bd8b57240461c9954
2018-06-01 17:23:55 +12:00
Hiroyuki Ikezoe
afa2fcd95a Bug 1469220 - Backed out changeset 7fc66c715a0f and 39cb4d5f6602. r=mattwoodrow
Those changesets which are related to animations introduced in bug 1462497
seems to cause new crashes.  I think the first two changesets for the bug fixed
the original crash cases but the last two (i.e. these changesets) introduced
other crashes unfortunately.

MozReview-Commit-ID: 9LD2hIIXA2y

--HG--
extra : rebase_source : 102c5532128039dcf8274c214e17d58d9a1aa483
2018-06-18 06:16:07 +09:00
Andi-Bogdan Postelnicu
163724eccf Bug 1453795 - Layout/Painting - Initialize member fields in classes/ structures. r=stange
--HG--
extra : amend_source : 11dc03533fdbc3924f0145481733d46293d528e2
2018-06-15 19:13:05 +03:00
Kartikaya Gupta
4294162115 Bug 1421384 - Inherit touch-action flags down in the compositor hit-test infos. r=miko
Per the touch-action spec, the effective touch-action on an element includes
touch-action restrictions from ancestor elements up to and including the
element that has the "default action". This patch implements that behaviour
so that WebRender gets correct touch-action values on its display items.

MozReview-Commit-ID: Cw5uqAsE9qm

--HG--
extra : rebase_source : ef6e24a66385e097d50b3a03c06091464b1bb5b9
2018-06-11 08:29:24 -04:00
Kartikaya Gupta
1fb62110c4 Bug 1467999 - Hold RefPtrs to the ASR objects to avoid UAFs. r=mstange
MozReview-Commit-ID: 1NVuY8Sq1YI

--HG--
extra : rebase_source : 639b38372dd0245db9474d4e31dbd74204e0e99d
2018-06-09 11:51:02 -04:00
Kartikaya Gupta
e8616078d6 Bug 1436409 - Remove the nsDisplayLayerEventRegions display item. r=mattwoodrow,tnikkel
MozReview-Commit-ID: 6mw0WUGGT0n

--HG--
extra : rebase_source : cae6237850953a7a878c774da87767a55b3c16b2
2018-06-08 17:31:27 -04:00
Kartikaya Gupta
ded66f718a Bug 1436409 - Remove the layout.event-regions.enabled pref and bake it in as false everywhere. r=tnikkel
This pref was used to enable the building of nsDisplayLayerEventRegions
items without APZ, so that we could test it in isolation. However, we no
longer need to do so, and these display items are going to be deleted
anyway, so we can remove this pref.

MozReview-Commit-ID: LJVcFafCKyS

--HG--
extra : rebase_source : 76d8eeca8dca4ea88b8226bbe6b829dbc40e03e4
2018-06-08 17:31:27 -04:00
Kartikaya Gupta
829cd9912f Bug 1465935 - Handle another edge case with hit-testing inside fixed-pos items. r=mstange
Transforms are containing blocks for fixed-pos items, so if a fixed-pos
item is inside a scrolled transform, then it should use that scrollframe
as the scroll target for hit-testing. This patch handles this case for
WebRender by stashing the appropriate ASR on the nsDisplayFixedPosition
item and using it instead of the presShell's root scrollframe in this
scenario.

The patch also adds a mochitest (which is basically a mochitested
version of the reftest in fixed-pos-scrolled-clip-3.html, with a
hit-test check to ensure that it's hitting the right scrollframe).

MozReview-Commit-ID: 7YQAeOiMMuP

--HG--
extra : rebase_source : 8d1c89d0c03c3e7d9383d0731f65a327a2c11a8d
2018-06-07 13:06:33 -04:00
Kartikaya Gupta
9b664db1ff Bug 1465935 - Fix hit-testing for fixed-pos items inside iframes. r=mstange
Without this patch, the scrollId for display items inside a fixed-pos
item end as the ASR of the item. In the case of fixed-pos items that are
inside iframes, the ASR is the outer document's root scrollframe. This
means that e.g. wheel-scrolling while over a fixed-pos item inside an
iframe ends up scrolling the outer document's root scrollframe instead
of the iframe's root scrollframe.

In the non-WR codepath, there some APZ machinery that walks up in the
HitTestingTreeNode tree from the hit result, looking to see if that node
has a fixed-pos ancestor, and if so, uses the fixed-pos item's target
APZ as the real hit result. This machinery doesn't exist in WR, because
we don't use the HitTestingTreeNode tree for hit-testing in APZ.
Instead, we need to make sure that the item tag for those display items
already has the appropriate scrollid set.

This patch accomplishes this by introducing a new RAII class that is
pushed into the wr::DisplayListBuilder while we are building display
items inside a nsDisplayFixedPosition, and allows the desired scroll id to
be set on the hit-testing display items.

This behaviour is exercised by test_group_wheelevents, which can now be
enabled with this fix.

MozReview-Commit-ID: L2erPVzJeql

--HG--
extra : rebase_source : 1db630513cb1dc16d4e38649812e81f62c8da99c
2018-06-07 13:06:33 -04:00
Miko Mynttinen
9e0fa68289 Bug 1465118 - Part 4: Cache inverted transformation matrix for nsDisplayTransform r=mattwoodrow
MozReview-Commit-ID: H1b2oRCFkjZ

--HG--
extra : rebase_source : d7f9bf13c63f3418225dd48ebc6d34a465775992
2018-05-29 17:48:59 +02:00
Miko Mynttinen
d7c986461e Bug 1465118 - Part 3: Use Maybe<T> to cache transformation matrix r=mattwoodrow
MozReview-Commit-ID: 1oBc77ijXcv

--HG--
extra : rebase_source : a11a54ba3dc660c5f23cc310b0eae8c36aa9ee06
2018-05-29 15:07:43 +02:00
Miko Mynttinen
445dc3332d Bug 1465118 - Part 2: Remove unused nsDisplayTransform contructor r=mattwoodrow
MozReview-Commit-ID: 9kRBP6aQUcD

--HG--
extra : rebase_source : aed5f5051635330612901f6c06a90b12e65738ea
2018-05-29 15:07:10 +02:00
Miko Mynttinen
105dea894f Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic to avoid unnecessary work r=mattwoodrow
MozReview-Commit-ID: EuoSzUr1A9A

--HG--
extra : rebase_source : 68fa9f8d156b3751968ee9cf9440ad210a1be834
2018-05-29 00:36:12 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Cosmin Sabou
1bc774a842 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-01 12:44:57 +03:00
Cosmin Sabou
292d295d6b Merge inbound to mozilla-central. a=merge 2018-06-01 12:41:08 +03:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Matt Woodrow
eed3fa7cdd Bug 1459670 - Add frame tracking for the nsDisplayTable* classes. r=miko 2018-06-01 14:33:15 +12:00
Matt Woodrow
a6cecda388 Bug 1464737 - Make nsDisplayPerspective simpler by using the transform frame as mFrame. r=miko
MozReview-Commit-ID: CDjdjE2xCzG

--HG--
extra : rebase_source : 1779b8c20ca8eca4b0859ebc638c4b5bdcbac28d
2018-06-01 14:15:36 +12:00
Daniel Zielas
6e81464d99 Bug 1455182 - Additional cleanup to nsDisplayOwnLayer and ScrollbarData. r=botond
--HG--
extra : rebase_source : d0dd9840dab41e6a2dbd3427fafbf03b741441a1
2018-05-25 07:20:39 +02:00
Matt Woodrow
55904c6b43 Bug 1462497 - Follow-up to fix code that was accidentally inside a MOZ_DIAGNOSTIC_ASSERT_ENABLED block.
--HG--
extra : rebase_source : b83d1cba9ae77e01d7e972aae2d9611d1d5cac00
2018-05-25 09:56:28 +12:00
Miko Mynttinen
1bc60d55af Bug 1463752 - Part 1: Avoid unnecessary cast in FLBDisplayItemIterator::StartNested() r=mattwoodrow
MozReview-Commit-ID: 4oEpvVFSaU3

--HG--
extra : rebase_source : fbdf743048b212c27345139cff486682ead1023b
extra : intermediate-source : 5719eed9feccf6da6789fd347ab179e3b850ccd1
extra : source : 3cde092461e59cff7fe518742e9514f9f2346f60
2018-04-26 13:11:11 +02:00
Matt Woodrow
44fcf86181 Bug 1462497 - Part 3: Don't condition useOpacity on values that might change silently between paints (HasAnimationsForCompositor, and the will-change budget). r=hiro
MozReview-Commit-ID: Kry5YIAIAHt

--HG--
extra : rebase_source : ccc1085ad534da882a9f5ef03a5b7675bc39ed08
2018-05-23 11:03:42 +12:00
Matt Woodrow
fa6ba0bd5b Bug 1462497 - Part 1: Don't crash if we find an item from the wrong list, and keep looking instead r=miko
We will still crash in Nightly/DevEdition builds (so that we can fix the bug), but we'll just accept the possible duplication of items (and maybe minor rendering issues) for releases.

MozReview-Commit-ID: LNzjO8vJjGp

--HG--
extra : rebase_source : 3a755c0929bba42c0f6148e50f8d16567eea87e5
2018-05-23 10:59:11 +12:00
Kartikaya Gupta
63feb7051a Bug 1425565 - Use the container ASR for sticky items when building WebRender clips. r=mstange
Even if the sticky item has a fixed descendant, we want to use the
sticky container item's "real" ASR when computing the WR clips because
otherwise the WR item doesn't get attached to the correct scrolling
layer.

MozReview-Commit-ID: JVnzEIBeLKp

--HG--
extra : rebase_source : 806e43eb65d46eb5151e21b0a5eb09168b2df82d
2018-05-18 15:19:47 -04:00
Matt Woodrow
52baaee863 Bug 1462497 - Add assertions to try diagnose which wrapper item went away. r=mstange
MozReview-Commit-ID: BkU5tTlgFum

--HG--
extra : rebase_source : f376fb94a99adfe92ae61f6a06a79d872885a5b3
2018-05-18 20:50:04 +12:00
Matt Woodrow
6d94d6c09f Bug 1459997 - Add much more rigorous assertions for retained-dl assumptions. r=miko
This adds an assertion checking for duplicate items whenever we create an item, and when we merge an item into the final list.

I had to disable tracking for the anonymous inner list for nsDisplayPerspective and nsDisplayTransform (and manually forward RemoveFrame to them), as well as skipping the assertion for multi-page (since we can end up duplicating wrap lists, but isn't a problem, since we don't retain these).

MozReview-Commit-ID: 4n6rx9bQNan

--HG--
extra : source : ff93cd94b7c548ef57fa13b7eaf85992a0a60587
2018-05-01 11:56:40 -04:00
Xidorn Quan
5896b33074 Bug 1461933 - Remove ServoBindings.h from ComputedStyleInline.h. r=emilio
For doing this, ServoComputedData is split into separate files, so that
files don't need to include ServoBindings.h just for accessing style
structs from ComputedStyles.

MozReview-Commit-ID: DPAd7PUUCl9

--HG--
extra : rebase_source : 7d6f739b7fb58a46e1624ba62e717412057ea9c1
2018-05-16 15:35:59 +10:00
Matt Woodrow
5412f4e50b Bug 1461812 - Make sure we fully cleanup any partially constructed display lists when returning a failure from AttemptPartialUpdate. r=miko
MozReview-Commit-ID: DJBG6UFcoyR

--HG--
extra : rebase_source : 38e33ad785556b92b8058f00a85d48c27fb4d2e3
2018-05-16 12:55:08 +12:00
Andreea Pavel
9badaa53d2 Backed out changeset ff93cd94b7c5 (bug 1459997) for assertion failures at builds/worker/workspace/build/src/layout/painting/nsDisplayList.cpp:141 on a CLOSED TREE 2018-05-16 09:48:56 +03:00
Matt Woodrow
33d829994f Bug 1460491 - Part 2: Only recompute visibility for items if they are newly added to this layer, or intersect one that changed. r=jnicol
MozReview-Commit-ID: EAgvVQGsSPE

--HG--
extra : rebase_source : 44bc132a95d6d1b7e9cc3c22adcd4166a099237c
2018-05-16 16:02:37 +12:00
Matt Woodrow
0d65266918 Bug 1460491 - Part 1: Split nsDisplayItem::mVisibleRect into two members, one for each stated purpose. Gets rid of the save/restore since we no longer modify the building rect. r=jnicol
MozReview-Commit-ID: 5wcsSoZRN44

--HG--
extra : rebase_source : 1bf7d655b048a972e392514542aee171e20afe82
2018-05-16 15:56:32 +12:00
Matt Woodrow
840b789b4b Bug 1459997 - Add much more rigorous assertions for retained-dl assumptions. r=miko
This adds an assertion checking for duplicate items whenever we create an item, and when we merge an item into the final list.

I had to disable tracking for the anonymous inner list for nsDisplayPerspective and nsDisplayTransform (and manually forward RemoveFrame to them), as well as skipping the assertion for multi-page (since we can end up duplicating wrap lists, but isn't a problem, since we don't retain these).

MozReview-Commit-ID: 4n6rx9bQNan

--HG--
extra : rebase_source : 49da303965d63258f4c6023a0b09ef0de7553724
2018-05-01 11:56:40 -04:00
Matt Woodrow
085d0bbe3b Bug 1459441 - Make sure we build the full display list when we have blend containers in order to get the correct sorting for them. r=mstange
MozReview-Commit-ID: ECTU7enMb1r

--HG--
extra : rebase_source : 70f1b6187c152e770c4e19539645174c62198dc0
2018-05-10 11:39:12 +12:00
Csoregi Natalia
f034c0ab5d Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-10 12:52:31 +03:00
Matt Woodrow
560dfcc99f Bug 1452464. r=miko a=abillings 2018-04-21 16:25:33 +12:00
Matt Woodrow
250e99f481 Bug 1453541 - Part 2: Look for Out Of Flow frames with modified ancestors during ProcessFrame instead of during display list building. r=mstange
MozReview-Commit-ID: KsgrFqr2gVN

--HG--
extra : rebase_source : c4c370a48cbc5d3955e4b4d815c1d2b91eeb5601
2018-04-15 16:38:45 +12:00
Boris Zbarsky
30e5cc5d8b Bug 1387143 part 24. Remove nsISelection::ContainsNode. r=mats 2018-05-08 13:52:42 -04:00
Matt Woodrow
66ef22faf5 Bug 1439809 - Store the display list index on the display items during PreProcessDisplayList so that we can do lookup without a hashtable. r=miko,mstange
MozReview-Commit-ID: IYGk2KNkeY1

--HG--
extra : rebase_source : 11f9e6b3ff57ee129e339c882b7b53369e21308a
2018-04-24 12:59:11 +12:00
Matt Woodrow
1c08a21338 Bug 1439809 - Add an index parameter to nsDisplayWrapList to prevent scrollbar frames from creating duplicates. r=mattwoodrow
MozReview-Commit-ID: 8somakqqA3P

--HG--
extra : rebase_source : 9d82377196b53c3df3f2bfd4683d8454b1a3fa86
2018-04-24 12:59:08 +12:00
Matt Woodrow
a6e9002c24 Bug 1406727 - Improve diagnostics in BuildDisplayList. r=froydnj
MozReview-Commit-ID: Ctb7HFxgPac

--HG--
extra : rebase_source : 696683a6a905e0f4862e0a7f8a9708c487e5248b
2018-02-06 12:21:31 +13:00