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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 200023002: Making LayoutUnit conversions to Float type explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 } 1056 }
1057 1057
1058 FloatPoint RenderLayer::perspectiveOrigin() const 1058 FloatPoint RenderLayer::perspectiveOrigin() const
1059 { 1059 {
1060 if (!renderer()->hasTransform()) 1060 if (!renderer()->hasTransform())
1061 return FloatPoint(); 1061 return FloatPoint();
1062 1062
1063 const LayoutRect borderBox = toRenderBox(renderer())->borderBoxRect(); 1063 const LayoutRect borderBox = toRenderBox(renderer())->borderBoxRect();
1064 RenderStyle* style = renderer()->style(); 1064 RenderStyle* style = renderer()->style();
1065 1065
1066 return FloatPoint(floatValueForLength(style->perspectiveOriginX(), borderBox .width()), 1066 return FloatPoint(floatValueForLength(style->perspectiveOriginX(), borderBox .width().toFloat()), floatValueForLength(style->perspectiveOriginY(), borderBox. height().toFloat()));
1067 floatValueForLength(style->perspectiveOriginY(), borderBox .height()));
1068 } 1067 }
1069 1068
1070 static inline bool isFixedPositionedContainer(RenderLayer* layer) 1069 static inline bool isFixedPositionedContainer(RenderLayer* layer)
1071 { 1070 {
1072 return layer->isRootLayer() || layer->hasTransform(); 1071 return layer->isRootLayer() || layer->hasTransform();
1073 } 1072 }
1074 1073
1075 RenderLayer* RenderLayer::enclosingPositionedAncestor() const 1074 RenderLayer* RenderLayer::enclosingPositionedAncestor() const
1076 { 1075 {
1077 RenderLayer* curr = parent(); 1076 RenderLayer* curr = parent();
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
4070 } 4069 }
4071 } 4070 }
4072 4071
4073 void showLayerTree(const WebCore::RenderObject* renderer) 4072 void showLayerTree(const WebCore::RenderObject* renderer)
4074 { 4073 {
4075 if (!renderer) 4074 if (!renderer)
4076 return; 4075 return;
4077 showLayerTree(renderer->enclosingLayer()); 4076 showLayerTree(renderer->enclosingLayer());
4078 } 4077 }
4079 #endif 4078 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698