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

Unified Diff: Source/core/testing/Internals.cpp

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/svg/animation/SVGSMILElement.cpp ('k') | Source/core/xml/XPathFunctions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 388eb19f856cb48a05ba35a1600a0d121e967f1e..062edd2b1785fc2317e64cc610a6caa2df87c393 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -319,7 +319,7 @@ Node* Internals::treeScopeRootNode(Node* node, ExceptionState& es)
return 0;
}
- return node->treeScope().rootNode();
+ return node->treeScope()->rootNode();
}
Node* Internals::parentTreeScope(Node* node, ExceptionState& es)
@@ -328,7 +328,7 @@ Node* Internals::parentTreeScope(Node* node, ExceptionState& es)
es.throwDOMException(InvalidAccessError);
return 0;
}
- const TreeScope* parentTreeScope = node->treeScope().parentTreeScope();
+ const TreeScope* parentTreeScope = node->treeScope()->parentTreeScope();
return parentTreeScope ? parentTreeScope->rootNode() : 0;
}
@@ -403,7 +403,7 @@ unsigned short Internals::compareTreeScopePosition(const Node* node1, const Node
es.throwDOMException(InvalidAccessError);
return 0;
}
- return treeScope1->comparePosition(*treeScope2);
+ return treeScope1->comparePosition(treeScope2);
}
unsigned Internals::numberOfActiveAnimations() const
@@ -411,9 +411,7 @@ unsigned Internals::numberOfActiveAnimations() const
Frame* contextFrame = frame();
if (RuntimeEnabledFeatures::webAnimationsCSSEnabled())
return frame()->document()->timeline()->numberOfActiveAnimationsForTesting();
- if (AnimationController* controller = contextFrame->animation())
- return controller->numberOfActiveAnimations(contextFrame->document());
- return 0;
+ return contextFrame->animation()->numberOfActiveAnimations(contextFrame->document());
}
void Internals::suspendAnimations(Document* document, ExceptionState& es) const
@@ -423,13 +421,8 @@ void Internals::suspendAnimations(Document* document, ExceptionState& es) const
return;
}
- if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) {
- AnimationController* controller = document->frame()->animation();
- if (!controller)
- return;
-
- controller->suspendAnimations();
- }
+ if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
+ document->frame()->animation()->suspendAnimations();
}
void Internals::resumeAnimations(Document* document, ExceptionState& es) const
@@ -439,13 +432,8 @@ void Internals::resumeAnimations(Document* document, ExceptionState& es) const
return;
}
- if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) {
- AnimationController* controller = document->frame()->animation();
- if (!controller)
- return;
-
- controller->resumeAnimations();
- }
+ if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
+ document->frame()->animation()->resumeAnimations();
}
void Internals::pauseAnimations(double pauseTime, ExceptionState& es)
« no previous file with comments | « Source/core/svg/animation/SVGSMILElement.cpp ('k') | Source/core/xml/XPathFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698