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/frame/FrameView.cpp

Issue 46043014: Web Animations CSS: Unfreeze AnimationClock if sampling timelines does not trigger style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reinstate assert Created 7 years, 1 month 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/TimedItemTest.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/frame/FrameView.h" 28 #include "core/frame/FrameView.h"
29 29
30 #include "HTMLNames.h" 30 #include "HTMLNames.h"
31 #include "RuntimeEnabledFeatures.h" 31 #include "RuntimeEnabledFeatures.h"
32 #include "core/accessibility/AXObjectCache.h" 32 #include "core/accessibility/AXObjectCache.h"
33 #include "core/animation/AnimationClock.h"
33 #include "core/animation/DocumentTimeline.h" 34 #include "core/animation/DocumentTimeline.h"
34 #include "core/css/FontFaceSet.h" 35 #include "core/css/FontFaceSet.h"
35 #include "core/css/resolver/StyleResolver.h" 36 #include "core/css/resolver/StyleResolver.h"
36 #include "core/dom/DocumentMarkerController.h" 37 #include "core/dom/DocumentMarkerController.h"
37 #include "core/editing/FrameSelection.h" 38 #include "core/editing/FrameSelection.h"
38 #include "core/events/OverflowEvent.h" 39 #include "core/events/OverflowEvent.h"
39 #include "core/fetch/ResourceFetcher.h" 40 #include "core/fetch/ResourceFetcher.h"
40 #include "core/fetch/TextResourceDecoder.h" 41 #include "core/fetch/TextResourceDecoder.h"
41 #include "core/html/HTMLFrameElement.h" 42 #include "core/html/HTMLFrameElement.h"
42 #include "core/html/HTMLHtmlElement.h" 43 #include "core/html/HTMLHtmlElement.h"
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 m_delayedLayout = false; 2019 m_delayedLayout = false;
2019 } 2020 }
2020 2021
2021 void FrameView::serviceScriptedAnimations(double monotonicAnimationStartTime) 2022 void FrameView::serviceScriptedAnimations(double monotonicAnimationStartTime)
2022 { 2023 {
2023 for (RefPtr<Frame> frame = m_frame; frame; frame = frame->tree().traverseNex t()) { 2024 for (RefPtr<Frame> frame = m_frame; frame; frame = frame->tree().traverseNex t()) {
2024 frame->view()->serviceScrollAnimations(); 2025 frame->view()->serviceScrollAnimations();
2025 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) 2026 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
2026 frame->animation().serviceAnimations(); 2027 frame->animation().serviceAnimations();
2027 if (RuntimeEnabledFeatures::webAnimationsEnabled()) { 2028 if (RuntimeEnabledFeatures::webAnimationsEnabled()) {
2028 frame->document()->timeline()->serviceAnimations(monotonicAnimationS tartTime); 2029 frame->document()->animationClock().updateTime(monotonicAnimationSta rtTime);
2029 frame->document()->transitionTimeline()->serviceAnimations(monotonic AnimationStartTime); 2030 bool didTriggerStyleRecalc = frame->document()->timeline()->serviceA nimations();
dstockwell 2013/11/05 05:05:44 It's unfortunate that we have to thread this all t
2031 didTriggerStyleRecalc |= frame->document()->transitionTimeline()->se rviceAnimations();
2032 if (!didTriggerStyleRecalc)
2033 frame->document()->animationClock().unfreeze();
2030 frame->document()->timeline()->dispatchEvents(); 2034 frame->document()->timeline()->dispatchEvents();
2031 frame->document()->transitionTimeline()->dispatchEvents(); 2035 frame->document()->transitionTimeline()->dispatchEvents();
2032 } 2036 }
2033 } 2037 }
2034 2038
2035 Vector<RefPtr<Document> > documents; 2039 Vector<RefPtr<Document> > documents;
2036 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext ()) 2040 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext ())
2037 documents.append(frame->document()); 2041 documents.append(frame->document());
2038 2042
2039 for (size_t i = 0; i < documents.size(); ++i) 2043 for (size_t i = 0; i < documents.size(); ++i)
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3460 void FrameView::setLayoutSizeInternal(const IntSize& size) 3464 void FrameView::setLayoutSizeInternal(const IntSize& size)
3461 { 3465 {
3462 if (m_layoutSize == size) 3466 if (m_layoutSize == size)
3463 return; 3467 return;
3464 3468
3465 m_layoutSize = size; 3469 m_layoutSize = size;
3466 contentsResized(); 3470 contentsResized();
3467 } 3471 }
3468 3472
3469 } // namespace WebCore 3473 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/TimedItemTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698