Commit Graph

970 Commits

Author SHA1 Message Date
Matt Woodrow
193414f9a8 Bug 1237102 - Make sure we don't generate invalidations for children of opacity:0 frames, even when plugins are present. r=tnikkel 2016-08-10 15:15:28 +12:00
Hiroyuki Ikezoe
c4cce17f20 Bug 1292441 - Part 1: Avoid crashes when 'reftest-opaque-layer' is specified against an element having an display item which is not assigned to a PaintedLayer. r=mstange
MozReview-Commit-ID: HISvrzIwUZ2

--HG--
extra : rebase_source : da0c2e25d529ce6bf82d38f434301eb0f0f62503
2016-08-08 09:41:50 +09:00
Markus Stange
ecd527362a Bug 1259872 - Don't cull all layers under an opaque layer that covers the container if that layer has a scrolled clip. r=mattwoodrow
MozReview-Commit-ID: Abmm28HiLqR

--HG--
rename : layout/reftests/async-scrolling/bg-fixed-child-no-culling-ref.html => layout/reftests/async-scrolling/bg-fixed-child-no-culling-1-ref.html
rename : layout/reftests/async-scrolling/bg-fixed-child-no-culling.html => layout/reftests/async-scrolling/bg-fixed-child-no-culling-1.html
extra : rebase_source : e8008f9011459d0c28b6b914a9a0e23a953f1469
2016-08-04 22:40:56 -04:00
Markus Stange
ebb461c874 Bug 1012752 - Snap scrolled area to layer pixels. r=tnikkel
We want the maximum scroll position to be aligned with layer pixels. That way
we don't have to re-rasterize the scrolled contents once scrolling hits the
edge of the scrollable area.

Here's how we determine the maximum scroll position: We get the scroll port
rect, snapped to layer pixels. Then we get the scrolled rect and also snap
that to layer pixels. The maximum scroll position is set to the difference
between right/bottom edges of these rectangles.
Now the scrollable area is computed by adding this maximum scroll position
to the unsnapped scroll port size.
The underlying idea here is: Pretend we have overflow:visible so that the
scrolled contents start at (0, 0) relative to the scroll port and spill over
the scroll port edges. When these contents are rendered, their rendering is
snapped to layer pixels. We want those exact pixels to be accessible by
scrolling.

This way of computing the snapped scrollable area ensures that, if you scroll
to the maximum scroll position, the right/bottom edges of the rendered
scrolled contents line up exactly with the right/bottom edges of the scroll
port. The scrolled contents are neither cut off nor are they moved too far.
(This is something that no other browser engine gets completely right, see the
testcase in bug 1012752.)

There are also a few disadvantages to this solution. We snap to layer pixels,
and the size of a layer pixel can depend on the zoom level, the document
resolution, the current screen's scale factor, and CSS transforms. The snap
origin is the position of the reference frame. So a change to any of these
things can influence the scrollable area and the maximum scroll position.
This patch does not make us adjust the current scroll position in the event
that the maximum scroll position changes such that the current scroll position
would be out of range, unless there's a reflow of the scrolled contents. This
means that we can sometimes render a slightly inconsistent state where the
current scroll position exceeds the maximum scroll position. We can fix this
once it turns out to be a problem; I doubt that it will be a problem because
none of the other browsers seems to prevent this problem either.

The size of the scrollable area is exposed through the DOM properties
scrollWidth and scrollHeight. At the moment, these are integer properties, so
their value is rounded to the nearest CSS pixel. Before this patch, the
returned value would always be within 0.5 CSS pixels of the value that layout
computed for the content's scrollable overflow based on the CSS styles of the
contents.
Now that scrollWidth and scrollHeight also depend on pixel snapping, their
values can deviate by up to one layer pixel from what the page might expect
based on the styles of the contents. This change requires a few changes to
existing tests.
The fact that scrollWidth and scrollHeight can change based on the position of
the scrollable element and the zoom level / resolution may surprise some web
pages. However, this also seems to happen in Edge. Edge seems to always round
scrollWidth and scrollHeight upwards, possibly to their equivalent of layout
device pixels.

