Commit Graph

89 Commits

Author SHA1 Message Date
Sebastian Hengst
3654d560d6 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: DPQl41S3ZkU
2017-06-17 22:26:03 +02:00
Mats Palmgren
5ef66d5e7d 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
f8f1a23dc1 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
23716b1586 Bug 1368386 - Add PaintedLayer::InvalidateWholeLayer(). r=mattwoodrow
MozReview-Commit-ID: 7sgQDs82Wwt

--HG--
extra : rebase_source : 6a13c3b53f85d88535451cda57c76e5d845a53d5
extra : source : 92eb66a5357939ca239cb2167dcccbc2328ea51b
2017-06-15 17:29:18 -04:00
Botond Ballo
7d5f2e43a8 Bug 1369910 - Simplify AddingOwnLayer() call sites in ProcessDisplayItems(). r=mstange
MozReview-Commit-ID: 3kH48WPAOv7

--HG--
extra : rebase_source : 8bb31b37762f26383de3a1353aa8b70be243130a
2017-06-09 16:26:47 -04:00
Matt Woodrow
b32bf15627 Bug 1359709 - Scale visible region for preserve-3d layers correctly. r=thinker 2017-06-14 13:48:28 +12:00
Alexis Beingessner
adb013669b 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
f3bf820bfd 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
c75211cb95 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
9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
L. David Baron
53383e2d5c 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
b6e4ea3caa 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
724180965f Bug 1369910 - Simplify AddingOwnLayer() call sites in ProcessDisplayItems(). r=mstange
MozReview-Commit-ID: 3kH48WPAOv7

--HG--
extra : rebase_source : f0cf90be411a15e106457c06609c377082259af0
2017-06-02 16:43:33 -04:00
Miko Mynttinen
c64fdb5312 Bug 1367219 - Avoid multiple hashtable lookups in DisplayItemData destructor r=mattwoodrow
MozReview-Commit-ID: Jr4yx5A9gWd

--HG--
extra : rebase_source : 4e742e3d0a21285af6a729dcf860da365f242cfb
2017-06-06 18:12:17 +02:00
Botond Ballo
539791ed1e Bug 1367488 - Pre-render offscreen portions of scrollbar thumbs inside an iframe. r=mstange
MozReview-Commit-ID: LCBHnFJdGtp

--HG--
extra : rebase_source : 1ab1d812674d321d76e634953284b3983774d798
2017-05-29 18:05:05 -04:00
Ethan Lin
8dcfe0291d 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
b533c4c2ae Bug 1362000 - (followup) remove unused headers. r=me
MozReview-Commit-ID: 4SO8tdhbIHt

--HG--
extra : rebase_source : 7abc0bddf356bc705b130ea15294f8c5036f6ccf
2017-05-27 16:57:44 +08:00
cku
a71c525e73 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

--HG--
extra : rebase_source : 47103b6638e50dd2fb39f7b47e9cdc653446cd20
2017-05-14 19:28:01 +08:00
cku
0fa11bffa0 Bug 1362000 - (follow-up) Simplify match logic in CSSMaskLayerUserData::operator==. r=mstange
Remove HasUserSpaceOnUseUnitsMaskOrClipPath since it's not necessary.
MozReview-Commit-ID: 2sen23m5GjE

--HG--
extra : rebase_source : fe15fc807daf79f6f2175224928a1d83736cf85b
2017-05-27 01:38:54 +08:00
cku
082f6c2f30 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

--HG--
extra : rebase_source : c3e4d7b9df0c335222f09d7ce7d6918c7dbad00e
extra : source : 4717af028474a700a2b7e81eecae142f2ab82ff1
2017-05-12 20:17:14 +08:00
cku
51288e6cfe 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
Sebastian Hengst
635d32e534 Backed out changeset 3240cd94bf4b (bug 1351440) 2017-05-18 21:15:30 +02:00
cku
0fcc7571b7 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

--HG--
extra : rebase_source : 696bf495edc98a390f49ff0638165724521460b1
extra : source : 95f38c2c8b57134504e7fbe03d1637866e3e65ba
2017-05-08 21:27:20 +08:00
Botond Ballo
cd82f4e9cb Bug 1363423 - Prevent the maybe-hit region from growing too large (in terms of number of rectangles) in PaintedLayerData::AccumulateEventRegions(). r=jrmuizel
MozReview-Commit-ID: E7Pco25mlBc

