1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #include "AnimationCommon.h" 7 #include "nsTransitionManager.h" 8 #include "nsAnimationManager.h" 9 10 #include "ActiveLayerTracker.h" 11 #include "gfxPlatform.h" 12 #include "nsCSSPropertyIDSet.h" 13 #include "nsCSSValue.h" 14 #include "nsCycleCollectionParticipant.h" 15 #include "nsStyleContext.h" 16 #include "nsIFrame.h" 17 #include "nsLayoutUtils.h" 18 #include "FrameLayerBuilder.h" 19 #include "nsDisplayList.h" 20 #include "mozilla/AnimationUtils.h" 21 #include "mozilla/EffectCompositor.h" 22 #include "mozilla/EffectSet.h" 23 #include "mozilla/MemoryReporting.h" 24 #include "mozilla/dom/KeyframeEffectReadOnly.h" 25 #include "nsRuleProcessorData.h" 26 #include "nsStyleSet.h" 27 #include "nsStyleChangeList.h" 28 29 using mozilla::dom::Animation; 30 using mozilla::dom::KeyframeEffectReadOnly; 31 32 namespace mozilla { 33 34 nsPresContext* GetRenderedPresContext() const35OwningElementRef::GetRenderedPresContext() const 36 { 37 if (!mElement) { 38 return nullptr; 39 } 40 41 nsIDocument* doc = mElement->GetComposedDoc(); 42 if (!doc) { 43 return nullptr; 44 } 45 46 nsIPresShell* shell = doc->GetShell(); 47 if (!shell) { 48 return nullptr; 49 } 50 51 return shell->GetPresContext(); 52 } 53 54 } // namespace mozilla 55