MozReview-Commit-ID: 3LFV7Lio4tG

--HG--
extra : rebase_source : 3e4e0b60493397e61283aa1d7fd93d7c197dec29
extra : source : d43c2d5e87f31ff47d7f3ada66c3f5f27cef84a9
2016-08-04 23:51:58 -04:00
Markus Stange
840bf3bfdb Bug 1292395 - Tweak this assertion message. r=mattwoodrow
MozReview-Commit-ID: AARqrxI1Qwn

--HG--
extra : rebase_source : 0524667582af2a4a972ecf51ad912eef8a722ddc
2016-08-04 22:00:04 -04:00
Carsten "Tomcat" Book
336c76b079 Merge mozilla-central to mozilla-inbound 2016-08-04 16:07:29 +02:00
Botond Ballo
9ee2ae8d53 Bug 1287075 - Back out bug 1273250, part 4 for regressing the rendering of the Australis submenus. r=mstange
MozReview-Commit-ID: 1m8lVoIX3qT

--HG--
extra : rebase_source : ff3a2c7d9025e3edc310b4c289a6149eb9d1b8d5
2016-08-03 13:48:10 -04:00
Sotaro Ikeda
a6770561f9 Bug 1289829 - Change mask SurfaceSize calculation r=mattwoodrow 2016-08-04 06:09:25 -07:00
Carsten "Tomcat" Book
03f2893f26 Backed out changeset 5b940f1bf535 (bug 1289829) for reftest failures 2016-08-04 09:58:10 +02:00
Sotaro Ikeda
4bf4a29dce Bug 1289829 - Change mask SurfaceSize calculation r=mattwoodrow 2016-08-03 19:00:19 -07:00
Nicolas Silva
48805c9b3e Bug 1284837 - Disallow implicit conversions from float to integer when creating IntPoint and IntSize objects. r=botond 2016-07-26 16:48:30 +02:00
Botond Ballo
662cc63aec Bug 1285619 - Call ResetLayerStateForRecycling() when recycling an image or color layer. r=mstange
MozReview-Commit-ID: GD4NRCoJXWf

--HG--
extra : rebase_source : 72d5f05d209e75335c0c2b3f2a7fde1942d553e7
2016-07-08 17:25:09 -04:00
Botond Ballo
63753c933b Bug 1285619 - Call ResetLayerStateForRecycling() when recycling an OwnLayer. r=mstange
MozReview-Commit-ID: 66J6wBcrYDQ

--HG--
extra : rebase_source : 6ce3db9d7711a833b6385f531548f660fa6997ca
2016-07-08 17:24:48 -04:00
Botond Ballo
271ec9548b Bug 1285619 - Introduce a ResetLayerStateForRecycling() helper function. r=mstange
MozReview-Commit-ID: DLktq4PYNba

--HG--
extra : rebase_source : ff9445f1d2593232b30d1ef643af5dd30c7e6375
2016-07-08 16:30:47 -04:00
Matt Woodrow
ef68295847 Bug 1217803 - Always build a mask layer if we have rounded corners, regardless of the visible region since this might change on the compositor. r=mstange
--HG--
extra : rebase_source : f874a7effd7c0985718c45be2343ca86586ac4bd
2016-07-25 14:41:25 +12:00
Kartikaya Gupta
879f91bb9c Bug 1286957 - Because combining touch-action areas into the event regions is fraught with peril, dump them into the dispatch-to-content region. r=tnikkel
MozReview-Commit-ID: FOyCEFP3Hw6
2016-07-20 19:02:09 -04:00
Brad Werth
bb6b3396a0 Bug 1243559 - Removes static casts from calls to FrameProperties::Get, ::Set, and ::Remove, and forces callers to use the type associated with the property. r=dbaron 2016-06-21 13:17:11 -07:00
Phil Ringnalda
28ae5ce216 Back out changeset 0bb00282a4c2 (bug 1243559) for widespread SVG assertion failures
CLOSED TREE
2016-06-22 18:45:08 -07:00
Brad Werth
179aa18d0d Bug 1243559 - Removes static casts from calls to FrameProperties::Get, ::Set, and ::Remove, and forces callers to use the type associated with the property. r=dbaron
--HG--
extra : rebase_source : fd19554f1611f8028a364ce93e833d8939688bfb
2016-06-21 13:17:11 -07:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Nicholas Nethercote
a02611e830 Bug 1276824 (part 1) - Rename gfxContext::ForDrawTarget{,WithTransform}(). r=milan.
The new names Create{,PreservingTransform}OrNull() better communicate that
these functions (a) do object creation, and (b) are fallible.