--HG--
extra : rebase_source : afd5e02e5ba0b877d968c432e426288835f9b6d7
2017-05-12 20:28:12 -04:00
Matt Woodrow
e53f71e23e Bug 1343638. r=mstange, a=abillings 2017-03-21 13:07:49 +13:00
Ethan Lin
acc90f88ef Bug 1361662 - Round mask layer boundary to match other layers. r=mattwoodrow 2017-05-10 23:38:00 -04:00
Bas Schouten
dafd50f856 Bug 1331718 - Part 3: Store pointers to DisplayItemData directly on nsIFrame. r=mattwoodrow r=dbaron
This patch aims to speed up the lookup and storage of DisplayItemData objects, by removing a level of indirection and preventing the previously required hashtable lookup in order to access these. Instead it stores an array of pointers on each frame that allows direct access to the DisplayItemData object by dereferencing the frame. Since most frames get either 1 or 2 DisplayItemData objects attached to them a specialized class is used that is of minimal size (2 * sizeof(void)) and that performs well for sizes 1 or 2.

MozReview-Commit-ID: HONKAmpk5H8
2017-05-10 05:07:38 +02:00
Bas Schouten
cccd551d50 Bug 1330570: Allocate DisplayItemData into the PresShell Arena. r=mattwoodrow
MozReview-Commit-ID: 8zVPIVSslVA
2017-05-10 05:07:37 +02:00
Carsten "Tomcat" Book
85e7d31eb4 Backed out changeset 9483bb6d8ce6 (bug 1330570) for test failures in test_selection_move_commands.html | cmd_scrollBottom - -300 should equal -300 2017-05-10 12:11:11 +02:00
Carsten "Tomcat" Book
a1263f8111 Backed out changeset ff6861518bc3 (bug 1331718) 2017-05-10 12:09:04 +02:00
Bas Schouten
70d011d12c Bug 1331718 - Part 3: Store pointers to DisplayItemData directly on nsIFrame. r=mattwoodrow r=dbaron
This patch aims to speed up the lookup and storage of DisplayItemData objects, by removing a level of indirection and preventing the previously required hashtable lookup in order to access these. Instead it stores an array of pointers on each frame that allows direct access to the DisplayItemData object by dereferencing the frame. Since most frames get either 1 or 2 DisplayItemData objects attached to them a specialized class is used that is of minimal size (2 * sizeof(void)) and that performs well for sizes 1 or 2.

MozReview-Commit-ID: HONKAmpk5H8
2017-05-10 05:07:38 +02:00
Bas Schouten
17a260dee8 Bug 1330570: Allocate DisplayItemData into the PresShell Arena. r=mattwoodrow
MozReview-Commit-ID: 8zVPIVSslVA
2017-05-10 05:07:37 +02:00
Botond Ballo
515525ceb3 Bug 1357903 - Clip event regions when combining them to a containing PaintedLayerData. r=mstange
MozReview-Commit-ID: 9Z3ITH5raXl

