| Index: third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp b/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
|
| index 4ae8b9198cd1e2ed5296e6759c7fbd7469cedaa2..28fc9bdae28bac57f49e9ff2905baa5df15e2265 100644
|
| --- a/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
|
| @@ -37,8 +37,8 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_NoDrawables)
|
| NinePieceImage ninePiece;
|
| ninePiece.setImage(generatedImage());
|
|
|
| - IntSize imageSize(100, 100);
|
| - IntRect borderImageArea(0, 0, 100, 100);
|
| + LayoutSize imageSize(100, 100);
|
| + LayoutRect borderImageArea(0, 0, 100, 100);
|
| IntRectOutsets borderWidths(0, 0, 0, 0);
|
|
|
| NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
|
| @@ -55,8 +55,8 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_AllDrawable)
|
| ninePiece.setImageSlices(LengthBox(10, 10, 10, 10));
|
| ninePiece.setFill(true);
|
|
|
| - IntSize imageSize(100, 100);
|
| - IntRect borderImageArea(0, 0, 100, 100);
|
| + LayoutSize imageSize(100, 100);
|
| + LayoutRect borderImageArea(0, 0, 100, 100);
|
| IntRectOutsets borderWidths(10, 10, 10, 10);
|
|
|
| NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
|
| @@ -73,8 +73,8 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_NoFillMiddleNotDrawable)
|
| ninePiece.setImageSlices(LengthBox(10, 10, 10, 10));
|
| ninePiece.setFill(false); // default
|
|
|
| - IntSize imageSize(100, 100);
|
| - IntRect borderImageArea(0, 0, 100, 100);
|
| + LayoutSize imageSize(100, 100);
|
| + LayoutRect borderImageArea(0, 0, 100, 100);
|
| IntRectOutsets borderWidths(10, 10, 10, 10);
|
|
|
| NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
|
| @@ -93,8 +93,8 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_TopLeftDrawable)
|
| ninePiece.setImage(generatedImage());
|
| ninePiece.setImageSlices(LengthBox(10, 10, 10, 10));
|
|
|
| - IntSize imageSize(100, 100);
|
| - IntRect borderImageArea(0, 0, 100, 100);
|
| + LayoutSize imageSize(100, 100);
|
| + LayoutRect borderImageArea(0, 0, 100, 100);
|
| IntRectOutsets borderWidths(10, 10, 10, 10);
|
|
|
| const struct {
|
| @@ -123,8 +123,8 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_ScaleDownBorder)
|
| ninePiece.setImage(generatedImage());
|
| ninePiece.setImageSlices(LengthBox(10, 10, 10, 10));
|
|
|
| - IntSize imageSize(100, 100);
|
| - IntRect borderImageArea(0, 0, 100, 100);
|
| + LayoutSize imageSize(100, 100);
|
| + LayoutRect borderImageArea(0, 0, 100, 100);
|
| IntRectOutsets borderWidths(10, 10, 10, 10);
|
|
|
| // Set border slices wide enough so that the widths are scaled
|
| @@ -144,8 +144,8 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_ScaleDownBorder)
|
| TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
|
| {
|
| const struct {
|
| - IntSize imageSize;
|
| - IntRect borderImageArea;
|
| + LayoutSize imageSize;
|
| + LayoutRect borderImageArea;
|
| IntRectOutsets borderWidths;
|
| bool fill;
|
| LengthBox imageSlices;
|
| @@ -164,7 +164,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
|
| } testCases[] = {
|
| {
|
| // Empty border and slices but with fill
|
| - IntSize(100, 100), IntRect(0, 0, 100, 100), IntRectOutsets(0, 0, 0, 0), true,
|
| + LayoutSize(100, 100), LayoutRect(0, 0, 100, 100), IntRectOutsets(0, 0, 0, 0), true,
|
| LengthBox(Length(0, Fixed), Length(0, Fixed), Length(0, Fixed), Length(0, Fixed)), Image::StretchTile, Image::StretchTile, {
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| @@ -177,7 +177,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
|
| { true, false, FloatRect(0, 0, 100, 100), FloatRect(0, 0, 100, 100), 1, 1, Image::StretchTile, Image::StretchTile },
|
| }}, {
|
| // Single border and fill
|
| - IntSize(100, 100), IntRect(0, 0, 100, 100), IntRectOutsets(0, 0, 10, 0), true,
|
| + LayoutSize(100, 100), LayoutRect(0, 0, 100, 100), IntRectOutsets(0, 0, 10, 0), true,
|
| LengthBox(Length(20, Percent), Length(20, Percent), Length(20, Percent), Length(20, Percent)), Image::StretchTile, Image::StretchTile, {
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| @@ -190,7 +190,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
|
| { true, false, FloatRect(0, 0, 100, 90), FloatRect(20, 20, 60, 60), 1.666667, 1.5, Image::StretchTile, Image::StretchTile },
|
| }}, {
|
| // All borders, no fill
|
| - IntSize(100, 100), IntRect(0, 0, 100, 100), IntRectOutsets(10, 10, 10, 10), false,
|
| + LayoutSize(100, 100), LayoutRect(0, 0, 100, 100), IntRectOutsets(10, 10, 10, 10), false,
|
| LengthBox(Length(20, Percent), Length(20, Percent), Length(20, Percent), Length(20, Percent)), Image::StretchTile, Image::StretchTile, {
|
| { true, true, FloatRect(0, 0, 10, 10), FloatRect(0, 0, 20, 20), 1, 1, Image::StretchTile, Image::StretchTile },
|
| { true, true, FloatRect(0, 90, 10, 10), FloatRect(0, 80, 20, 20), 1, 1, Image::StretchTile, Image::StretchTile },
|
| @@ -203,7 +203,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
|
| { false, false, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 0, 0, Image::StretchTile, Image::StretchTile },
|
| }}, {
|
| // Single border, no fill
|
| - IntSize(100, 100), IntRect(0, 0, 100, 100), IntRectOutsets(0, 0, 0, 10), false,
|
| + LayoutSize(100, 100), LayoutRect(0, 0, 100, 100), IntRectOutsets(0, 0, 0, 10), false,
|
| LengthBox(Length(20, Percent), Length(20, Percent), Length(20, Percent), Length(20, Percent)), Image::StretchTile, Image::RoundTile, {
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| @@ -216,7 +216,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
|
| { false, false, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 0, 0, Image::StretchTile, Image::RoundTile },
|
| }}, {
|
| // All borders but no slices, with fill (stretch horizontally, space vertically)
|
| - IntSize(100, 100), IntRect(0, 0, 100, 100), IntRectOutsets(10, 10, 10, 10), true,
|
| + LayoutSize(100, 100), LayoutRect(0, 0, 100, 100), IntRectOutsets(10, 10, 10, 10), true,
|
| LengthBox(Length(0, Fixed), Length(0, Fixed), Length(0, Fixed), Length(0, Fixed)), Image::StretchTile, Image::SpaceTile, {
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
| { false, true, FloatRect(0, 0, 0, 0), FloatRect(0, 0, 0, 0), 1, 1, Image::StretchTile, Image::StretchTile },
|
|
|