Bug 1610731 - Adjust the sticky positioned elements transform for the dynamic toolbar. r=botond

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kris Taeleman 2020-04-04 01:02:30 +00:00
Родитель 1219331fcf
Коммит 3acf2adc57
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -843,6 +843,23 @@ void APZCTreeManager::SampleForWebRender(
wr::ToWrTransformProperty(info.mFixedPositionAnimationId, transform));
}
for (const StickyPositionInfo& info : mStickyPositionInfo) {
ScreenPoint translation =
AsyncCompositionManager::ComputeFixedMarginsOffset(
GetCompositorFixedLayerMargins(), info.mFixedPosSides,
// For sticky layers, we don't need to factor
// mGeckoFixedLayerMargins because Gecko doesn't shift the
// position of sticky elements for dynamic toolbar movements.
ScreenMargin());
LayerToParentLayerMatrix4x4 transform =
LayerToParentLayerMatrix4x4::Translation(ViewAs<ParentLayerPixel>(
translation, PixelCastJustification::ScreenIsParentLayerForRoot));
transforms.AppendElement(
wr::ToWrTransformProperty(info.mStickyPositionAnimationId, transform));
}
aTxn.AppendTransformProperties(transforms);
// Advance animations. It's important that this happens after