--HG--
extra : rebase_source : 31c2bcf700282c096e36c0606e257f395fc2d010
2017-04-28 20:32:05 -04:00
Matt Woodrow
c95a73cfc6 Bug 1349418 - Require ASRs to match before allow occlusions between layers. r=mstange 2017-04-21 14:03:40 +12:00
Markus Stange
2a35142b62 Bug 1349418 - Remove checkerboarding code and just use an opaque background color behind root scroll frames. r=kats 2017-04-21 14:02:15 +12:00
Michael Layzell
8b7ba021a4 Bug 1339537 - Part 6: Pass std::function values tree by const reference instead of by value, r=ehsan
MozReview-Commit-ID: PVAqU2DPs2
2017-04-27 12:44:57 -04:00
Morris Tseng
7eb27c99ad Bug 1358961 - IsPartOfOpaqueLayer should consider ColorLayer as well. r=mattwoodrow
MozReview-Commit-ID: 9PUKdz7m1uJ
2017-04-25 11:02:48 +08:00
Sebastian Hengst
37d7b65041 merge mozilla-central to mozilla-inbound. r=merge a=backout 2017-04-21 18:36:31 +02:00
Sebastian Hengst
6e1c138a06 Backed out changeset 435e638babd1 (bug 1349418) for failing checkerboard-{1,2,3}.html on Android 4.3. r=backout a=backout
MozReview-Commit-ID: Au7FbypQNvf
2017-04-21 18:01:24 +02:00
Sebastian Hengst
4b2cbe9ca3 Backed out changeset 3ccf396a61fe (bug 1349418)
MozReview-Commit-ID: 8VeAi8IOAl4
2017-04-21 17:59:43 +02:00
Morris Tseng
17ca3b4db0 Bug 1358066 - Remove the painted layer invalidate region calculation if the painted layer has been optimized to color or image layer. r=mattwoodrow
MozReview-Commit-ID: KuwROm4DGk6
2017-04-21 15:27:48 +08:00
Matt Woodrow
7238b8d741 Bug 1349418 - Require ASRs to match before allow occlusions between layers. r=mstange
--HG--
extra : rebase_source : 6ac691aeb796c83c5b8c4387b7656afcb415e13d
2017-04-21 14:03:40 +12:00
Markus Stange
853d16cc7d Bug 1349418 - Remove checkerboarding code and just use an opaque background color behind root scroll frames. r=kats
--HG--
extra : rebase_source : d6b27d8b36eb8329cead0bd184c7ec6fd983ba53
2017-04-21 14:02:15 +12:00
Wes Kocher
5ce5528fb1 Merge inbound to m-c a=merge
MozReview-Commit-ID: DQDuEiYLWCO
2017-04-20 15:30:43 -07:00
Chris Peterson
9e037cb5e9 Bug 1356843 - Fix -Wcomma warnings in layout/. r=dholbert
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements or to call a function for side effects within an expression. In addition to fixing the warnings, replace some char16_t(' ') casts of char literals with shorter UTF-16 character literals u' '.

layout/painting/FrameLayerBuilder.cpp:3647:31 [-Wcomma] possible misuse of comma operator here
layout/painting/FrameLayerBuilder.cpp:3657:41 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3336:33 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3336:60 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3337:33 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3337:60 [-Wcomma] possible misuse of comma operator here
layout/style/Declaration.cpp:808:41 [-Wcomma] possible misuse of comma operator here
layout/style/Declaration.cpp:812:42 [-Wcomma] possible misuse of comma operator here
layout/style/FontFaceSet.cpp:1118:60 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: 9tfcIsnnBwM

--HG--
extra : rebase_source : 89916d1d7b43e4c4793364637a8d015242cb033f
extra : source : c5921d4d63f8f68eafe5a33013e08f9a455429d9
2017-04-09 21:11:45 -07:00
Astley Chen
f93fc0a7bc Bug 1355752 - Remove B2G code from FrameLayerBuilder.cpp. r=mstange
MozReview-Commit-ID: CbMnZJldiUl

--HG--
extra : rebase_source : 4899991aedc8cc2413fcf695601eb79c0245eb01
2017-04-20 13:16:43 +08:00
Matt Woodrow
438790335b Bug 1351412 - Make the ContainerState AGR cache work even for non-async scrollable AGRs. r=mstange
--HG--
extra : rebase_source : 2875fc0c55a4020dbb3979b741fb4fa378a1642d
2017-04-19 15:39:17 +12:00
Wes Kocher
5afdefe075 Backed out changeset f179621a517b (bug 1147538) for osx reftest failures a=backout 2017-04-13 23:59:49 -07:00
David Anderson
16e78d9ec4 Accumulate event region items into painted layers. (bug 1147538, r=mstange)
If a painted layer would previously only contain an event regions item, we
would not associate that item with any cached layer. As a result we would
generate a new, empty, invisible painted layer each frame. This is disastrous
on large layer trees as it can cause many needless repositions. Instead, we
make sure to accumulate the invisible item.
2017-04-13 20:27:52 -07:00
Iris Hsiao
22dd380d12 Backed out changeset 3910de7acce3 (bug 1349418)
--HG--
extra : rebase_source : e0ddc3d0c48256acd0996f16d3198560041f9c3e
2017-04-10 14:42:38 +08:00