зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539521 - replace MaybeTransform IPDL union with native Maybe syntax; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D25079 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
db5bd105a0
Коммит
f909db0383
|
@ -3500,14 +3500,14 @@ nsDOMWindowUtils::GetOMTCTransform(Element* aElement,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
MaybeTransform transform;
|
||||
Maybe<Matrix4x4> transform;
|
||||
forwarder->GetShadowManager()->SendGetTransform(
|
||||
layer->AsShadowableLayer()->GetShadow(), &transform);
|
||||
if (transform.type() != MaybeTransform::TMatrix4x4) {
|
||||
if (transform.isNothing()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Matrix4x4 matrix = transform.get_Matrix4x4();
|
||||
Matrix4x4 matrix = transform.value();
|
||||
RefPtr<nsROCSSPrimitiveValue> cssValue =
|
||||
nsComputedDOMStyle::MatrixToCSSValue(matrix);
|
||||
if (!cssValue) {
|
||||
|
|
|
@ -699,7 +699,7 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvGetAnimationValue(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult LayerTransactionParent::RecvGetTransform(
|
||||
const LayerHandle& aLayerHandle, MaybeTransform* aTransform) {
|
||||
const LayerHandle& aLayerHandle, Maybe<Matrix4x4>* aTransform) {
|
||||
if (mDestroyed || !mLayerManager || mLayerManager->IsDestroyed()) {
|
||||
return IPC_FAIL_NO_REASON(this);
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvGetTransform(
|
|||
transform *= layer->GetParent()->AsHostLayer()->GetShadowBaseTransform();
|
||||
}
|
||||
|
||||
*aTransform = transform;
|
||||
*aTransform = Some(transform);
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvSetConfirmedTargetAPZC(
|
|||
NS_ERROR(
|
||||
"Unexpected render root in RecvSetConfirmedTargetAPZC; dropping "
|
||||
"message...");
|
||||
return IPC_FAIL(this, "Bad render root");
|
||||
return IPC_FAIL(this, "Bad render root");
|
||||
}
|
||||
if (aTargets[i].mScrollableLayerGuid.mLayersId != GetId()) {
|
||||
NS_ERROR(
|
||||
|
|
|
@ -120,7 +120,7 @@ class LayerTransactionParent final : public PLayerTransactionParent,
|
|||
mozilla::ipc::IPCResult RecvGetAnimationValue(
|
||||
const uint64_t& aCompositorAnimationsId, OMTAValue* aValue);
|
||||
mozilla::ipc::IPCResult RecvGetTransform(const LayerHandle& aHandle,
|
||||
MaybeTransform* aTransform);
|
||||
Maybe<Matrix4x4>* aTransform);
|
||||
mozilla::ipc::IPCResult RecvSetAsyncScrollOffset(
|
||||
const ScrollableLayerGuid::ViewID& aId, const float& aX, const float& aY);
|
||||
mozilla::ipc::IPCResult RecvSetAsyncZoom(
|
||||
|
|
|
@ -563,11 +563,6 @@ struct TransactionInfo
|
|||
CompositionPayload[] payload;
|
||||
};
|
||||
|
||||
union MaybeTransform {
|
||||
Matrix4x4;
|
||||
void_t;
|
||||
};
|
||||
|
||||
union OMTAValue {
|
||||
null_t;
|
||||
nscolor;
|
||||
|
|
|
@ -81,7 +81,7 @@ parent:
|
|||
|
||||
// Returns the value of the transform applied to the layer by animation and
|
||||
// APZC.
|
||||
sync GetTransform(LayerHandle layer) returns (MaybeTransform transform);
|
||||
sync GetTransform(LayerHandle layer) returns (Matrix4x4? transform);
|
||||
|
||||
// The next time the layer tree is composited, add this async scroll offset in
|
||||
// CSS pixels for the given ViewID.
|
||||
|
|
Загрузка…
Ссылка в новой задаче