--HG--
extra : rebase_source : a36bd9a2bcdfae281868959403f811f2bc690ad4
2016-06-07 09:39:56 +10:00
Kartikaya Gupta
f04e92726d Bug 1108052 - Remove empty event regions display items because they only slow things down and can add extraneous layers. r=mstange
MozReview-Commit-ID: JkXGiudjBpe

--HG--
extra : rebase_source : a1eecb5705e79c992b0531711b4c0d40092712c4
2016-06-03 10:20:38 -04:00
Markus Stange
704cee440f Bug 1272801 - Remove unused aForceOwnLayer argument. r=mattwoodrow
MozReview-Commit-ID: JytuAlukyy8

--HG--
extra : rebase_source : 4d03fdb8553607214fe5feaf703d33359bb20186
2016-06-02 16:44:32 -04:00
Markus Stange
b26de4a29a Bug 1153694 - Don't let nsDisplayFixedPosition cause unnecessary layerization around itself. r=mattwoodrow
MozReview-Commit-ID: 66q3PkOdvTe

--HG--
extra : rebase_source : cc7abd074a210bc03daef403c23a40ff4b681f3e
extra : amend_source : c58e6b96a2f8a88ae0e221ec51927825a4f07bbb
extra : histedit_source : 520123d9dc28c504cff5d534c9df30b0319fa423%2C0b4523e5cfc9c20d8196c837f8c6c20a23dd984e
2016-06-02 20:55:02 -04:00
Jamie Nicol
31350135f5 Bug 1274528 - Don't enforce layers.max-active when layerizing items with different AGRs. r=mstange
This reverts bug 1231818, as it caused problems with async scrolling on
pages with too many active layers.

MozReview-Commit-ID: 8eGjn4fzWFb
2016-05-27 16:29:19 +01:00
Botond Ballo
57c1a0f283 Bug 1273250 - Simplify logic for determining whether a display item should be fixed to thew viewport. r=mstange
MozReview-Commit-ID: 3tXhaBnNa0K

--HG--
extra : rebase_source : 2e894c9dd444cf49606a4a4381e86a5b9f11669b
extra : amend_source : ba114ec32272b696c3b29d45d42c4a36ad3854fb
extra : histedit_source : 7f40ea44e8983191bc3a1b15ab2ddedbe5fc2cbe
2016-05-16 19:49:49 -04:00
Botond Ballo
bdb7838ac2 Bug 1273250 - Set a layer clip rather than a scroll clip for fixed background layers if the clip moves with the layer. r=mstange
This patch also removes the earlier workaround added in bug 1272525.

MozReview-Commit-ID: HR2wF2BGsKl

--HG--
extra : rebase_source : b561f8721d91c930bced7664f11a331552b97a5e
extra : histedit_source : d57e430f76851ce252416aa77fdaad0897d03756
2016-05-16 17:20:23 -04:00
Botond Ballo
8320a4382b Bug 1273250 - Expand the visible rect of fixed background display items instead of special-casing them in FrameLayerBuilder. r=mstange
MozReview-Commit-ID: DT3Mh8ordzQ

--HG--
extra : rebase_source : 5da55ed6ec733ff10c2c855c95bf4109fdbbe4b5
extra : histedit_source : e002d39c9d4df54468d66fd13a9663db799d490f
2016-05-16 17:14:29 -04:00
Kan-Ru Chen
d5a5ebb1c5 Bug 1271931 - Make DisplayItem::IsUniform to return Maybe<nscolor>. r=tnikkel
Maybe<nscolor> ensures that correct value is returned and also makes the
error checking clearer than using a out param.

MozReview-Commit-ID: 39uHIFCZzqn

--HG--
extra : rebase_source : 1885906646ebc9739c86aecb2b8e4bd0ee02e97f
2016-05-19 16:07:52 +08:00
Matt Woodrow
ecff14fb35 Bug 1141468 - Clean up prerendering code in nsDisplayTransform to be easier to follow. r=mstange 2016-05-18 15:12:44 +12:00
Matt Woodrow
2e5a9db070 Bug 1141468 - Don't attempt to modify prerender state (for will-change) in nsDisplayTransform since it's already too late. r=BenWa,mstange 2016-05-18 15:12:14 +12:00
Kartikaya Gupta
6637b49101 Bug 1271432 - Optimization to avoid recomputing the same Matrix over and over. r=tnikkel
MozReview-Commit-ID: 28lV5ZRswxu
2016-05-17 11:05:46 -04:00
Kartikaya Gupta
9fe9512858 Bug 1271432 - When combining event regions across layers, don't expand the regions that shouldn't be expanded. r=tnikkel
MozReview-Commit-ID: 6GlYiJAm7rO
2016-05-17 11:05:46 -04:00
Botond Ballo
364c95341e Bug 1272525 - Set a layer clip rather than a scroll clip for fixed background layers if not using a widget layer manager. r=mstange
MozReview-Commit-ID: 2fJyQXSLzsU

--HG--
extra : source : 8a282bae4fa3451efb3187d695ce0d523262acfd
extra : amend_source : 2e3d55a4cee03f6c3c58fe85e98f87a034f2bd39
extra : histedit_source : f6d5b5bfa98795824c0968065011b9ff4a4a6f5d
2016-05-16 14:15:48 -04:00
Botond Ballo
0c3f8a3e7d Bug 1267438 - Remove the (no longer used) isClipFixed=false annotation. r=mstange
MozReview-Commit-ID: LicG7zFHnX3

--HG--
extra : rebase_source : 1b39fcb34403dfa92f19100b3a59c3f550d52ff1
extra : source : 2bf1247f574319f27f570bb372a71d6a826ab1fb
extra : histedit_source : cc75a6e848225552adb9b3148ca4e2bb87b94f80
2016-05-04 20:07:42 -04:00
Botond Ballo
11c0c8ea42 Bug 1267438 - For fixed backgrounds, use the scrolled clip rather than the isClipFixed=false annotation. r=mstange
MozReview-Commit-ID: 9STe7ypglpP

--HG--
extra : rebase_source : c8ed350bc1eb9a0aecb47b9e81730162deeaaf87
extra : source : 4aa07089ce57c4e66e6f4f4cacc915118ea39429
extra : histedit_source : cdc3f82d57dc231ff148e35ab40c2dd197947ad4
2016-05-06 19:02:26 -04:00
Botond Ballo
de687339fd Bug 1267438 - Support adding ancestor mask layers from places other than SetupScrollingMetadata. r=mstange
MozReview-Commit-ID: DwdbSRdEMEc

--HG--
extra : rebase_source : 703ff74d56cecf0546457ff8940265f97a3331cc
extra : source : 1c8e4840f8b40b7e02b9274e446e278e8c907053
extra : histedit_source : 6efd4834b4ec52a6d57a05bdd9529cf39a7669a4
2016-05-06 19:34:16 -04:00
Botond Ballo
0702a1f217 Bug 1267438 - Group ScrollMetadata's optional clip rect and mask layer index into a LayerClip structure. r=mstange
MozReview-Commit-ID: 6W0GZYkioov

--HG--
extra : rebase_source : f99b4c8bd571fd82ddd7e6121caac57b13c380f7
extra : source : b802e4ef209948f307565f2ba750b2fbd340bcb6
extra : histedit_source : 016fe1d78bde06feeb483446fdfb508448573d72
2016-04-29 16:14:21 -04:00
Sotaro Ikeda
9eab898cc6 Bug 1252405 - Reduce MaskLayer's memory usage r=mattwoodrow 2016-05-10 03:18:11 -07:00
Botond Ballo
810a495c93 Backed out 12 changesets (bug 1267438) for Android reftest failures on a CLOSED TREE. r=backout
MozReview-Commit-ID: LlibhRhbyVO

