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

Unified Diff: Source/core/rendering/RenderObject.h

Issue 57643004: Pass RenderStyle / RenderObject by reference in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/animation/KeyframeAnimation.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 6b137ea68942ab03f72e5bcf5c8090ecf6b82d7e..f5d878ee7199c6b382d1cd1e811efc27e21db284 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -1376,21 +1376,22 @@ inline int adjustForAbsoluteZoom(int value, RenderObject* renderer)
return adjustForAbsoluteZoom(value, renderer->style());
}
-inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, RenderObject* renderer)
+inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, RenderObject& renderer)
{
- return adjustLayoutUnitForAbsoluteZoom(value, renderer->style());
+ ASSERT(renderer.style());
+ return adjustLayoutUnitForAbsoluteZoom(value, *renderer.style());
}
-inline void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject* renderer)
+inline void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject& renderer)
{
- float zoom = renderer->style()->effectiveZoom();
+ float zoom = renderer.style()->effectiveZoom();
if (zoom != 1)
quad.scale(1 / zoom, 1 / zoom);
}
-inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject* renderer)
+inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject& renderer)
{
- float zoom = renderer->style()->effectiveZoom();
+ float zoom = renderer.style()->effectiveZoom();
if (zoom != 1)
rect.scale(1 / zoom, 1 / zoom);
}
« no previous file with comments | « Source/core/frame/animation/KeyframeAnimation.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698