зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1219331fcf
Коммит
3acf2adc57
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче