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

Unified Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a crashers (everything is building!) Created 5 years, 11 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
Index: Source/core/rendering/compositing/CompositingReasonFinder.cpp
diff --git a/Source/core/rendering/compositing/CompositingReasonFinder.cpp b/Source/core/rendering/compositing/CompositingReasonFinder.cpp
index 9ecf1738874764909b33ecdaefd95d127a229649..1714fd8b4d26a0eb6f8df567d3724d3b83209c6a 100644
--- a/Source/core/rendering/compositing/CompositingReasonFinder.cpp
+++ b/Source/core/rendering/compositing/CompositingReasonFinder.cpp
@@ -81,7 +81,7 @@ CompositingReasons CompositingReasonFinder::potentialCompositingReasonsFromStyle
CompositingReasons reasons = CompositingReasonNone;
- RenderStyle* style = renderer->style();
+ const RenderStyle* style = renderer->style();
if (requiresCompositingForTransform(renderer))
reasons |= CompositingReason3DTransform;
@@ -170,7 +170,7 @@ CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons
return directReasons;
}
-bool CompositingReasonFinder::requiresCompositingForAnimation(RenderStyle* style) const
+bool CompositingReasonFinder::requiresCompositingForAnimation(const RenderStyle* style) const
{
if (style->subtreeWillChangeContents())
return style->isRunningAnimationOnCompositor();
@@ -192,7 +192,7 @@ bool CompositingReasonFinder::requiresCompositingForScrollBlocksOn(const RenderO
// Note that the other requires* functions run at RenderObject::styleDidChange time and so can rely
// only on the style of their object. This function runs at CompositingRequirementsUpdater::update
// time, and so can consider the style of other objects.
- RenderStyle* style = renderer->style();
+ const RenderStyle* style = renderer->style();
// We should only get here by CompositingReasonScrollBlocksOn being a potential compositing reason.
ASSERT(style->hasScrollBlocksOn() && !renderer->isDocumentElement());

Powered by Google App Engine
This is Rietveld 408576698