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

Unified Diff: Source/core/page/animation/AnimationController.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/TouchDisambiguation.cpp ('k') | Source/core/page/animation/ImplicitAnimation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/animation/AnimationController.cpp
diff --git a/Source/core/page/animation/AnimationController.cpp b/Source/core/page/animation/AnimationController.cpp
index b6a61dca2125101840fbe2a9b7082bbdc22395bd..b0fad9b55e5b57be34963dc208131da6de457985 100644
--- a/Source/core/page/animation/AnimationController.cpp
+++ b/Source/core/page/animation/AnimationController.cpp
@@ -313,7 +313,7 @@ void AnimationControllerPrivate::suspendAnimationsForDocument(Document* document
RenderObjectAnimationMap::const_iterator animationsEnd = m_compositeAnimations.end();
for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) {
RenderObject* renderer = it->key;
- if (renderer->document() == document) {
+ if (&renderer->document() == document) {
CompositeAnimation* compAnim = it->value.get();
compAnim->suspendAnimations();
}
@@ -329,7 +329,7 @@ void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document)
RenderObjectAnimationMap::const_iterator animationsEnd = m_compositeAnimations.end();
for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) {
RenderObject* renderer = it->key;
- if (renderer->document() == document) {
+ if (&renderer->document() == document) {
CompositeAnimation* compAnim = it->value.get();
compAnim->resumeAnimations();
}
@@ -391,7 +391,7 @@ unsigned AnimationControllerPrivate::numberOfActiveAnimations(Document* document
for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) {
RenderObject* renderer = it->key;
CompositeAnimation* compAnim = it->value.get();
- if (renderer->document() == document)
+ if (&renderer->document() == document)
count += compAnim->numberOfActiveAnimations();
}
@@ -498,9 +498,6 @@ void AnimationController::cancelAnimations(RenderObject* renderer)
PassRefPtr<RenderStyle> AnimationController::updateAnimations(RenderObject* renderer, RenderStyle* newStyle)
{
- if (!renderer->document())
- return newStyle;
-
RenderStyle* oldStyle = renderer->style();
if ((!oldStyle || (!oldStyle->animations() && !oldStyle->transitions())) && (!newStyle->animations() && !newStyle->transitions()))
« no previous file with comments | « Source/core/page/TouchDisambiguation.cpp ('k') | Source/core/page/animation/ImplicitAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698