--HG--
extra : rebase_source : 6e2e52316ff4ef777b2a63ce5fb6ffc172623e40
2016-05-10 04:27:31 -04:00
Botond Ballo
89c6c3b097 Bug 1267438 - Remove the (no longer used) isClipFixed=false annotation. r=mstange
MozReview-Commit-ID: LicG7zFHnX3

--HG--
extra : rebase_source : 0e4d3a86f2fbc4b88126a346c938c8f9fd67bf4b
extra : histedit_source : 0b785c0881d1bf4ed5f7c991574d8d7033b71bfc
2016-05-04 20:07:42 -04:00
Botond Ballo
c0f4837a5f Bug 1267438 - For fixed backgrounds, use the scrolled clip rather than the isClipFixed=false annotation. r=mstange
MozReview-Commit-ID: 9STe7ypglpP

--HG--
extra : rebase_source : 9324a8487cc52ab66b0ab9bc510e8261288381c9
extra : histedit_source : f945314ddfbe35ba5615ec5a417b967ade448a93
2016-05-06 19:02:26 -04:00
Botond Ballo
a5f375a42f Bug 1267438 - Support adding ancestor mask layers from places other than SetupScrollingMetadata. r=mstange
MozReview-Commit-ID: DwdbSRdEMEc

--HG--
extra : rebase_source : 07cfbb871a15404d7d4766aea0b8f8387e42f67b
extra : histedit_source : 66dc2ae14acf2ae399e810785ccd7ee51550445d
2016-05-06 19:34:16 -04:00
Botond Ballo
8699c362f8 Bug 1267438 - Group ScrollMetadata's optional clip rect and mask layer index into a LayerClip structure. r=mstange
MozReview-Commit-ID: 6W0GZYkioov

--HG--
extra : rebase_source : c46d0d27145df9b268e70ab5aed67c8c64df9433
extra : histedit_source : 016fe1d78bde06feeb483446fdfb508448573d72
2016-04-29 16:14:21 -04:00
Markus Stange
e475933648 Bug 1266161 - Make DrawForcedBackgroundColor fill the entire draw region, not just the layer's visible region. r=mattwoodrow
We need to do this because the entire draw region will be added to the layer's
valid region after drawing. If there are parts in the valid region that are not
in the visible region, we still need those parts to have valid content, because
in a later frame the visible region may grow to include those parts.

MozReview-Commit-ID: 6zESYbPAmrx

--HG--
extra : rebase_source : 24078d1ff802e53a2eb8895d2c5ffd1fe9507f04
2016-05-06 13:53:56 -04:00
Kartikaya Gupta
ec6390b365 Bug 1264592 - When doing thumbnails for fennec, don't mark frames as painted because it can interfere with tests. r=mstange
MozReview-Commit-ID: KOhZZV3aSLv

--HG--
extra : rebase_source : 80e39ca63cf3b3c54b6adcc8bac23bcd148467f9
2016-05-06 10:31:11 -04:00
Matt Woodrow
8a17b3e85d Bug 1266380 - Don't try to untransform visible regions for inactive perspective layers. r=thinker 2016-04-28 17:05:46 +12:00
Kartikaya Gupta
726b05f89b Bug 1231396 - Add a pref to record and print out the number of pixels painted. r=mstange
MozReview-Commit-ID: 2qqnL6rqjcL
2016-04-19 17:07:57 -04:00
Markus Stange
789850e1f0 Back out bug 1164227, because bug 1236043 fixes the original problem in a better way.
MozReview-Commit-ID: F4bD1MvOWDR

--HG--
extra : rebase_source : 43a53b31eea4f945b2cca647514e073603d44e75
2016-03-28 18:37:07 -04:00
Milan Sreckovic
e0b2b9e425 Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman
MozReview-Commit-ID: rHhLEDZEQt

--HG--
extra : rebase_source : 4988f3f488c19dd35a9979e96f78a5511ee8f3d2
2016-04-12 15:18:11 -04:00