AnimationCommon.cpp 1.3 KB

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