Bug 1456372 - Use GetWebRenderBridge() in nsDOMWindowUtils::GetOMTAStyle(). r=kats
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 30 Apr 2018 10:26:52 +0900
changeset 472460 47e17edbd3e731e5562ac42d442dcf648d1beec3
parent 472459 3d562de35a8dc1f96e254165b94760c7b9a67695
child 472461 3c41cb113527de184bb97f2f9c12a6d3b20d31e6
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1456372
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1456372 - Use GetWebRenderBridge() in nsDOMWindowUtils::GetOMTAStyle(). r=kats We can directly get WebRenderBridgeChild by the function. MozReview-Commit-ID: 6o4ZJMN2xAn
dom/base/nsDOMWindowUtils.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -3679,21 +3679,21 @@ nsDOMWindowUtils::GetOMTAStyle(Element* 
       if (layer) {
         ShadowLayerForwarder* forwarder = layer->Manager()->AsShadowForwarder();
         if (forwarder && forwarder->HasShadowManager()) {
           forwarder->GetShadowManager()->
             SendGetAnimationOpacity(layer->GetCompositorAnimationsId(),
                                     &value,
                                     &hadAnimatedOpacity);
         }
-      } else if (WebRenderLayerManager* wrlm = widgetLayerManager->AsWebRenderLayerManager()) {
+      } else if (WebRenderBridgeChild* wrbc = GetWebRenderBridge()) {
         RefPtr<WebRenderAnimationData> animationData =
             GetWebRenderUserData<WebRenderAnimationData>(frame, (uint32_t)DisplayItemType::TYPE_OPACITY);
         if (animationData) {
-          wrlm->WrBridge()->SendGetAnimationOpacity(
+          wrbc->SendGetAnimationOpacity(
               animationData->GetAnimationInfo().GetCompositorAnimationsId(),
               &value,
               &hadAnimatedOpacity);
         }
       }
       if (hadAnimatedOpacity) {
         cssValue = new nsROCSSPrimitiveValue;
         cssValue->SetNumber(value);
@@ -3704,21 +3704,21 @@ nsDOMWindowUtils::GetOMTAStyle(Element* 
       Layer* layer =
         FrameLayerBuilder::GetDedicatedLayer(frame, DisplayItemType::TYPE_TRANSFORM);
       if (layer) {
         ShadowLayerForwarder* forwarder = layer->Manager()->AsShadowForwarder();
         if (forwarder && forwarder->HasShadowManager()) {
           forwarder->GetShadowManager()->
             SendGetAnimationTransform(layer->GetCompositorAnimationsId(), &transform);
         }
-      } else if (WebRenderLayerManager* wrlm = widgetLayerManager->AsWebRenderLayerManager()) {
+      } else if (WebRenderBridgeChild* wrbc = GetWebRenderBridge()) {
         RefPtr<WebRenderAnimationData> animationData =
             GetWebRenderUserData<WebRenderAnimationData>(frame, (uint32_t)DisplayItemType::TYPE_TRANSFORM);
         if (animationData) {
-          wrlm->WrBridge()->SendGetAnimationTransform(
+          wrbc->SendGetAnimationTransform(
               animationData->GetAnimationInfo().GetCompositorAnimationsId(),
               &transform);
         }
       }
       if (transform.type() == MaybeTransform::TMatrix4x4) {
         Matrix4x4 matrix = transform.get_Matrix4x4();
         cssValue = nsComputedDOMStyle::MatrixToCSSValue(matrix);
       }