Bug 788549 Part 8: Only query layers when OMTA is enabled r=roc
authorDavid Zbarsky <dzbarsky@gmail.com>
Fri, 31 May 2013 11:06:56 -0700
changeset 133599 1b31ac7a1bb499ad30bce8348c97ab5c11ce6ce2
parent 133598 019382e246351ce36afb582bf2f7d7bc2c357302
child 133600 c0e5cb86164396076149c116df24b5d4e5a92bd8
push id28823
push userdzbarsky@gmail.com
push dateFri, 31 May 2013 18:06:59 +0000
treeherdermozilla-inbound@d9e151e7eb99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs788549
milestone24.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 788549 Part 8: Only query layers when OMTA is enabled r=roc
dom/base/nsDOMWindowUtils.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -3377,17 +3377,17 @@ nsDOMWindowUtils::GetOMTAOrComputedStyle
   ErrorResult rv;
   nsCOMPtr<Element> element = do_QueryInterface(aNode);
   if (!element) {
     return NS_ERROR_INVALID_ARG;
   }
 
   nsRefPtr<nsROCSSPrimitiveValue> cssValue = nullptr;
   nsIFrame* frame = element->GetPrimaryFrame();
-  if (frame) {
+  if (frame && nsLayoutUtils::AreAsyncAnimationsEnabled()) {
     if (aProperty.EqualsLiteral("opacity")) {
       Layer* layer = FrameLayerBuilder::GetDedicatedLayer(frame, nsDisplayItem::TYPE_OPACITY);
       if (layer) {
         float value;
         ShadowLayerForwarder* forwarder = layer->Manager()->AsShadowForwarder();
         if (forwarder) {
           forwarder->GetShadowManager()->SendGetOpacity(layer->AsShadowableLayer()->GetShadow(), &value);
           cssValue = new nsROCSSPrimitiveValue;