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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 23327003: Web Animations: Set the DocumentTimeline's zero time when the Document reaches the 'loading' phase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 return String(); 1077 return String();
1078 } 1078 }
1079 1079
1080 void Document::setReadyState(ReadyState readyState) 1080 void Document::setReadyState(ReadyState readyState)
1081 { 1081 {
1082 if (readyState == m_readyState) 1082 if (readyState == m_readyState)
1083 return; 1083 return;
1084 1084
1085 switch (readyState) { 1085 switch (readyState) {
1086 case Loading: 1086 case Loading:
1087 if (!m_documentTiming.domLoading) 1087 if (!m_documentTiming.domLoading) {
1088 m_documentTiming.domLoading = monotonicallyIncreasingTime(); 1088 m_documentTiming.domLoading = monotonicallyIncreasingTime();
1089 if (RuntimeEnabledFeatures::webAnimationsEnabled())
1090 m_timeline->setZeroTimeAsPerfTime(m_documentTiming.domLoading);
1091 }
1089 break; 1092 break;
1090 case Interactive: 1093 case Interactive:
1091 if (!m_documentTiming.domInteractive) { 1094 if (!m_documentTiming.domInteractive)
1092 m_documentTiming.domInteractive = monotonicallyIncreasingTime(); 1095 m_documentTiming.domInteractive = monotonicallyIncreasingTime();
1093 if (RuntimeEnabledFeatures::webAnimationsEnabled())
1094 m_timeline->setZeroTimeAsPerfTime(m_documentTiming.domInteractiv e);
1095 }
1096 break; 1096 break;
1097 case Complete: 1097 case Complete:
1098 if (!m_documentTiming.domComplete) 1098 if (!m_documentTiming.domComplete)
1099 m_documentTiming.domComplete = monotonicallyIncreasingTime(); 1099 m_documentTiming.domComplete = monotonicallyIncreasingTime();
1100 break; 1100 break;
1101 } 1101 }
1102 1102
1103 m_readyState = readyState; 1103 m_readyState = readyState;
1104 dispatchEvent(Event::create(eventNames().readystatechangeEvent, false, false )); 1104 dispatchEvent(Event::create(eventNames().readystatechangeEvent, false, false ));
1105 } 1105 }
(...skipping 4112 matching lines...) Expand 10 before | Expand all | Expand 10 after
5218 { 5218 {
5219 return DocumentLifecycleNotifier::create(this); 5219 return DocumentLifecycleNotifier::create(this);
5220 } 5220 }
5221 5221
5222 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5222 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5223 { 5223 {
5224 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5224 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5225 } 5225 }
5226 5226
5227 } // namespace WebCore 5227 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698