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

Unified Diff: Source/core/paint/LayoutObjectDrawingRecorderTest.cpp

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/paint/LayoutObjectDrawingRecorder.h ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
diff --git a/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp b/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
index 7873f3bb7992eca40b39a68b8767d7bd8866025a..021bb763d4a9e19859f6b0428fd86da0548c8521 100644
--- a/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
+++ b/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
@@ -50,7 +50,7 @@ private:
namespace {
-void drawNothing(GraphicsContext& context, const LayoutView& layoutView, PaintPhase phase, const FloatRect& bound)
+void drawNothing(GraphicsContext& context, const LayoutView& layoutView, PaintPhase phase, const LayoutRect& bound)
{
if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutView, phase))
return;
@@ -58,7 +58,7 @@ void drawNothing(GraphicsContext& context, const LayoutView& layoutView, PaintPh
LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound);
}
-void drawRect(GraphicsContext& context, LayoutView& layoutView, PaintPhase phase, const FloatRect& bound)
+void drawRect(GraphicsContext& context, LayoutView& layoutView, PaintPhase phase, const LayoutRect& bound)
{
if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutView, phase))
return;
@@ -80,7 +80,7 @@ bool isCached(const DisplayItem& item)
TEST_F(LayoutObjectDrawingRecorderTest, Nothing)
{
GraphicsContext context(&rootDisplayItemList());
- FloatRect bound = layoutView().viewRect();
+ LayoutRect bound = layoutView().viewRect();
EXPECT_EQ((size_t)0, rootDisplayItemList().displayItems().size());
drawNothing(context, layoutView(), PaintPhaseForeground, bound);
@@ -94,7 +94,7 @@ TEST_F(LayoutObjectDrawingRecorderTest, Nothing)
TEST_F(LayoutObjectDrawingRecorderTest, Rect)
{
GraphicsContext context(&rootDisplayItemList());
- FloatRect bound = layoutView().viewRect();
+ LayoutRect bound = layoutView().viewRect();
drawRect(context, layoutView(), PaintPhaseForeground, bound);
rootDisplayItemList().commitNewDisplayItems();
EXPECT_EQ((size_t)1, rootDisplayItemList().displayItems().size());
@@ -104,7 +104,7 @@ TEST_F(LayoutObjectDrawingRecorderTest, Rect)
TEST_F(LayoutObjectDrawingRecorderTest, Cached)
{
GraphicsContext context(&rootDisplayItemList());
- FloatRect bound = layoutView().viewRect();
+ LayoutRect bound = layoutView().viewRect();
drawNothing(context, layoutView(), PaintPhaseBlockBackground, bound);
drawRect(context, layoutView(), PaintPhaseForeground, bound);
rootDisplayItemList().commitNewDisplayItems();
@@ -132,7 +132,7 @@ FloatRect drawAndGetCullRect(DisplayItemList& list, const LayoutObject& layoutOb
GraphicsContext context(&list);
LayoutObjectDrawingRecorder recorder(
context, layoutObject, DisplayItem::BoxDecorationBackground, bounds);
- context.drawRect(enclosedIntRect(bounds));
+ context.drawRect(enclosedIntRect(FloatRect(bounds)));
}
list.commitNewDisplayItems();
const auto& drawing = static_cast<const DrawingDisplayItem&>(list.displayItems()[0]);
« no previous file with comments | « Source/core/paint/LayoutObjectDrawingRecorder.h ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698