mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1212720 - Part 1: Implement Document.getAnimations(). r=heycam, r=smaug (8c3951b318) - Bug 1212720 - Part 2: Tests for document.getAnimations. r=heycam (8e6660abe1) - Bug 1212720 - Part 3: Remove AnimationTimeline.getAnimations. r=heycam, r=smaug (a663e7e79b) - Bug 1212720 - Part 4: Remove all cancelAllAnimationsOnEnd. It is not needed any more. r=bbirtles (8c9b92f2d4) - Bug 1218258 - Fix -Wimplicit-fallthrough warnings in toolkit/components/downloads. r=paolo (1962eee4fc) - Bug 1218258 - Fix -Wshadow warnings in toolkit/components/downloads. r=paolo (6cf1d464bb) - Bug 1212323: P1. Use a 640x360 SPS to test for HW decoding support. r=cpearce (ed67910d9c) - Bug 1212323: P2. Have IsVideoAccelerated return a Promise. r=cpearce (824e543945) - Bug 1240365 - FileReader should use the global scope correctly in ChromeWorkers, r=smaug, r=khuey (bf40380947) - Bug 1239210 - Don't process WebIDL files when not compiling; r=glandium (5a55f23b2e)
This commit is contained in:
@@ -10,10 +10,12 @@
|
||||
|
||||
#include "nsDocument.h"
|
||||
#include "nsIDocumentInlines.h"
|
||||
#include "mozilla/AnimationComparator.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/BinarySearch.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/IntegerRange.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Likely.h"
|
||||
@@ -3156,6 +3158,32 @@ nsDocument::Timeline()
|
||||
return mDocumentTimeline;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::GetAnimations(nsTArray<RefPtr<Animation>>& aAnimations)
|
||||
{
|
||||
FlushPendingNotifications(Flush_Style);
|
||||
|
||||
// Bug 1174575: Until we implement a suitable PseudoElement interface we
|
||||
// don't have anything to return for the |target| attribute of
|
||||
// KeyframeEffect(ReadOnly) objects that refer to pseudo-elements.
|
||||
// Rather than return some half-baked version of these objects (e.g.
|
||||
// we a null effect attribute) we simply don't provide access to animations
|
||||
// whose effect refers to a pseudo-element until we can support them
|
||||
// properly.
|
||||
for (nsIContent* node = nsINode::GetFirstChild();
|
||||
node;
|
||||
node = node->GetNextNode(this)) {
|
||||
if (!node->IsElement()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
node->AsElement()->GetAnimationsUnsorted(aAnimations);
|
||||
}
|
||||
|
||||
// Sort animations by priority
|
||||
aAnimations.Sort(AnimationPtrComparator<RefPtr<Animation>>());
|
||||
}
|
||||
|
||||
/* Return true if the document is in the focused top-level window, and is an
|
||||
* ancestor of the focused DOMWindow. */
|
||||
NS_IMETHODIMP
|
||||
|
||||
Reference in New Issue
Block a user