Bug 850487. Fix --enable-profiling build breakage by not relying on imports inside #ifdefs. r=bnicholson

--HG--
extra : rebase_source : a303b5a1d3b574f10cb640476ef2f4f8f10bd202
Bug 852489. Part 0: Disable part of testSystemPages for intermittent failures. r=gbrown

--HG--
extra : rebase_source : 46ea90f9cf0addf0b07d9d2eee5618e4c3eaf41c
Bug 852489. Part 1: Don't create nsDisplayButtonForegrounds for buttons that aren't focused. r=mats

--HG--
extra : rebase_source : 93ad60be2d64345fee5bbdd4553b11b5d8341d18
Bug 852489. Part 3: Add logging to track addition of IPC edits and causes of layer mutation. Also avoid unnecessary mutate in ClearAnimations. r=mattwoodrow

--HG--
extra : rebase_source : 65557e5e223ff7b30d5eeccf534e950451d664b9
Bug 852489. Part 3.5: Ensure that Mutated is called for all layer attributes. r=mattwoodrow

--HG--
extra : rebase_source : b4886464e3126e96b4c28a21fc18ff0be048ebb7
Bug 852489. Part 4: Don't call RepositionChild if the layer is already in the right position. r=mattwoodrow

--HG--
extra : rebase_source : 1a3be842c65ab00dc7a72361e522e5343e5de967
Bug 852489. Part 5: Don't temporarily reset clip rect when reusing an existing layer. r=mattwodrow

--HG--
extra : rebase_source : 65ace15a404e25e14c02e514077997554d36f092
Bug 852489. Part 6: Don't temporarily reset clip when recycling Thebes/Image/ColorLayers. r=mattwoodrow

--HG--
extra : rebase_source : 28ac0c65edef8d2f0de2e79003370520066508e7
Bug 852489. Part 7: Remove Layer::IntersectClipRect because it's no longer used and it's prone to cause unnecessary Mutateds. r=mattwoodrow

--HG--
extra : rebase_source : 45d5365865894f5bf05c1ae41da670e9f28c53bf
Bug 852489. Part 9: Avoid temporarily setting a layer's visible region to a non-final value. r=mattwoodrow
We currently set the visible region on most container layers twice: once in
BuildContainerLayerFor, where we don't take clipping from ancestors into
account, and then later ProcessDisplayItems calls RestrictVisibleRegionForLayer
which does take ancestor clipping into account. This causes unnecessary
Mutated()s.

In this patch we partially fix this by forcing transform layers to take
account of their ancestor clipping when they set the visible region in
BuildContainerLayerFor. For those layers we don't need to apply
ancestor clipping in ProcessDisplayItems. This is done in a rather
ugly way, by passing the ancestor clip rect as an extra field of
ContainerParameters. To preserve the optimization that prerendered
elements are treated as fully visible regardless of ancestor clipping,
we have to add a flag to turn that clipping off in BuildContainerLayerFor.

In bug 841192 we will be able to fix this in a much nicer way, because we can
get the ancestor clip directly off the nsDisplayItem passed to
BuildContainerLayerFor. But this approach is needed for the B2G18 branch.

--HG--
extra : rebase_source : 26fbe55db84ab96e1e358b8803b0563f42590836