Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 760183003: Enable/Unprefix Animations & Transitions, add basic tests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: patch for landing Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 event = (*it)->create(eventType); 2060 event = (*it)->create(eventType);
2061 if (event) 2061 if (event)
2062 return event.release(); 2062 return event.release();
2063 } 2063 }
2064 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); 2064 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid.");
2065 return nullptr; 2065 return nullptr;
2066 } 2066 }
2067 2067
2068 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) 2068 void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
2069 { 2069 {
2070 if (eventType == EventTypeNames::webkitAnimationStart || (RuntimeEnabledFeat ures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::animations tart)) { 2070 if (eventType == EventTypeNames::animationstart) {
2071 addListenerType(ANIMATIONSTART_LISTENER); 2071 addListenerType(ANIMATIONSTART_LISTENER);
2072 } else if (eventType == EventTypeNames::webkitAnimationEnd || (RuntimeEnable dFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::anima tionend)) { 2072 } else if (eventType == EventTypeNames::animationend) {
2073 addListenerType(ANIMATIONEND_LISTENER); 2073 addListenerType(ANIMATIONEND_LISTENER);
2074 } else if (eventType == EventTypeNames::webkitAnimationIteration || (Runtime EnabledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames: :animationiteration)) { 2074 } else if (eventType == EventTypeNames::animationiteration) {
2075 addListenerType(ANIMATIONITERATION_LISTENER); 2075 addListenerType(ANIMATIONITERATION_LISTENER);
2076 } else if (eventType == EventTypeNames::webkitTransitionEnd || eventType == EventTypeNames::transitionend) { 2076 } else if (eventType == EventTypeNames::transitionend) {
2077 addListenerType(TRANSITIONEND_LISTENER); 2077 addListenerType(TRANSITIONEND_LISTENER);
2078 } else if (eventType == EventTypeNames::scroll) { 2078 } else if (eventType == EventTypeNames::scroll) {
2079 addListenerType(SCROLL_LISTENER); 2079 addListenerType(SCROLL_LISTENER);
2080 } 2080 }
2081 } 2081 }
2082 2082
2083 const AtomicString& Document::referrer() const 2083 const AtomicString& Document::referrer() const
2084 { 2084 {
2085 return nullAtom; 2085 return nullAtom;
2086 } 2086 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2789 using namespace blink; 2789 using namespace blink;
2790 void showLiveDocumentInstances() 2790 void showLiveDocumentInstances()
2791 { 2791 {
2792 WeakDocumentSet& set = liveDocumentSet(); 2792 WeakDocumentSet& set = liveDocumentSet();
2793 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2793 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2794 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2794 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2795 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2795 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2796 } 2796 }
2797 } 2797 }
2798 #endif 2798 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/CSSTokenizer-in.cpp ('k') | sky/engine/core/events/AnimationPlayerEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698