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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 void Document::updateStyleIfNeeded() 1768 void Document::updateStyleIfNeeded()
1769 { 1769 {
1770 ASSERT(isMainThread()); 1770 ASSERT(isMainThread());
1771 ASSERT(!view() || (!view()->isInLayout() && !view()->isPainting())); 1771 ASSERT(!view() || (!view()->isInLayout() && !view()->isPainting()));
1772 1772
1773 if (!needsStyleRecalc() && !childNeedsStyleRecalc() && !childNeedsDistributi onRecalc()) 1773 if (!needsStyleRecalc() && !childNeedsStyleRecalc() && !childNeedsDistributi onRecalc())
1774 return; 1774 return;
1775 1775
1776 AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : 0); 1776 AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : 0);
1777 recalcStyle(NoChange); 1777 recalcStyle(NoChange);
1778
1779 if (RuntimeEnabledFeatures::webAnimationsEnabled())
1780 cssPendingAnimations().startPendingAnimations();
1778 m_animationClock->unfreeze(); 1781 m_animationClock->unfreeze();
1779 } 1782 }
1780 1783
1781 void Document::updateStyleForNodeIfNeeded(Node* node) 1784 void Document::updateStyleForNodeIfNeeded(Node* node)
1782 { 1785 {
1783 if (!hasPendingForcedStyleRecalc() && !childNeedsStyleRecalc() && !needsStyl eRecalc()) 1786 if (!hasPendingForcedStyleRecalc() && !childNeedsStyleRecalc() && !needsStyl eRecalc())
1784 return; 1787 return;
1785 1788
1786 bool needsStyleRecalc = hasPendingForcedStyleRecalc(); 1789 bool needsStyleRecalc = hasPendingForcedStyleRecalc();
1787 for (Node* ancestor = node; ancestor && !needsStyleRecalc; ancestor = ancest or->parentOrShadowHostNode()) 1790 for (Node* ancestor = node; ancestor && !needsStyleRecalc; ancestor = ancest or->parentOrShadowHostNode())
(...skipping 3430 matching lines...) Expand 10 before | Expand all | Expand 10 after
5218 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode) 5221 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode)
5219 { 5222 {
5220 if (!isActive()) 5223 if (!isActive())
5221 return; 5224 return;
5222 5225
5223 styleEngine()->modifiedStyleSheet(sheet); 5226 styleEngine()->modifiedStyleSheet(sheet);
5224 styleResolverChanged(when, updateMode); 5227 styleResolverChanged(when, updateMode);
5225 } 5228 }
5226 5229
5227 } // namespace WebCore 5230 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698