Files
palemoon27/dom/animation/AnimationUtils.cpp
T
roytam1 9ae14fcec8 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1003204: Removed CommonUtils.exceptionStr() in toolkit/ r=gfritzsche (d1c2efa08f)
- Bug 1243936 - Convert remaining callsites within devtools/ and toolkit/ to use channel.open2() (54f398eb47)
- Bug 1187270 - Add Telemetry session ID to crash annotations, r=gfritzsche (6c08170c5a)
- Bug 1249219 - Part 4: Use NonOwningAnimationTarget as the returned value of some animation target getters. r=birtles (df788abe39)
- Bug 1249219 - Part 5: Add a wrapper of AnimationAdded/Changed/Removed. r=birtles (58cf3a3ce2)
- Bug 1249219 - Part 6: Support pseudo elements in Animation Mutation Observer. r=heycam (d10c901821)
- Bug 1249219 - Part 7: Test. r=birtles (e2b78422be)
- add back some utils of Bug 751291  used in tests (8fd2cc847f)
- Bug 1253470 - Part 1: Produce console warnings for invalid duration. r=birtles (a0491eeab4)
- Bug 1253470 - Part 2: Produce console warnings for invalid iterationStart. r=birtles (6a910650c9)
- Bug 1253470 - Part 3: Produce console warnings for invalid iterations. r=birtles (e3210e754e)
- Bug 1253470 - Part 4: Produce console warnings for invalid easing. r=birtles (fc1868b3c0)
- Bug 1245748 - Move ComputedTiming to a separate file; r=heycam (22a76e4f03)
- Bug 1245748 - Rename Keyframe-related IDL types to match changes to Web Animations spec; r=heycam, r=bz (e79338bafd)
- Bug 1245748 - Update handling of 'composite' dictionary members to match changes to the spec; r=heycam, r=bz (d9cc71cde8)
- Bug 1245748 - Define the Keyframe type for storing specified keyframes; r=heycam (a429e2bf46)
- Bug 1245748 - Add missing includes to TimingParams.{cpp,h}; r=heycam (3e1e121c6f)
- Bug 1245748 - Move keyframe handling code to a separate KeyframeUtils class; r=heycam (e359f26244)
- Bug 1245748 - Add KeyframeUtils::GetKeyframesFromObject; r=heycam (eda69445d7)
- Bug 1245748 - Add nsStyleContext parameter to StyleAnimationValue::ComputeValue(s); r=heycam (2c22b9926c)
- Bug 1245748 - Add a variant of StyleAnimationValue::ComputeValues that takes an nsCSSValue; r=heycam (12386559dd)
- Bug 1245748 - Split PropertyPriorityComparator into a separate (reusable) class; r=heycam (132394bf45)
- Bug 1245748 - Add PropertyPriorityIterator; r=heycam (bfef46fd12)
- Bug 1245748 - Add GetAnimationPropertiesFromKeyframes; r=heycam (4681ac8407)
- Bug 1245748 - Add ApplyDistributeSpacing for Keyframe objects; r=heycam (9c0bc885c9)
- Bug 1245748 - Use Keyframe-based utility functions when constructing KeyframeEffect(ReadOnly); r=heycam (e0b7460548)
- Bug 1229859 - Introduce new import-globals-from eslint rule to import globals from other modules; r=Mossop (10075a136c)
2024-03-29 09:42:12 +08:00

50 lines
1.3 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AnimationUtils.h"
#include "nsDebug.h"
#include "nsIAtom.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsGlobalWindow.h"
#include "nsString.h"
#include "xpcpublic.h" // For xpc::NativeGlobal
namespace mozilla {
/* static */ void
AnimationUtils::LogAsyncAnimationFailure(nsCString& aMessage,
const nsIContent* aContent)
{
if (aContent) {
aMessage.AppendLiteral(" [");
aMessage.Append(nsAtomCString(aContent->NodeInfo()->NameAtom()));
nsIAtom* id = aContent->GetID();
if (id) {
aMessage.AppendLiteral(" with id '");
aMessage.Append(nsAtomCString(aContent->GetID()));
aMessage.Append('\'');
}
aMessage.Append(']');
}
aMessage.Append('\n');
printf_stderr("%s", aMessage.get());
}
/* static */ nsIDocument*
AnimationUtils::GetCurrentRealmDocument(JSContext* aCx)
{
nsGlobalWindow* win = xpc::CurrentWindowOrNull(aCx);
if (!win) {
return nullptr;
}
return win->GetDoc();
}
} // namespace mozilla